Call termination causesΒΆ
- class UASCallChannel
- class Cause
Once a call has hung up the call state will return to
IDLE
and the clearing cause will be one of these.If an incoming call is rejected, a subset of these causes can be given as the cause for the rejection in the reject function.
Call clearing causes:
- TIMEOUT
a timeout has happened whilst waiting for a call event.
- ERROR
an error has caused the call to clear.
- NORMAL
a normal hang-up. This is the default value, so if the call state is not IDLE, the cause will be NORMAL.
- BUSY
the destination address acknowledged the connection request, but is unable to accept the call because it is in use.
- NOANSWER
the destination responded to the connection request, but failed to complete the connection within the prescribed time.
- UNOBTAINABLE
the destination address is unobtainable.
- CHANGED
the destination address is no longer assigned in the system.
- OUTOFORDER
the destination cannot be reached because the interface to the destination is not functioning correctly and a signalling message cannot be delivered to the remote equipment. It may be a temporary condition, but it could last for an extended period of time. It may indicate that the remote equipment is turned off.
- BARRED
the destination cannot be reached because incoming calls are barred.
- REJECTED
the destination is capable of accepting the call and is not busy. The call is rejected for an unknown reason.
- NOCHANNELS
there are no appropriate circuits/channels presently available to handle the call.
- CONGESTION
the destination cannot be reached because the network is experiencing a period of high traffic.
- FAILED
the call failed. A raw cause is indicated in
CallChannel.Details.raw_cause
.- OTHER
the call cleared for an undefined reason. A raw cause is indicated in
CallChannel.Details.raw_cause
.
Usage example:
state = channel.call('sip:3301@127.0.0.1:5060;user=phone') if state != channel.State.ANSWERED: if channel.cause() == channel.Cause.BUSY: print("Busy, try again")