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

Mike D'Ambrogia miked at jamagination.com
Fri Jan 12 11:32:35 MST 2007


just as a followup and potential solution to the passing of values, I've
been setting variables at the top of the dialplan using :
 
exten => 100,n,Set(my_var=<SomeValue>)
 
Now I can modify my_var in the dialplan, and I can get/set my_var in the
AGI script via GET VARIABLE and SET VARIABLE
 
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.  
 
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20070112/10f35767/attachment.htm


More information about the asterisk-users mailing list