Index: res/res_smdi.c =================================================================== --- res/res_smdi.c (revision 199017) +++ res/res_smdi.c (working copy) @@ -57,6 +57,94 @@ /* Message expiry time in milliseconds */ #define SMDI_MSG_EXPIRY_TIME 30000 /* 30 seconds */ +/*** DOCUMENTATION + + + + Retrieve an SMDI message. + + + + + + + + + Instead of searching on the forwarding station, search on the message desk terminal. + + + Instead of searching on the forwarding station, search on the message desk number. + + + + + + + This function is used to retrieve an incoming SMDI message. It returns + an ID which can be used with the SMDI_MSG() function to access details of + the message. Note that this is a destructive function in the sense that + once an SMDI message is retrieved using this function, it is no longer in + the global SMDI message queue, and can not be accessed by any other Asterisk + channels. The timeout for this function is optional, and the default is + 3 seconds. When providing a timeout, it should be in milliseconds. + + + The default search is done on the forwarding station ID. However, if + you set one of the search key options in the options field, you can change + this behavior. + + + + + + + Retrieve details about an SMDI message. + + + + + + Valid message components are: + + + + The message desk number + + + The message desk terminal + + + The forwarding station + + + The callerID of the calling party that was forwarded + + + The call type. The value here is the exact character + that came in on the SMDI link. Typically, example values + are: + Options: + + + Direct Calls + + + Forward All Calls + + + Forward Busy Calls + + + Forward No Answer Calls + + + + + + + + ***/ + static const char config_file[] = "smdi.conf"; /*! \brief SMDI message desk message queue. */ @@ -1292,46 +1380,11 @@ static struct ast_custom_function smdi_msg_retrieve_function = { .name = "SMDI_MSG_RETRIEVE", - .synopsis = "Retrieve an SMDI message.", - .syntax = "SMDI_MSG_RETRIEVE(,[,timeout[,options]])", - .desc = - " This function is used to retrieve an incoming SMDI message. It returns\n" - "an ID which can be used with the SMDI_MSG() function to access details of\n" - "the message. Note that this is a destructive function in the sense that\n" - "once an SMDI message is retrieved using this function, it is no longer in\n" - "the global SMDI message queue, and can not be accessed by any other Asterisk\n" - "channels. The timeout for this function is optional, and the default is\n" - "3 seconds. When providing a timeout, it should be in milliseconds.\n" - " The default search is done on the forwarding station ID. However, if\n" - "you set one of the search key options in the options field, you can change\n" - "this behavior.\n" - " Options:\n" - " t - Instead of searching on the forwarding station, search on the message\n" - " desk terminal.\n" - " n - Instead of searching on the forwarding station, search on the message\n" - " desk number.\n" - "", .read = smdi_msg_retrieve_read, }; static struct ast_custom_function smdi_msg_function = { .name = "SMDI_MSG", - .synopsis = "Retrieve details about an SMDI message.", - .syntax = "SMDI_MSG(,)", - .desc = - " This function is used to access details of an SMDI message that was\n" - "pulled from the incoming SMDI message queue using the SMDI_MSG_RETRIEVE()\n" - "function.\n" - " Valid message components are:\n" - " number - The message desk number\n" - " terminal - The message desk terminal\n" - " station - The forwarding station\n" - " callerid - The callerID of the calling party that was forwarded\n" - " type - The call type. The value here is the exact character\n" - " that came in on the SMDI link. Typically, example values\n" - " are: D - Direct Calls, A - Forward All Calls,\n" - " B - Forward Busy Calls, N - Forward No Answer Calls\n" - "", .read = smdi_msg_read, };