transfer to conferenceΒΆ

class UASCallChannel
transfer_to_conference_room(other_call, conference_room_name, talker_and_listener=True, conference_lifetime_control=None, conference_party_media_settings=None, seconds_timeout=120)

Perform a retrievable transfer of an existing call to a named conference room.

Required argument:
  • other_call

    the call channel instance to be used for the outbound leg to the conference room.

  • conference_room_name

    the name of the conference room to which to add this party

Optional arguments:
  • talker_and_listener:

    whether the party is allowed to talk, as well as listen, in the conference. Default is True.

  • conference_lifetime_control:

    whether the conference should start/end when this party enters/leaves.

  • conference_party_media_settings:

    file and TTS play options, mute options.

  • seconds_timeout:

    the amount of time to wait before the party enters the conference room and the transfer is accomplished. Default is 120 seconds. None means no timeout.

This function is used to transfer a connected call channel to a named conference room, in which parties can talk with each other subject to the arguments, e.g. talker_and_listener provided when each entered.

The argument conference_room_name is the name of the conference room to which to add this party. If the conference room does not exist when this function is called, it will be created. When choosing a name for the conference room, it is strongly advised to choose a new name for each new conference. This avoids various potential issues, for example the case where a caller stays in one conference longer than expected and is suddenly introduced into a supposedly new conference as new callers ring in. The name is a string containing only alpha-numeric characters. It uniquely describes the conference room in the Cloud. Thus, all parties who wish to join a given conference must supply the same conference_room_name, and parties joining other conferences must supply different conference_room_name values.

The argument conference_lifetime_control controls whether the conference starts or stops when this party joins and leaves.

The argument conference_party_media_settings defines the audio that will be played to the conference at various times.

The argument seconds_timeout is the amount of time allowed for the transfer to be completed. If the timeout is None, no time limit will be imposed.

When this function is called, a new outbound call is placed to the named conference room. The call will ring until the conference is started; or until timeout expires or the original call hangs up. Once the conference starts (or if it has already started) the call is answered and the party is transferred to the conference.

This function will block until the call has been successfully transferred to the conference, the call had hung up or seconds_timeout has expired.

The transfer to the conference room is a retrievable transfer which means that the call will be retrieved when it leaves the conference room.

After the transfer has completed successfully, this channel cannot be used to play or record audio (the audio path is no longer available, it has been transferred), it can be used only to hang up the call or to call either the retrieve_transferred_call function or the wait_for_transferred_call_retrieval function.

This function will return the channel state.

Usage example:

conf_media_settings = channel.ConferencePartyMediaSettings(exit_on_dtmf_digit='#')
conf_media_settings.MuteOnDTMFDigits.set_digits(mute='0', unmute='1')
conf_media_settings.PrefixMedia.text_to_say('george')
conf_media_settings.OnEntryMedia.text_to_say('has joined')
conf_media_settings.OnExitMedia.text_to_say('has left')

conf_lifetime_settings = channel.ConferenceLifetimeControl(start_on_entry=True, destroy_on_exit=True)

if channel.transfer_to_conference_room(other_call, conference_room_name,
                                       conference_lifetime_control=conf_lifetime_settings,
                                       conference_party_media_settings=conf_media_settings) != channel.State.TRANSFERRED:
    print("could not transfer the call to the conference")
else:
    channel.wait_for_transferred_call_retrieval()