[asterisk-users] Bugs??

Steve Edwards asterisk.org at sedwards.com
Tue Jan 8 14:56:24 CST 2008


On Tue, 8 Jan 2008, Abdul wrote:

> Sorry i forget to give my extentions config.
>
> [clientsG]
> exten => _x.,1,Set(UserN=${CALLERID(all)})
> exten => _x.,2,Set(CalledNum=${EXTEN})
> exten => _x.,3,Set(Stime=${DATETIME})
> exten => _x.,4,Set(CID=${CALLERID})
> exten => _x.,5,Set(HCA=${HANGUPCAUSE})
> exten => _x.,6,Set(Cun=${UNIQUEID})
> exten => _x.,7,AGI(routing.pl)
> exten => h,1,DeadAGI(stop.pl)
> exten => h,1,Hangup

Unrelated to your problem, but here's a suggestion -- use "n" instead of 
explicitly numbering your priorities. Like:

 	[clientsG]
 	exten => _x.,1,Set(UserN=${CALLERID(all)})
 	exten => _x.,n,Set(CalledNum=${EXTEN})
 	exten => _x.,n,Set(Stime=${DATETIME})
 	exten => _x.,n,Set(CID=${CALLERID})
 	exten => _x.,n,Set(HCA=${HANGUPCAUSE})
 	exten => _x.,n,Set(Cun=${UNIQUEID})
 	exten => _x.,n,AGI(routing.pl)
 	exten => h,1,DeadAGI(stop.pl)
 	exten => h,n,Hangup

Note that your hangup duplicated the h,1 priority.

Also, if you are setting these channel variables just so they can be 
picked up by your AGI, you can pass variables to the AGI application. 
Like:

 	AGI(routing.pl,${CALLERID(all)},${EXTEN})

or

 	AGI(routing.pl,--callerid=${CALLERID(all)},--exten=${EXTEN})

Since most of these are already being passed to your AGI in the AGI 
environment, passing them again on the command line would be a bit 
redundant.

Thanks in advance,
------------------------------------------------------------------------
Steve Edwards      sedwards at sedwards.com      Voice: +1-760-468-3867 PST
Newline                                             Fax: +1-760-731-3000



More information about the asterisk-users mailing list