<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.2800.1458" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Dear All,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> Just hope your guys out there
can help me through..since I've been playing for serval hours....and still not
able to resolve it...</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> The workflow as I've created an
.call file for Asterisk to call out and it's working fine with outdial, passing
variable to asterisk..But the problem is when the calls reached Context and
execute AGI script, the script didn't get any variable from the
agi...</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> The .call as the following
(I'm using the PHP to generate the call file) :</FONT></DIV>
<DIV><FONT face=Arial size=2>
$channel="Channel:
Zap/g2/xxxx\r\n";<BR>
$channel.="Callerid: xxxx\r\n";<BR>
$channel.="Context:
autodial-agent\r\n";<BR>
$channel.="Extension: s\r\n";<BR>
$channel.="Priority: 1\r\n";<BR>
$channel.="SetVar:
AMSISDN=xxx\r\n";<BR>
$channel.="SetVar:
ADESKNUMBER=xxxx\r\n";<BR>
$channel.="SetVar:
ASTAFFNO=xxxx\r\n";<BR>
$channel.="SetVar: ADBID=xxx\r\n";<BR>
$channel.="MaxRetries: 1\r\n";<BR>
$channel.="RetryTime: 90\r\n";<BR>
$channel.="WaitTime: 60\r\n";<BR></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> The AGI Script:</FONT></DIV>
<DIV><FONT face=Arial size=2> #!/usr/bin/php -q</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> <?<BR>
require ("phpagi.php");<BR> $agi=new
AGI();<BR>
$dbid=$agi->get_var("ADBID");<BR>
$tt=$agi->set_var("Adbid1", $dbid);<BR> echo "VERBOSE DID:
$dbid";<BR> ?></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> Console:</FONT></DIV>
<DIV><FONT><FONT face=Arial size=2> -- Launched AGI Script
UpdateAutoDial.php<BR> UpdateAutoDial.php|45:
'agi_request' => 'UpdateAutoDial.php'<BR>
UpdateAutoDial.php|45: 'agi_channel' => 'Zap/1-1'<BR>
UpdateAutoDial.php|45: 'agi_language' => 'en'<BR>
UpdateAutoDial.php|45: 'agi_type' => 'Zap'<BR>
UpdateAutoDial.php|45: 'agi_uniqueid' =>
'1095233534.12'<BR> UpdateAutoDial.php|45:
'agi_callerid' => 'xxxx'<BR> UpdateAutoDial.php|45:
'agi_dnid' => 'xxxx'<BR> UpdateAutoDial.php|45:
'agi_rdnis' => 'unknown'<BR> UpdateAutoDial.php|45:
'agi_context' => 'autodial-agent'<BR>
UpdateAutoDial.php|45: 'agi_extension' => 's'<BR>
UpdateAutoDial.php|45: 'agi_priority' => '3'<BR>
UpdateAutoDial.php|45: 'agi_enhanced' => '0.0'<BR>
UpdateAutoDial.php|45: 'agi_accountcode' => ''<BR>
UpdateAutoDial.php|45: ';dig' => '/usr/bin/dig'<BR>
UpdateAutoDial.php|45: 'debug' => 'true'<BR>
UpdateAutoDial.php|45: >> GET VARIABLE ADBID<BR>
UpdateAutoDial.php|45: >> SET VARIABLE Adbid1<BR>
UpdateAutoDial.php|45: DID:<BR> -- AGI
Script UpdateAutoDial.php completed, returning 0<BR></FONT></FONT></DIV>
<DIV><FONT><FONT size=2><FONT face=Arial>
extension:</FONT></DIV></FONT></FONT>
<DIV><FONT><FONT size=2><FONT face=Arial>
[autodial-agent]</FONT></DIV></FONT></FONT>
<DIV><FONT><FONT face=Arial size=2><FONT face=ËÎÌå><FONT
face=Arial> exten =>
s,1,SetVar(agi_did=${ADBID}) <BR> exten =>
s,2,SetVar(DMSISDN=${AMSISDN})<BR> exten =>
s,3,AGI(UpdateAutoDial.php|${ADBID})<BR> exten =>
s,4,NoOp(DBID1: ${ADBID})<BR> exten =>
s,5,Hangup</FONT></FONT></FONT></FONT></DIV>
<DIV><FONT><FONT face=Arial size=2><FONT
face=ËÎÌå> </DIV></FONT></FONT></FONT>
<DIV><FONT><FONT face=Arial size=2></FONT></FONT> </DIV>
<DIV><FONT><FONT face=Arial size=2>Thanks in advances for your
help!</FONT></FONT></DIV>
<DIV><FONT><FONT face=Arial size=2></FONT></FONT> </DIV>
<DIV><FONT><FONT face=Arial size=2>Regards,</FONT></FONT></DIV>
<DIV><FONT><FONT face=Arial size=2></FONT></FONT> </DIV>
<DIV><FONT><FONT face=Arial size=2>R Wong</FONT></DIV>
<DIV><FONT face=Arial><BR><FONT size=2></FONT></FONT></DIV></FONT>
<DIV><FONT face=Arial size=2></FONT> </DIV></BODY></HTML>