<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Feb 24, 2011, at 5:27 PM, Ron wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Hi All,<br><br>I'm using the asterisk 1.4.39.2 with phpagi 2.20 I have setup a dial plan:<br><br>[callback-outbound]<br>exten => _00.,1,Macro(callout|${EXTEN})<br><br>[macro-callout]<br>exten => s,1,AGI(getchannel.php|${ARG1})<br>exten => s,2,Dial(Local/${OUTBOUND}@from-internal/nj||tr)<br>exten => s,3,Hangup()<br><br>but for some reason i am not receiving the argument:<br>Executing [s@macro-callout:2] Dial("SIP/201-00000004", "Local/@from-internal/nj||tr") in new stack<br>[Feb 24 21:47:11] NOTICE[1901] chan_local.c: No such extension/context @from-internal while calling Local channel<br><br>the number is missing, i get the number from the agi, below is the debug:<br><br>21:47:10] -- Executing [006583232393-1-201@callback-outbound:1] Macro("SIP/201-00000004", "callout|006583232393-1-201") in new stack<br>21:47:10] -- Executing [s@macro-callout:1] AGI("SIP/201-00000004", "getchannel.php|006583232393-1-201") in new stack<br>21:47:10] -- Launched AGI Script /var/lib/asterisk/agi-bin/getchannel.php<br>21:47:10]AGI Tx >> agi_request: getchannel.php<br>21:47:10]AGI Tx >> agi_channel: SIP/201-00000004<br>21:47:10]AGI Tx >> agi_language: en<br>21:47:10]AGI Tx >> agi_type: SIP<br>21:47:10]AGI Tx >> agi_uniqueid: 1298555228.12<br>21:47:10]AGI Tx >> agi_callerid: unknown<br>21:47:10]AGI Tx >> agi_calleridname: unknown<br>21:47:10]AGI Tx >> agi_callingpres: 0<br>21:47:10]AGI Tx >> agi_callingani2: 0<br>21:47:10]AGI Tx >> agi_callington: 0<br>21:47:10]AGI Tx >> agi_callingtns: 0<br>21:47:10]AGI Tx >> agi_dnid: unknown<br>21:47:10]AGI Tx >> agi_rdnis: unknown<br>21:47:10]AGI Tx >> agi_context: macro-callout<br>21:47:10]AGI Tx >> agi_extension: s<br>21:47:10]AGI Tx >> agi_priority: 1<br>21:47:10]AGI Tx >> agi_enhanced: 0.0<br>21:47:10]AGI Tx >> agi_accountcode:<br>21:47:10]AGI Tx >><br>21:47:10]AGI Rx << EXEC Noop<br>21:47:10] -- AGI Script Executing Application: (Noop) Options: ((null)) <== THIS SHOULD DISPLAY THE ARGUMENT<br>21:47:10]AGI Tx >> 200 result=0<br>21:47:11]AGI Rx << EXEC Set CALLERID(num)=<br>21:47:11] -- AGI Script Executing Application: (Set) Options: (CALLERID(num)=)<br>21:47:11]AGI Tx >> 200 result=0<br>21:47:11]AGI Rx << EXEC Set OUTBOUND=<br>21:47:11] -- AGI Script Executing Application: (Set) Options: (OUTBOUND=)<br></div></blockquote><div> ^^^^^^^^^^^^^^^^^ --- This</div><div><br></div><div>You are relying on the channel variable ${OUTBOUND} to be set when you invoke the Dial() string, but the AGI script is not setting OUTBOUND correctly. In both cases you illustrate (the Noop and the Set) the variable isn't making it from PHP to AGI. Check your PHP script to make sure the data is what you think it is.</div><div><br></div><div>/BAK/</div><div>-- </div><div><div><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div><div>Ben Klang</div><div><a href="mailto:bklang@mojolingo.com">bklang@mojolingo.com</a></div><div>404.475.4841</div><div><br></div><div>Mojo Lingo -- <i>Voice applications that work like magic</i></div><div><a href="http://mojolingo.com/">http://mojolingo.com</a></div></div><div>Twitter: @MojoLingo</div><div><br></div></span></div></div><br><blockquote type="cite"><div>21:47:11]AGI Tx >> 200 result=0<br><br><br>my php code include something:<br><br>#!/usr/bin/php-cgi -q<br><?php<br>include('phpagi/phpagi.php');<br>$agi=new AGI();<br><br>$param = $argv[1];<br><br>$agi -> exec(Noop,"$param");<br><br>..<br>..<br>..<br>..<br>?><br><br>not sure where to check next i'm stumped, hope somebody can help. thanks in advance.<br><br>Regards<br>Ron<br><br><br>--<br>_____________________________________________________________________<br>-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com">http://www.api-digital.com</a> --<br>New to Asterisk? Join us for a live introductory webinar every Thurs:<br> <a href="http://www.asterisk.org/hello">http://www.asterisk.org/hello</a><br><br>asterisk-users mailing list<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></div></blockquote></div><br></body></html>