[asterisk-users] missing argument on AGI

Ron nhadie at gmail.com
Thu Feb 24 16:27:18 CST 2011


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=)
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




More information about the asterisk-users mailing list