Call statesΒΆ

class UASCallChannel
class UASCallChannel.State

The call states can be used to track the progress of a particular call. Once a call has hung up, the call cause can be checked to find the reason why.

Call states:

WAITING
waiting for an incoming call.
CALL_INCOMING
an incoming call has been detected.
RING_INCOMING
an incoming call is ringing.
ANSWERING
an incoming call is being answered.
ANSWERED
a call has been answered.
CALL_OUTGOING
an outbound call has been placed.
RING_OUTGOING
an outbound call is ringing.
HOLDING
a call is being placed on hold.
ON_HOLD
a call is on hold
TRANSFERRING
a call is being transferred
TRANSFERRED
a call has been transferred
RECONNECTING
a previously transferred call is being retrieved
ERROR
the call channel is in an error state.
IDLE
the call channel is idle, assumed to be due to a hang-up.

Usage example:

state = channel.call('sip:1234@127.0.0.1:5060;user=phone')
if state != channel.State.ANSWERED:
    # might be busy
    pass

Previous topic

Call details

Next topic

Call termination causes