[Asterisk-Users] Filling PHP Variable from EXTENSION in AGI
romsun p
phonelab at marsinah.com
Mon Sep 1 21:42:05 MST 2003
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 <mbrancaleoni at espia.it> 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
> > Asterisk-Users at lists.digium.com
> > http://lists.digium.com/mailman/listinfo/asterisk-users
_________________________________________________________
This mail sent using V-webmail - http://www.v-webmail.org
More information about the asterisk-users
mailing list