[asterisk-users] AGI variables being wrong

Warren Selby wcselby at selbytech.com
Thu Mar 29 12:20:44 CDT 2012


On Thu, Mar 29, 2012 at 10:10 AM, Steve Edwards
<asterisk.org at sedwards.com>wrote:

> On Thu, 29 Mar 2012, Mikhail Lischuk wrote:
>
>  I have the following line in features.conf:
>> parse => *9,peer/both,AGI,/etc/**asterisk/agi/map.pl
>>
>
> I've never invoked an AGI from 'features,' but I'll assume it's 'the same'
> as executing an AGI from the dialplan.


Neither have I.  I'd be really curious to see the entire CLI log of the
call, with verbose set to 6 and AGI debug enabled, from when the call first
comes in to when it's hung up, including the execution of the *9 feature
code.  Also, knowing which version of Asterisk and DAHDI we're dealing with
here couldn't hurt



>
>  During outgoing call, those variables get messed up.
>>
>
>  Is that some bug, or misconfiguration, or maybe wrong programming?
>>
>
> Usual 'fails' in AGIs are:
>
> 1) Not using an established AGI library. While the AGI protocol is simple,
> nobody gets it right the first time.
>
> 2) Forgetting that your AGI's STDIN and STDOUT 'belong' to Asterisk and
> printing a debugging message or something similar.
>
> 3) Not reading the AGI environment from STDIN before requesting an AGI
> command.
>
>
While I would normally completely agree with you on this, he showed in his
original example the AGI environment that is being sent to the script is
what is "wrong", not the script's handling of said environment.  To be more
specific, the agi_callerid: and the agi_dnid: variables appear to have
incorrect values for an outbound call.  My guess would be that this has to
do with calling the AGI from a features.conf feature code, and not from
within dialplan itself.

To the OP - just trying to think outside the box here, but what if instead
of calling the AGI directly from the features.conf feature code, you wrote
a Macro or GoSub that you could then use as your application, and within
the Macro / GoSub you executed your AGI?


-- 
Thanks,
--Warren Selby, dCAP
http://www.SelbyTech.com <http://www.selbytech.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20120329/620456eb/attachment.htm>


More information about the asterisk-users mailing list