Re: [Asterisk-java-devel] How to Cancel a Dial command
Brought to you by:
srt
From: Jeryes . <je...@vo...> - 2012-01-05 21:37:59
|
Hi Yves, I'm sorry, it was a little confusing... Let me try again... I'm working with fast-agi, implementing org.asterisk.java.fastagi.BaseAgiScript. Yes, I have an IVR, that receive a call (input channel) originated by some owner, the application basically plays a file and then dial to some destination, if that destination doesn't answer in 20 seconds (timeout), the IVR must dial to another one. I did that using the command Dial, and setting a timeout in that dial: int resultCode = channel.exec("Dial", "SIP/user1, *20*"); That is the way i found to establish a new outgoing connection on a channel, and then link it to the existing input channel. The problem that I am facing is to distinguish a timeout event from the disconnection of the owner, in other words, how can I differentiate when the FROM leg disconencts (sendig the CANCEL Request) from the timeout of the TO leg ou if the TO leg ignore (by replying 480, 486, 500, 503 or 603 for example) a call that is in DIALING state? Thanks for your time!!! []s Jeryes |