Dial command from AGI

I want to write a standard extension script as an AGI script instead of using asterisk’s macro capability.

How do you determine if a call was answered when dialing from within a PHP AGI script (such as fwrite(STDOUT, “EXEC Dial SIP/9999@x.x.x.x”) )? In the script, the Dial application just returns whether the call was answered or not.


may not ne usefull to you, but…

I also needed alot of work done(mysql quesries/updates, custom stuff), so I did it through AGI. But I did not Dial from the AGI, I rather passed back the correct values back to the dialplan(.conf or AEL), and Dial’ed from there. Reason being, is that this is a very heavy usage box (7000 SIP users) and to help debugging and seeing how things are going, its better if you dial from the dial plan, so you can ‘follow’ calls better, because if you dial from the AGI, you miss alot of output that I am used to from the dial plan.

My 2 cents :smile: