On Feb 24, 2011, at 5:27 PM, Ron wrote:
> Hi All,
>
> I'm using the asterisk 1.4.39.2 with phpagi 2.20 I have setup a dial
plan:
>
> [callback-outbound]
> exten => _00.,1,Macro(callout|${EXTEN})
>
> [macro-callout]
> exten => s,1,AGI(getchannel.php|${ARG1})
> exten => s,2,Dial(Local/${OUTBOUND}@from-internal/nj||tr)
> exten => s,3,Hangup()
>
> but for some reason i am not receiving the argument:
> Executing [s at macro-callout:2] Dial("SIP/201-00000004",
"Local/@from-internal/nj||tr") in new stack
> [Feb 24 21:47:11] NOTICE[1901] chan_local.c: No such extension/context
@from-internal while calling Local channel
>
> the number is missing, i get the number from the agi, below is the debug:
>
> 21:47:10] -- Executing [006583232393-1-201 at callback-outbound:1]
Macro("SIP/201-00000004", "callout|006583232393-1-201") in
new stack
> 21:47:10] -- Executing [s at macro-callout:1]
AGI("SIP/201-00000004", "getchannel.php|006583232393-1-201")
in new stack
> 21:47:10] -- Launched AGI Script
/var/lib/asterisk/agi-bin/getchannel.php
> 21:47:10]AGI Tx >> agi_request: getchannel.php
> 21:47:10]AGI Tx >> agi_channel: SIP/201-00000004
> 21:47:10]AGI Tx >> agi_language: en
> 21:47:10]AGI Tx >> agi_type: SIP
> 21:47:10]AGI Tx >> agi_uniqueid: 1298555228.12
> 21:47:10]AGI Tx >> agi_callerid: unknown
> 21:47:10]AGI Tx >> agi_calleridname: unknown
> 21:47:10]AGI Tx >> agi_callingpres: 0
> 21:47:10]AGI Tx >> agi_callingani2: 0
> 21:47:10]AGI Tx >> agi_callington: 0
> 21:47:10]AGI Tx >> agi_callingtns: 0
> 21:47:10]AGI Tx >> agi_dnid: unknown
> 21:47:10]AGI Tx >> agi_rdnis: unknown
> 21:47:10]AGI Tx >> agi_context: macro-callout
> 21:47:10]AGI Tx >> agi_extension: s
> 21:47:10]AGI Tx >> agi_priority: 1
> 21:47:10]AGI Tx >> agi_enhanced: 0.0
> 21:47:10]AGI Tx >> agi_accountcode:
> 21:47:10]AGI Tx >>
> 21:47:10]AGI Rx << EXEC Noop
> 21:47:10] -- AGI Script Executing Application: (Noop) Options: ((null))
<== THIS SHOULD DISPLAY THE ARGUMENT
> 21:47:10]AGI Tx >> 200 result=0
> 21:47:11]AGI Rx << EXEC Set CALLERID(num)> 21:47:11] -- AGI
Script Executing Application: (Set) Options: (CALLERID(num)=)
> 21:47:11]AGI Tx >> 200 result=0
> 21:47:11]AGI Rx << EXEC Set OUTBOUND> 21:47:11] -- AGI Script
Executing Application: (Set) Options: (OUTBOUND=)
^^^^^^^^^^^^^^^^^ --- This
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.
/BAK/
--
Ben Klang
bklang at mojolingo.com
404.475.4841
Mojo Lingo -- Voice applications that work like magic
http://mojolingo.com
Twitter: @MojoLingo
> 21:47:11]AGI Tx >> 200 result=0
>
>
> my php code include something:
>
> #!/usr/bin/php-cgi -q
> <?php
> include('phpagi/phpagi.php');
> $agi=new AGI();
>
> $param = $argv[1];
>
> $agi -> exec(Noop,"$param");
>
> ..
> ..
> ..
> ..
> ?>
>
> not sure where to check next i'm stumped, hope somebody can help.
thanks in advance.
>
> Regards
> Ron
>
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
> http://www.asterisk.org/hello
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.digium.com/pipermail/asterisk-users/attachments/20110224/3a651a62/attachment.htm>