romsun p
2003-Aug-30 13:40 UTC
[Asterisk-Users] Filling PHP Variable from EXTENSION in AGI
Hellooo... Is it possible to fill a variable of PHP-based-AGI-script from dialed extension ? This is what I need to achieve: If someone dial an extension, say 777, I want the dialed extension (777) be filled into PHP variable. I need the dialed extension become a condition of PHP script. Help please... Thanks romsun _________________________________________________________ This mail sent using V-webmail - http://www.v-webmail.org
Brancaleoni Matteo
2003-Aug-31 04:12 UTC
[Asterisk-Users] Filling PHP Variable from EXTENSION in AGI
Il sab, 2003-08-30 alle 22:40, romsun p ha scritto:> Hellooo...hi> > Is it possible to fill a variable of PHP-based-AGI-script > from dialed extension ?yes> > This is what I need to achieve: > If someone dial an extension, say 777, > I want the dialed extension (777) be filled into > PHP variable. I need the dialed extension become > a condition of PHP script.as soon as you start the script with AGI(scriptname), asterisk sends out some vars via std input to the script. just read that output from the script, parse it and you'll have your dialled extension, along with other vars. See app_agi.c to get what vars are sent by asterisk to the agi script. agi_extension is what you need (contains the dialled number) I wrote a little function in php that reads this output, parse it and put it into an assoc array, so I can have all the vars in a single & easy array.> > Help please... > Thanks > > romsun > _________________________________________________________ > This mail sent using V-webmail - http://www.v-webmail.org > > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users-- Brancaleoni Matteo <mbrancaleoni@espia.it> Espia - Emmegi Srl