kind of difficutl to help you if you dont provide the script or
relevant info about your php.ini configuration, stuff related to the
output buffer.<br>
<br>
I used to do programming with phpagi class, but then i came up with something more simple and usefull for my purposes. <br>
<br>
<a href="http://galileo.ivsol.net/scripts/AgiPhp5.php">http://galileo.ivsol.net/scripts/AgiPhp5.php</a><br>
<br>
only works with php, but with small modifications can work with php4.<br>
<br>
best regards<br><br><div><span class="gmail_quote">On 10/13/05, <b class="gmail_sendername">René Enskat [Teamware GmbH]</b> <<a href="mailto:ren@teamware-gmbh.de">ren@teamware-gmbh.de</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
The ("/var/lib/asterisk/agi-bin/phpagi.php") is the newest form the site<br>updated today, and i wrote the script like other examples and i can't find a<br>syntax mistake inside extension.conf and the php script .(
<br><br>On Thu, 13 Oct 2005 09:32:14 -0500<br> Moises Silva <<a href="mailto:moises.silva@gmail.com">moises.silva@gmail.com</a>> wrote:<br>> for some reason your script is not executing the get_var correctly, as you
<br>> can see in the output, asterisk is saying: "invalid or unknown command".<br>><br>> check the internals of your script, the most common reason is that you are<br>> mispelling the command.<br>>
<br>> best regards<br>><br>> On 10/13/05, René Enskat [Teamware GmbH] <<a href="mailto:ren@teamware-gmbh.de">ren@teamware-gmbh.de</a>> wrote:<br>>><br>>><br>>> Hello all,<br>>><br>>> I try to use a agi script to get a variable from * und put them into a
<br>>> script which gives me another variablke and put this in *.<br>>> My problem is now it seems the var ID is empty coz i always jump into<br>>> the result 0 loop.<br>>> The $MSN should be in the SetCIDNum.
<br>>><br>>> #!/usr/bin/php -q<br>>><br>>> <?php<br>>> include("/var/lib/asterisk/agi-bin/phpagi.php");<br>>> $agi = new AGI();<br>>><br>>> $ID = $agi->get_variable("SIPUSER");
<br>>><br>>> if ($ID['result'] == 0) {<br>>> $agi->verbose("SIPUSER not set -- nothing to do");<br>>> exit(1);<br>>> }<br>>><br>>> $agi->set_variable("MSN", exec("/var/lib/asterisk/agi-bin/msn4sip 111
<br>>> 222 333 " .$ID['data']));<br>>> ?><br>>><br>>> Output from asterisk:<br>>> -- Executing SetVar("SIP/31-79e2", "SIPUSER=31") in new stack<br>>> -- Executing AGI("SIP/31-79e2", "
msn4sip.agi") in new stack<br>>> -- Launched AGI Script /var/lib/asterisk/agi-bin/msn4sip.agi<br>>> msn4sip.agi: Arrayn(n [code] => 510n [result] => n [data] =><br>>> Invalid or unknown commandn)n
<br>>> msn4sip.agi: SIPUSER not set -- nothing to do<br>>> -- AGI Script msn4sip.agi completed, returning 0<br>>> -- Executing SetLanguage("SIP/31-79e2", "de") in new stack<br>>> -- Executing SetCIDNum("SIP/31-79e2", "") in new stack
<br>>><br>>><br>>><br>>> _______________________________________________<br>>> --Bandwidth and Colocation sponsored by <a href="http://Easynews.com">Easynews.com</a> <<a href="http://Easynews.com">
http://Easynews.com</a>>--<br>>><br>>> Asterisk-Users mailing list<br>>> <a href="mailto:Asterisk-Users@lists.digium.com">Asterisk-Users@lists.digium.com</a><br>>> <a href="http://lists.digium.com/mailman/listinfo/asterisk-users">
http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>>> To UNSUBSCRIBE or update options visit:<br>>> <a href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users
</a><br>>><br>><br>><br>><br>> --<br>> "Su nombre es GNU/Linux, no solamente Linux, mas info en <a href="http://www.gnu.org">http://www.gnu.org</a>"<br><br>_______________________________________________
<br>--Bandwidth and Colocation sponsored by <a href="http://Easynews.com">Easynews.com</a> --<br><br>Asterisk-Users mailing list<br><a href="mailto:Asterisk-Users@lists.digium.com">Asterisk-Users@lists.digium.com</a><br><a href="http://lists.digium.com/mailman/listinfo/asterisk-users">
http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>To UNSUBSCRIBE or update options visit:<br> <a href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users
</a><br><br></blockquote></div><br><br clear="all"><br>-- <br>"Su nombre es GNU/Linux, no solamente Linux, mas info en <a href="http://www.gnu.org">http://www.gnu.org</a>"