Call transfer causesΒΆ

class UASCallChannel
class UASCallChannel.TransferCause

Calling any of the transfer functions results in one of these transfer causes being set.

Transfer causes:

NONE
no transfer cause is currently available, no transfer function has yet been called, or one has but hasn’t yet finished
NORMAL
the call was transferred successfully.
TIMEOUT
the transfer took longer than allowed to complete.
HANGUP
the call being transferred was hung up before transfer occurred.
TARGETREJECT
the transfer target rejected the call, for example it may have been busy.
TARGETHANGUP
the transfer target was hung up before transfer occurred.
FAIL
the transfer failed.

Usage example:

ret = channel.managed_transfer('sip:3301@127.0.0.1:5060;user=phone')
if res is False:
    if channel.transfer_cause() == channel.TransferCause.TARGETREJECT:
        print("Busy, try again later")

Previous topic

Call termination causes

Next topic

Live speaker detection settings