<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.5764" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=437303520-09062009><FONT face=Arial size=2>Boa tarde colegas da
lista,</FONT></SPAN></DIV>
<DIV><SPAN class=437303520-09062009><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=437303520-09062009> <FONT face=Arial
size=2>Estou configurando a facilidade de callback num asterisk
1.4.22.1, usando o arquivo callback.agi, numa placa GSM com capacidade
de quatro chips da Khomp.</FONT></SPAN></DIV>
<DIV><SPAN class=437303520-09062009> <FONT face=Arial
size=2>Gostaria de que a aplicação callback fizesse a ligação entre um ramal sip
8000 e o numero do celular do originador da chamada no caso 04299999999,
porem nao estou conseguindo.</FONT></SPAN></DIV>
<DIV><SPAN class=437303520-09062009> </SPAN></DIV>
<DIV><SPAN class=437303520-09062009> <FONT face=Arial size=2>O erro
a seguir é um exemplo do meu problema: </FONT></SPAN></DIV>
<DIV><SPAN class=437303520-09062009><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr style="MARGIN-RIGHT: 0px"><SPAN
class=437303520-09062009> <FONT
face=Arial size=2>-- Executing [s@default:1] NoOp("Khomp/B0C0-1", "04299999999")
in new stack<BR> -- Executing
[s@default:2] AGI("Khomp/B0C0-1", "callback.agi") in new
stack<BR> -- Launched AGI Script
/var/lib/asterisk/agi-bin/callback.agi<BR> --
AGI Script callback.agi completed, returning
0<BR> -- Executing [s@default:3]
Hangup("Khomp/B0C0-1", "") in new
stack<BR> == Spawn
extension (default, s, 3) exited non-zero on
'Khomp/B0C0-1'<BR> -- Attempting call
on khomp/gtim/04299999999 for <A href="mailto:s@khompcb:1">s@khompcb:1</A>
(Retry 1)<BR> [Jun 9 14:12:29] NOTICE[2682]:
pbx_spool.c:355 attempt_thread: Call failed to go through, reason (3) Remote end
Ringing<BR> debian*CLI><BR></FONT></SPAN></DIV>
<DIV dir=ltr style="MARGIN-RIGHT: 0px"><SPAN class=437303520-09062009><FONT
face=Arial size=2>Meu arquivo callback.agi esta assim:</FONT></SPAN></DIV>
<DIV dir=ltr style="MARGIN-RIGHT: 0px"><SPAN class=437303520-09062009><FONT
face=Arial size=2></FONT></SPAN> </DIV>
<DIV dir=ltr style="MARGIN-RIGHT: 0px"><SPAN class=437303520-09062009><FONT
face=Arial size=2>#!/usr/bin/php -q<BR><?php</FONT></SPAN></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr style="MARGIN-RIGHT: 0px"><SPAN class=437303520-09062009><FONT
face=Arial
size=2>ob_implicit_flush(true);<BR>set_time_limit(0);<BR>$err=fopen("php://stderr","w");<BR>$in
= fopen("php://stdin","r");<BR>while (!feof($in)) {<BR>$temp =
str_replace("\n","",fgets($in,4096));<BR>$s =
split(":",$temp);<BR>$agi[str_replace("agi_","",$s[0])] = trim($s[1]);<BR>if
(($temp == "") || ($temp == "\n")) {<BR>break;<BR>}<BR>}<BR>$cf
=<BR>fopen("/var/spool/asterisk/outgoing/cb".$agi["callerid"],"w+");<BR>fputs($cf,"Channel:
khomp/gtim/".$agi["callerid"]."\n");<BR>fputs($cf,"Context:
khompcb\n");<BR>fputs($cf,"Extension: s\n");<BR>fputs($cf,"SetVar:
CALLERIDNUM=".$agi["extension"]."\n");<BR>fputs($cf,"MaxRetries:
1\n");<BR>fputs($cf,"RetryTime:
10\n");<BR>fclose($cf);<BR>fclose($in);<BR>fclose($err);</FONT></SPAN></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr style="MARGIN-RIGHT: 0px"><SPAN class=437303520-09062009><FONT
face=Arial size=2>?></FONT></SPAN></DIV>
<DIV dir=ltr style="MARGIN-RIGHT: 0px"><SPAN
class=437303520-09062009></SPAN> </DIV>
<DIV dir=ltr style="MARGIN-RIGHT: 0px"><SPAN class=437303520-09062009><FONT
face=Arial size=2>Desde ja muito obrigado pela ajuda.</FONT></SPAN></DIV>
<DIV dir=ltr style="MARGIN-RIGHT: 0px"><SPAN class=437303520-09062009><FONT
face=Arial size=2>Jeferson Oliveira.</DIV></FONT></SPAN></BODY></HTML>