create tone playerΒΆ

class UASCallChannel
UASCallChannel.create_tone_player(tone_manager)

Create a tone player to play pre-defined tones. Certain types of call transfer require a tone player.

Required argument:
  • tone_manager
    a tone manager object that contains a list of known tones.

This function will create a tone player on the call channel. The tone player is exposed as a public property TonePlayer. To create a tone player we need to provide a tone manager. Please see the tone manager for more information.

The call channel requires a tone player to enable it to play tones during certain call transfers.

This function always returns True.

Usage example:

from prosody.uas import ToneManager

# create a tone manager
tone_manager = ToneManager()

# create a tone player
channel.create_tone_player(tone_manager)

# play a tone, the tone must be known to the tone manager
channel.TonePlayer.play("RINGBACK_UK")

Previous topic

transfer to inbound service

Next topic

wait for any state