exten => auth_dial,1,DigitTimeout,5 exten => auth_dial,2,ResponseTimeout,15 exten => auth_dial,3,Read(dialed,IVR/en_enter_destination,0) exten => auth_dial,4,agi(call_start.php|${dialed}) exten => auth_dial,5,dial(SIP/${dialed}@146.82.15.241) I'm trying to get What they dialed put into the PHP script. How do I get the contents of this variable in the php script?
On Tue, 2004-11-30 at 05:32 -0800, Mike Roberts wrote:> exten => auth_dial,1,DigitTimeout,5 > exten => auth_dial,2,ResponseTimeout,15 > exten => auth_dial,3,Read(dialed,IVR/en_enter_destination,0) > exten => auth_dial,4,agi(call_start.php|${dialed}) > exten => auth_dial,5,dial(SIP/${dialed}@146.82.15.241) > > I'm trying to get What they dialed put into the PHP script. How do I > get the contents of this variable in the php script?Why don't you use AGI to consolidate priorities 3-5, you aren't passing data around then and it is only about 4 lines of code more to deal with in the PHP code. -- Steven Critchfield <critch@basesys.com>
Okay, I got read working, I didn't use the | last time for the options. But I still need to know how to use this variable. When I do read() in php, how do I access the var it creates?
Also check out http://phpagi.sf.net/ it will correctly parse all the info you need. And steve is right, you should code pri #3 into the PHP script itself. And you can also code pri #5 into the code. -Matthew ----- Original Message ----- From: "Mike Roberts" <manipura@gmail.com> To: <asterisk-users@lists.digium.com> Sent: Tuesday, November 30, 2004 7:32 AM Subject: [Asterisk-Users] Passing Var to PHP AGI script> exten => auth_dial,1,DigitTimeout,5 > exten => auth_dial,2,ResponseTimeout,15 > exten => auth_dial,3,Read(dialed,IVR/en_enter_destination,0) > exten => auth_dial,4,agi(call_start.php|${dialed}) > exten => auth_dial,5,dial(SIP/${dialed}@146.82.15.241) > > I'm trying to get What they dialed put into the PHP script. How do I > get the contents of this variable in the php script? > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users