Re: [Asterisk-java-users] How to identify a timeout from a BaseAgiScritcommand?
Brought to you by:
srt
From: Martin S. <ma...@be...> - 2007-09-05 18:23:26
|
Hi Rodrigo, =20 AGI scripts are like an endpoint to connect the call to. If you run a dialplan application like Dial, you've just changed who the call is connected to (no longer your script). You could potentially look at ${DIALSTATUS}, but I don't think the caller will be bridged to your script anymore, so you won't know. You probably want to use the Manager API if you want to transfer the call from your AGI script to another destination AND post-process. =20 >From http://www.voip-info.org/wiki-Asterisk+AGI:=20 =20 ----- Dialing out If the AGI application dials outward by executing Dial, control over the call returns to the dialplan and the script loses contact with the Asterisk server. The script continues to run in the background by itself and is free to clean up and do post-dial processing. =20 If you want your application to initiate a call out without being started through the dialplan: =20 * Asterisk auto-dial out Move (not copy) a file into an Asterisk spool directory and a call will be placed * Asterisk Manager API Use the Originate command. Asterisk Manager API Action Originate ----- =20 =20 =20 Martin Smith, Systems Developer ma...@be... Bureau of Economic and Business Research University of Florida (352) 392-0171 Ext. 221=20 =20 ________________________________ From: ast...@li... [mailto:ast...@li...] On Behalf Of Rodrigo Pimenta Carvalho Sent: Wednesday, September 05, 2007 1:31 PM To: ast...@li... Subject: [Asterisk-java-users] How to identify a timeout from a BaseAgiScritcommand? =09 =09 Hi people. =20 In my java code I wrote: =20 baseAgiScript.exec("Dial","SIP/300|10|r"); =20 Then, my extension 300 rings normally. Whether the call for 300 is not answered, there is a timeout after 10 seconds.=20 =20 However, how can I identify such timeout has really occurred, so that I can program an additional behavior in this case? =20 I need identify a timeout has occurred programmatically. How to codify this in asterisk-java? =20 Any hint will be very helpful. =20 Thanks. =20 Rodrigo =3D=3D=3D=3D=3D=3D=3D=3D=3D=20 |