FW: [asterisk-users] Get dialed numbers in AGI

Yuan LIU yliu11 at hotmail.com
Fri Jan 12 12:43:27 MST 2007


>From: "Mike D'Ambrogia" <miked at jamagination.com>
>
>You'll need to modify your current overall programming strategy in order
>to implement this.  But do the READ that you are attempting from within
>the dial plan and not the AGI script, and either update my_var prior to
>calling the AGI, or pass my_var in to the AGI as a param.

Totally.

>I've been calling my AGI with an extra param that helps the script
>determine where I am in the logic, i.e. if I pass in the extra param
>with a -1 then I'm at the beginning of the logic, if I pass in a -2 then
>I know that I've got the variables available and set so that I can do my
>mysql inserts, etc.  On the AGI side I trap the value of the extra param
>in a switch stmt and then execute the approp block of code based on the
>value.
>
>md

This may not be necessary, as AGI receives the calling dialplan's context, 
extension, and priority via AGI environment (same way as CGI).  So if you 
plan ahead, your script should be able to determine where in the flow it is 
being called.

Yuan Liu




More information about the asterisk-users mailing list