wxc_sdk.telephony.call_contols_members package

class wxc_sdk.telephony.call_contols_members.CallControlsMembersApi(*, session: RestSession, base: str = None)[source]

Bases: ApiChild

Call Controls Members

Call Control Members APIs in support of Webex Calling. All GET commands require the spark-admin:calls_read scope while all other commands require the spark-admin:calls_write scope.

Notes:

These APIs support 3rd Party Call Control only.

The Call Control APIs are only for use by Webex Calling Multi Tenant users and not applicable for users hosted on UCM, including Dedicated Instance users.

answer(member_id: str, call_id: str, endpoint_id: str = None, org_id: str = None)[source]

Answer by Member ID

Answer an incoming call. When no endpointId is specified, the call is answered on the user’s primary device. When an endpointId is specified, the call is answered on the device or application identified by the endpointId. The answer API is rejected if the device is not alerting for the call or the device does not support answer via API.

Parameters:
  • member_id (str) – Unique identifier for the member. Member ID can be one of the following: person, workspace, or virtual line

  • call_id (str) – The call identifier of the call to be answered.

  • endpoint_id (str) – The ID of the device or application to answer the call on. The endpointId must be one of the endpointIds returned by the Get Preferred Answer Endpoint API.

  • org_id (str) – Id of the organization to which the member belongs. If not provided, the orgId of the Service App is used. If provided, the organization must be the same as or managed by the Service App’s organization.

Return type:

None

list_calls(member_id: str, org_id: str = None) list[TelephonyCall][source]

List Calls by Member ID

Get the list of details for all active calls associated with the member.

Parameters:
  • member_id (str) – Unique identifier for the member. Member ID can be one of the following: person, workspace, or virtual line

  • org_id (str) – Id of the organization to which the member belongs. If not provided, the orgId of the Service App is used. If provided, the organization must be the same as or managed by the Service App’s organization.

Return type:

list[TelephonyCall]

get_call_details(member_id: str, call_id: str, org_id: str = None) TelephonyCall[source]

Get Call Details by Member ID

Get the details of the specified active call for the member.

Parameters:
  • member_id (str) – Unique identifier for the member. Member ID can be one of the following: person, workspace, or virtual line

  • call_id (str) – The call identifier of the call.

  • org_id (str) – Id of the organization to which the member belongs. If not provided, the orgId of the Service App is used. If provided, the organization must be the same as or managed by the Service App’s organization.

Return type:

TelephonyCall

dial(member_id: str, destination: str, endpoint_id: str = None, single_number_reach_phone_number: str = None, org_id: str = None) CallInfo[source]

Dial by Member ID

Initiate an outbound call to a specified destination. This is also commonly referred to as Click to Call or Click to Dial. Alerts occur on all the devices belonging to a user unless an optional endpointId is specified in which case only the device or application identified by the endpointId is alerted. When a user answers an alerting device, an outbound call is placed from that device to the destination.

Parameters:
  • member_id (str) – Unique identifier for the member. Member ID can be one of the following: person, workspace, or virtual line

  • destination (str) – The destination to be dialed. The destination can be digits or a URI. Some examples for destination include: 1234, 2223334444, +12223334444, *73, tel:+12223334444, user@company.domain, and sip:user@company.domain.

  • endpoint_id (str) –

    The ID of the device or application to use for the call. The endpointId must be one of the endpointIds returned by the Get Preferred Answer Endpoint API. Mutually

    exclusive with singleNumberReachPhoneNumber.

  • single_number_reach_phone_number (str) – The Single Number Reach phone number to use for the call. Mutually exclusive with endpointId.

  • org_id (str) – Id of the organization to which the member belongs. If not provided, the orgId of the Service App is used. If provided, the organization must be the same as or managed by the Service App’s organization.

Return type:

CallInfo

hangup(member_id: str, call_id: str, org_id: str = None)[source]

Hangup by Member ID

Hangup a call. If used on an unanswered incoming call, the call is rejected and sent to busy.

Parameters:
  • member_id (str) – Unique identifier for the member. Member ID can be one of the following: person, workspace, or virtual line

  • call_id (str) – The call identifier of the call to hangup.

  • org_id (str) – Id of the organization to which the member belongs. If not provided, the orgId of the Service App is used. If provided, the organization must be the same as or managed by the Service App’s organization.

Return type:

None

base = 'telephony/calls/members'