<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<br>
<br>
On 2/24/2011 9:10 PM, Ben Klang wrote:
<blockquote
cite="mid:96932A0B-8904-41BA-8595-3ABF572B460B@mojolingo.com"
type="cite">
<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;
font-size: medium;">
<div>
<div>Ben Klang</div>
<div><a moz-do-not-send="true"
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 moz-do-not-send="true"
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
moz-do-not-send="true" 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 moz-do-not-send="true"
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 moz-do-not-send="true"
href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
</div>
</blockquote>
</div>
<br>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by <a class="moz-txt-link-freetext" href="http://www.api-digital.com">http://www.api-digital.com</a> --
New to Asterisk? Join us for a live introductory webinar every Thurs:
<a class="moz-txt-link-freetext" href="http://www.asterisk.org/hello">http://www.asterisk.org/hello</a>
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
<a class="moz-txt-link-freetext" href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</a></pre>
</blockquote>
<br>
Hi,<br>
<br>
Just my 2 cents...Did you try "," instead "|" in
AGI(getchannel.php|${ARG1})?<br>
<br>
Regards<br>
</body>
</html>