[asterisk-dev] AGI and DeadAGI

Matthew Nicholson mnicholson at digium.com
Tue Jul 24 14:16:44 CDT 2007


Matt Riddell wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Matthew Nicholson wrote:
>> Well, once the SIGHUP is sent, you no longer will be able to get channel 
>> variables from asterisk.  If you did something like 'EXEC Dial Zap/1' 
>> you may be able to get the DIALSTATUS from asterisk before the SIGHUP if 
>> the originating channel is still up.
>>
>> The most straight forward way to do that is just to execute a DeadAGI 
>> from the 'h' exten.
> 
> So to sum up (for 1.4 at least - does this apply to 1.2 also?):
> 
> 1. Run your AGI which looks up routing details and gets credit level
> 2. Exec Dial of technology
> 3. Finish processing of AGI and hand back to Asterisk (setting variables
> such as the 'provider you used to make the call with' as channel
> variables - will this work - i.e. will you still be able to access
> channel variables in the h extension?)
> 4. In the 'h' extension run a DeadAGI which reads in the variables
> created in (3), checks dialstatus and deducts credit/creates custom CDR.
> 
> The change that went into SVN just seemed to document a possible failure
> instead of actually preventing anything happening.  I'm guessing this
> means it has worked as above for some time and that the process I was
> (am) using to lookup credit, dial, update credit etc is only working
> because my DeadAGI script is lucky with regards to getting the DialStatus?

That sounds like it should work.  I am not sure if it is the same in 
1.2, I know the SIGHUP sending was broken (and I think the fix may have 
been reverted).

-- 
Matthew Nicholson
Digium



More information about the asterisk-dev mailing list