bruce bruce
2010-Jun-14  16:00 UTC
[asterisk-users] How to pass variable back and forth from dialplan to php file?
Hi Everyone,
I have a php file that if an argument is passed to it, it will echo a number
back. I am looking to use system() in dial-plan to send ${EXTEN} to it and
then to get that processed value back from the php file and put it in $var
back into asterisk dial-plan. While trying this method doesn't work:
exten => _x.,1,SetVar(var = system(php /file.php ${EXTEN})
exten => _x.,n,NoOp(${var})
What is right syntax for line 1?
Thanks,
Bruce
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://lists.digium.com/pipermail/asterisk-users/attachments/20100614/18b08f95/attachment.htm
Carlos Chavez
2010-Jun-14  16:12 UTC
[asterisk-users] How to pass variable back and forth from dialplan to php file?
On Mon, 2010-06-14 at 12:00 -0400, bruce bruce wrote:> Hi Everyone, > > > I have a php file that if an argument is passed to it, it will echo a > number back. I am looking to use system() in dial-plan to send > ${EXTEN} to it and then to get that processed value back from the php > file and put it in $var back into asterisk dial-plan. While trying > this method doesn't work: > > > exten => _x.,1,SetVar(var = system(php /file.php ${EXTEN}) > exten => _x.,n,NoOp(${var}) > >This is exactly what AGI was made for. Look into the PHPAGI library. -- Telecomunicaciones Abiertas de M?xico S.A. de C.V. Carlos Ch?vez Prats Director de Tecnolog?a +52-55-91169161 ext 2001 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: This is a digitally signed message part Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20100614/b98711da/attachment.pgp
William Stillwell (Lists)
2010-Jun-14  16:23 UTC
[asterisk-users] How to pass variable back and forth from dialplan to php file?
I would think AGI would be better. ?
 
I don't think system() returns anything, except maybe a success/fail ?
 
 
 
 
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of bruce bruce
Sent: Monday, June 14, 2010 12:00 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: [asterisk-users] How to pass variable back and forth from dialplan
to php file?
 
Hi Everyone,
 
I have a php file that if an argument is passed to it, it will echo a number
back. I am looking to use system() in dial-plan to send ${EXTEN} to it and
then to get that processed value back from the php file and put it in $var
back into asterisk dial-plan. While trying this method doesn't work:
 
exten => _x.,1,SetVar(var = system(php /file.php ${EXTEN})
exten => _x.,n,NoOp(${var})
 
What is right syntax for line 1?
 
Thanks,
Bruce
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://lists.digium.com/pipermail/asterisk-users/attachments/20100614/e0339118/attachment.htm