Index: apps/app_osplookup.c =================================================================== --- apps/app_osplookup.c (revision 199221) +++ apps/app_osplookup.c (working copy) @@ -123,6 +123,150 @@ #define OSP_DEF_TIMELIMIT ((unsigned int)0) /* OSP default duration limit, no limit */ #define OSP_DEF_PROTOCOL OSP_PROT_SIP /* OSP default destination protocol, SIP */ +/*** DOCUMENTATION + + + OSP Authentication. + + + + + + + Authenticate a SIP INVITE by OSP and sets the variables: + + + The inbound call transaction handle. + + + The inbound call duration limit in seconds. + + + This application sets the following channel variable upon completion: + + + The status of the OSP Auth attempt as a text string, one of + + + + + + + + + + Lookup destination by OSP. + + + + + + + + generate H323 call id for the outbound call + + + generate SIP call id for the outbound call. Have not been implemented + + + generate IAX call id for the outbound call. Have not been implemented + + + + + + Looks up an extension via OSP and sets the variables, where 'n' is the number of the result beginning with 1: + + + The OSP Handle for anything remaining. + + + The technology to use for the call. + + + The destination to use for the call. + + + The called number to use for the call. + + + The calling number to use for the call. + + + The dial command string. + + + The actual OSP token as a string. + + + The outbound call duraction limit in seconds. + + + The outbound call id types. + + + The outbound call id. + + + The number of OSP results total remaining. + + + + + This application sets the following channel variable upon completion: + + + + + + + + + + Lookup next destination by OSP. + + + + + + + + Looks up the next OSP Destination for OSPOUTHANDLE. See OSPLookup for more information. + This application sets the following channel variable upon completion: + + + The status of the OSP Next attempt as a text string, one of + + + + + + + + + + Record OSP entry. + + + + + + + Records call state for OSPINHANDLE, according to status, which should be one of BUSY, CONGESTION, ANSWER, NOANSWER, or CHANUNAVAIL or coincidentally, just what the Dial application stores in its DIALSTATUS. + This application sets the following channel variable upon completion: + + + The status of the OSP Finish attempt as a text string, one of + + + + + + + + ***/ + + /* OSP Provider */ struct osp_provider { char name[OSP_NORSTR_SIZE]; /* OSP provider context name */ @@ -2003,63 +2147,25 @@ return CLI_SUCCESS; } -static const char* app1= "OSPAuth"; -static const char* synopsis1 = "OSP authentication"; -static const char* descrip1 = -" OSPAuth([provider[,options]]): Authenticate a SIP INVITE by OSP and sets\n" -"the variables:\n" -" ${OSPINHANDLE}: The inbound call transaction handle\n" -" ${OSPINTIMELIMIT}: The inbound call duration limit in seconds\n" -"\n" -"This application sets the following channel variable upon completion:\n" -" OSPAUTHSTATUS The status of the OSP Auth attempt as a text string, one of\n" -" SUCCESS | FAILED | ERROR\n"; +/* OSPAuth() dialplan application */ +static const char* app1; +static const char* synopsis1; +static const char* descrip1; -static const char* app2= "OSPLookup"; -static const char* synopsis2 = "Lookup destination by OSP"; -static const char* descrip2 = -" OSPLookup(exten[,provider[,options]]): Looks up an extension via OSP and sets\n" -"the variables, where 'n' is the number of the result beginning with 1:\n" -" ${OSPOUTHANDLE}: The OSP Handle for anything remaining\n" -" ${OSPTECH}: The technology to use for the call\n" -" ${OSPDEST}: The destination to use for the call\n" -" ${OSPCALLED}: The called number to use for the call\n" -" ${OSPCALLING}: The calling number to use for the call\n" -" ${OSPDIALSTR}: The dial command string\n" -" ${OSPOUTTOKEN}: The actual OSP token as a string\n" -" ${OSPOUTTIMELIMIT}: The outbound call duration limit in seconds\n" -" ${OSPOUTCALLIDTYPES}: The outbound call id types\n" -" ${OSPOUTCALLID}: The outbound call id\n" -" ${OSPRESULTS}: The number of OSP results total remaining\n" -"\n" -"The option string may contain the following character:\n" -" 'h' -- generate H323 call id for the outbound call\n" -" 's' -- generate SIP call id for the outbound call. Have not been implemented\n" -" 'i' -- generate IAX call id for the outbound call. Have not been implemented\n" -"This application sets the following channel variable upon completion:\n" -" OSPLOOKUPSTATUS The status of the OSP Lookup attempt as a text string, one of\n" -" SUCCESS | FAILED | ERROR\n"; +/* OSPLookup() dialplan application */ +static const char* app2; +static const char* synopsis2; +static const char* descrip2; -static const char* app3 = "OSPNext"; -static const char* synopsis3 = "Lookup next destination by OSP"; -static const char* descrip3 = -" OSPNext(cause[,provider[,options]]): Looks up the next OSP Destination for ${OSPOUTHANDLE}\n" -"See OSPLookup for more information\n" -"\n" -"This application sets the following channel variable upon completion:\n" -" OSPNEXTSTATUS The status of the OSP Next attempt as a text string, one of\n" -" SUCCESS | FAILED | ERROR\n"; +/* OSPNext() dialplan application */ +static const char* app3; +static const char* synopsis3; +static const char* descrip3; -static const char* app4 = "OSPFinish"; -static const char* synopsis4 = "Record OSP entry"; -static const char* descrip4 = -" OSPFinish([status[,options]]): Records call state for ${OSPINHANDLE}, according to\n" -"status, which should be one of BUSY, CONGESTION, ANSWER, NOANSWER, or CHANUNAVAIL\n" -"or coincidentally, just what the Dial application stores in its ${DIALSTATUS}.\n" -"\n" -"This application sets the following channel variable upon completion:\n" -" OSPFINISHSTATUS The status of the OSP Finish attempt as a text string, one of\n" -" SUCCESS | FAILED | ERROR \n"; +/* OSPFinish() dialplan application */ +static const char* app4; +static const char* synopsis4; +static const char* descrip4; static struct ast_cli_entry cli_osp[] = { AST_CLI_DEFINE(handle_cli_osp_show, "Displays OSF information")