Brancaleoni Matteo Thank you very much for your pointers. I wrote a little PHP function which read an input from http://stdin
I can extract it and choose a needed value. Now a variable of PHP-based-AGI script contents a dialed extension :) Romsun Pramudito >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Brancaleoni Matteo <[EMAIL PROTECTED]> wrote: > 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 > > [EMAIL PROTECTED] > > http://lists.digium.com/mailman/listinfo/asterisk-users _________________________________________________________ This mail sent using V-webmail - http://www.v-webmail.org _______________________________________________ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users