I'm using the originate command from Erlang, specifying a timeout of 30 seconds. It is properly giving up on dialing, but it's still returning a call UUID instead of an error/timed out status. How can I query Freeswitch to determine whether the call was answered or timed out, without resorting to the event interface? (I could put together a dialplan that calls the event interface after doing the originate, but from what I've seen that event interface won't execute if the previous command "fails", such as when I did a play_and_get_digits timing out.) -- Mark Sobkow Senior Developer MarkeTel Multi-Line Dialing Systems LTD. 428 Victoria Ave Regina, SK S4N-0P6 Toll-Free: 800-289-8616-X533 Local: 306-359-6893-X533 Fax: 306-359-6879 Email: m.sobkow@marketelsystems.com Web: http://www.marketelsystems.com
On Mon, Mar 01, 2010 at 03:34:15PM -0600, Mark Sobkow wrote:
I'm using the originate command from Erlang, specifying a timeout of 30 seconds. It is properly giving up on dialing, but it's still returning a call UUID instead of an error/timed out status.
How are you doing an originate, and what 'UUID' are you getting back? The way I do it is I do an bgapi originate with origination_uuid set and I poll for that UUID 10 times every 100 milliseconds to see if its up. Even if you originate a channel that's going to ring out the channel will be up for that period and so you can connect to it and receive the HANGUP event with the cause code to see what happened. See the init() function in http://github.com/Vagabond/OpenACD/blob/master/src/freeswitch_ring.erl for an example. Its ugly but effective. Andrew
participants (2)
-
Andrew Thompson
-
Mark Sobkow