On Thu, Mar 29, 2012 at 10:10 AM, Steve Edwards <[email protected]>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>
-- _____________________________________________________________________ -- 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
