Live speaker detection settingsΒΆ

class UASCallChannel
class LiveSpeakerDetectionSettings

The type of live speaker detection to use, used when placing an outbound call. The default option is DEFAULT. Live speaker detection is used in conjunction with a timeout, lsd_timeout_milliseconds, which determines how long to wait for the live speaker detection algorithm to categorise the call.

Live speaker detection types:

The value below determines the point in the call at which live speaker detection is carried out, and hence from what point the lsd_timeout_milliseconds argument is measured.

DEFAULT

Use default settings to detect whether the call is answered by a live speaker or not. The timer begins as soon as the network reports that the call is connected.

TIMEOUT_FROM_NETWORK_CONNECT

The same as DEFAULT.

TIMEOUT_FROM_ANSWER_DETECT

The same as DEFAULT except that the timer begins once the call has been answered. The live speaker detection algorithm attempts to cater for automated call tones that may be generated in advance of a callee actually answering the call. For example, a common scenario is where a PBX connects then plays a ringing tone until the call is answered.

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