Asterisk Ver0-1-0/Asterisk DotC
AsteriskVer0-1-0/AsteriskDotC ¶* int main(int argc, char *argv[])
int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, const struct timeval *timeout); select checks to see if any sockets are ready for reading ( readfds ), writing ( writefds ), or have an exceptional condition pending ( exceptfds ). timeout specifies the maximum time for select to complete. nfds specifies the maximum number of sockets to check. If timeout is a null pointer, select blocks indefinitely. timeout points to a timeval structure. A timeout value of 0 causes select to return immediately. This behavior is useful in applications that periodically poll their sockets. The arrival of out-of-band data is the only possible exceptional condition. fd_set is a type defined in the <sys/types.h> header file. fd_set defines a set of file descriptors on which select operates. Passing NULL for any of the three fd_set arguments specifies that select should not monitor that condition. On return, each of the input sets is modified to indicate the subset of descriptions that are ready. These may be found by using the FD_ISSET macro. timeout is an upper bound on the amount of time elapsed before select returns. It may be zero, causing select to return immediately. (This is useful for polling.) If timeout is NULL (no timeout), select can block indefinitely. Áï, timeout°ªÀÌ 0ÀÏ °æ¿ì¿¡´Â Æú¸µ¿¡ ÇØ´çµÇ¸ç, timeoutÀÌ NULLÀÏ °æ¿ì¿¡´Â ŸÀӾƿôÀÇ »óÇѼ±ÀÌ ¾ø´Ù´Â Àǹ̷ΠÇؼ®µÇ¾î I/O°¡ ¹ß»ýÇÏÁö ¾ÊÀ¸¸é ºí·ÏµË´Ï´Ù.
init_logger ¶* logger.c
load_pbx ¶* pbx.c
static struct pbx_builtin { char name[AST_MAX_APP]; int (*execute)(struct ast_channel *chan, void *data); } builtins[] = { /* These applications are built into the PBX core and do not need separate modules */ { "Answer", pbx_builtin_answer }, { "Goto", pbx_builtin_goto }, { "Hangup", pbx_builtin_hangup }, { "DigitTimeout", pbx_builtin_dtimeout }, { "ResponseTimeout", pbx_builtin_rtimeout }, { "BackGround", pbx_builtin_background }, { "Wait", pbx_builtin_wait }, }; load_modules ¶* module.h:#define AST_MODULE_CONFIG "modules.conf" include/asterisk/
* asterisk.h:#define AST_CONFIG_DIR "/etc/asterisk"
* asterisk.h:#define AST_MODULE_DIR "/usr/lib/asterisk/modules"
* int load_modules()
|
You have literary talent that you should take pains to develop. |