check the internals of your script, the most common reason is that you are mispelling the command.
best regards
On 10/13/05, René Enskat [Teamware GmbH] <[EMAIL PROTECTED]> wrote:
Hello all,
I try to use a agi script to get a variable from * und put them into a
script which gives me another variablke and put this in *.
My problem is now it seems the var ID is empty coz i always jump into
the result 0 loop.
The $MSN should be in the SetCIDNum.
#!/usr/bin/php -q
<?php
include("/var/lib/asterisk/agi-bin/phpagi.php");
$agi = new AGI();
$ID = $agi->get_variable("SIPUSER");
if ($ID['result'] == 0) {
$agi->verbose("SIPUSER not set -- nothing to do");
exit(1);
}
$agi->set_variable("MSN", exec("/var/lib/asterisk/agi-bin/msn4sip 111
222 333 " .$ID['data']));
?>
Output from asterisk:
-- Executing SetVar("SIP/31-79e2", "SIPUSER=31") in new stack
-- Executing AGI("SIP/31-79e2", "msn4sip.agi ") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/msn4sip.agi
msn4sip.agi: Arrayn(n [code] => 510n [result] => n [data] =>
Invalid or unknown commandn)n
msn4sip.agi: SIPUSER not set -- nothing to do
-- AGI Script msn4sip.agi completed, returning 0
-- Executing SetLanguage("SIP/31-79e2", "de") in new stack
-- Executing SetCIDNum("SIP/31-79e2", "") in new stack
_______________________________________________
--Bandwidth and Colocation sponsored by Easynews.com --
Asterisk-Users mailing list
[email protected]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
--
"Su nombre es GNU/Linux, no solamente Linux, mas info en http://www.gnu.org"
_______________________________________________ --Bandwidth and Colocation sponsored by Easynews.com --
Asterisk-Users mailing list [email protected] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
