hi
habe versucht das callbackscript von http://www.junghanns.net/asterisk/page14.html zu modifzieren
leider hab ich da wohl nen fehler leider bekomme ich keine fehlermeldung nur Executing AGI("SIP/1xxxxxx-xxxx", "callback.agi") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/callback.agi
-- AGI Script callback.agi completed, returning 0
so sieht es jetzt aus
<?php
ob_implicit_flush(true);
$stdlog = fopen("/var/log/asterisk/my_agi.log", "w");
set_time_limit(0);
$err=fopen("php://stderr","w");
$in = fopen("php://stdin","r");
while (!feof($in)) {
$temp = str_replace("\n","",fgets($in,4096));
$s = split(":",$temp);
$agi[str_replace("agi_","",$s[0])] = trim($s[1]);
if (($temp == "") || ($temp == "\n")) {
break;
}
}
$cf =
fopen("/var/spool/asterisk/outgoing/cb".$agi["callerid"],"w+");
fputs($cf,"Channel: sip/1xxxxxx/".$agi["extension"].":".$agi["callerid"]."\n");
fputs($cf,"Context: capidialtone\n");
fputs($cf,"Extension: s\n");
fputs($cf,"SetVar: CALLERIDNUM=".$agi["extension"]."\n");
fputs($cf,"MaxRetries: 2\n");
fputs($cf,"RetryTime: 10\n");
fclose($cf);
fclose($in);
fclose($err);
?>
mfg
habe versucht das callbackscript von http://www.junghanns.net/asterisk/page14.html zu modifzieren
leider hab ich da wohl nen fehler leider bekomme ich keine fehlermeldung nur Executing AGI("SIP/1xxxxxx-xxxx", "callback.agi") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/callback.agi
-- AGI Script callback.agi completed, returning 0
so sieht es jetzt aus
<?php
ob_implicit_flush(true);
$stdlog = fopen("/var/log/asterisk/my_agi.log", "w");
set_time_limit(0);
$err=fopen("php://stderr","w");
$in = fopen("php://stdin","r");
while (!feof($in)) {
$temp = str_replace("\n","",fgets($in,4096));
$s = split(":",$temp);
$agi[str_replace("agi_","",$s[0])] = trim($s[1]);
if (($temp == "") || ($temp == "\n")) {
break;
}
}
$cf =
fopen("/var/spool/asterisk/outgoing/cb".$agi["callerid"],"w+");
fputs($cf,"Channel: sip/1xxxxxx/".$agi["extension"].":".$agi["callerid"]."\n");
fputs($cf,"Context: capidialtone\n");
fputs($cf,"Extension: s\n");
fputs($cf,"SetVar: CALLERIDNUM=".$agi["extension"]."\n");
fputs($cf,"MaxRetries: 2\n");
fputs($cf,"RetryTime: 10\n");
fclose($cf);
fclose($in);
fclose($err);
?>
mfg