Call far end types¶
-
class
UASCallChannel
-
class
CallFarEndType
The call connection type indicates whether the connection is probably to a live speaker or to a machine. The far end type is returned in the call details.
Call connection types:
- LIVE
probably connected to a live speaker.
- ANSWER_MACHINE
probably connected to a answering machine.
- FAX_MACHINE
probably connected to a fax machine.
- UNKNOWN
the classification could not be made in time. This is also the default setting.
If the result of the detection is ANSWER_MACHINE, you can leave a message by playing a file. However, in order for the message to be recorded correctly, you will have to wait for the answering machine’s message to complete. You can call the wait_for_answer_machine method to do this.
Usage example:
state = channel.call('sip:1234@127.0.0.1:5060;user=phone' live_speaker_detect=channel.LiveSpeakerDetectionSettings.DEFAULT) if state == channel.State.ANSWERED: # might be a fax machine if channel.Details.far_end_type == channel.CallFarEndType.FAX_MACHINE: pass
-
class