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      [EMAIL PROTECTED]      Voice: +1-760-468-3867 PST
Newline                                             Fax: +1-760-731-3000

_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to