Re: [Asterisk-java-devel] How to Cancel a Dial command
Brought to you by:
srt
From: Yves A. <yv...@gm...> - 2012-01-05 21:59:09
|
I see. Try to implement a listener that listens to the asterisk-events. If you receive an unlink or hangup event, check, if the corresponding channel is your agi-source channel and if so, interrupt the outgoing dials, that were originated from here.. if your source channel is hung up, do not execute any commands on this channel as it would end up in an exception... regards, yves Am 05.01.2012 22:37, schrieb Jeryes .: > 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 > > > > ------------------------------------------------------------------------------ > Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex > infrastructure or vast IT resources to deliver seamless, secure access to > virtual desktops. With this all-in-one solution, easily deploy virtual > desktops for less than the cost of PCs and save 60% on VDI infrastructure > costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox > > > _______________________________________________ > Asterisk-java-devel mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/asterisk-java-devel |