start call to inbound serviceΒΆ

class UASCallChannel
start_call_inbound_service(call_to, call_from='', codecs=None)

Start a call to an inbound service name.

Required argument:
  • call_to

    the name of the inbound service, as entered on your inbound services page.

Optional arguments:
  • call_from

    the origin of this call.

  • codecs

    list of codecs to use on this call. Default is None (use the default).

This is the function used to start an outbound call to one of your existing inbound services. call_to must be a valid inbound service name; for example MyVoicemailRecorder.

An originating address call_from may be supplied. Setting this parameter to an empty string will result in a default value being used.

codecs is an optional parameter to specify a semi-colon delimited list (in priority order) of codecs to offer for the call; for example, g711a;g711u.

This function will block until the call has started, the timeout has been reached, or the call state has returned to IDLE.

This function should be called when the call state is IDLE; otherwise, it will raise an Error exception.

This function will return True on success, else False.

Usage example:

if channel.start_call_inbound_service('MyVoicemailRecorder', call_from='bob@1234') is True:
    # we have started an outbound call
    pass