for some reason your script is not executing the get_var correctly, as
you 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 mispelling the command.<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;">
<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> --<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></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>"