[Freeswitch-users] How to tell if a call timed out
andrew at hijacked.us
Mon Mar 1 14:15:24 PST 2010
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
for an example. Its ugly but effective.
More information about the FreeSWITCH-users