wxc_sdk.telephony.call_controls_members package

class wxc_sdk.telephony.call_controls_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

barge_in(member_id: str, target: str, endpoint_id: str = None, single_number_reach_phone_number: str = None, org_id: str = None) → CallInfo[source]

Barge In by Member ID

Barge-in on another user’s answered call. A new call is initiated to perform the barge-in in a similar manner to the dial command.

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

  • target (str) – Identifies the user to barge-in on. The target can be digits or a URI. Some examples for target include: 1234, 2223334444, +12223334444, tel:+12223334444, user@company.domain, sip:user@company.domain

  • endpoint_id (str) –

    The ID of the device or application to use for the barge-in. 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 barge-in. 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

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

divert(member_id: str, call_id: str, destination: str = None, to_voicemail: bool = None, org_id: str = None) → None[source]

Divert by Member ID

Divert a call to a destination or a user’s voicemail. This is also commonly referred to as a Blind Transfer.

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 divert.

  • destination (str) – The destination to divert the call to. If toVoicemail is false, destination is required. The destination can be digits or a URI. Some examples for destination include: 1234, 2223334444, +12223334444, *73, tel:+12223334444, user@company.domain, sip:user@company.domain

  • to_voicemail (bool) – If set to true, the call is diverted to voicemail. If no destination is specified, the call is diverted to the user’s own voicemail. If a destination is specified, the call is diverted to the specified user’s voicemail.

  • 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

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

call_history(member_id: str, type_: HistoryType = None, org_id: str = None) → list[CallHistoryRecord][source]

List Call History by Member ID

Get the list of call history records for the user. A maximum of 20 call history records per type (placed, missed, received) are returned.

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

  • type (HistoryType) – The type of call history records to retrieve. If not specified, then all call history records are retrieved.

  • 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[CallHistoryRecord]

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

Hold by Member ID

Hold a connected call.

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 hold.

  • 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

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

Mute by Member ID

Mute a call. This API can only be used for a call that reports itself as mute capable via the muteCapable field in the call details.

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 mute.

  • 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

park(member_id: str, call_id: str, destination: str = None, is_group_park: bool = None, org_id: str = None) → TelephonyParty[source]

Park by Member ID

Park a connected call. The number field in the response can be used as the destination for the retrieve command to retrieve the parked call.

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 park.

  • destination (str) – Identifes where the call is to be parked. If not provided, the call is parked against the parking user. The destination can be digits or a URI. Some examples for destination include: 1234, 2223334444, +12223334444, *73, tel:+12223334444, user@company.domain, sip:user@company.domain

  • is_group_park (bool) – If set to`true`, the call is parked against an automatically selected member of the user’s call park group and the destination parameter is ignored.

  • 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:

TelephonyParty

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

Pause Recording by Member ID

Pause recording on a call. Use of this API is only valid when a call is being recorded and the user’s call recording mode is set to “On Demand” or “Always with Pause/Resume”.

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 pause recording.

  • 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

pickup(member_id: str, target: str = None, endpoint_id: str = None, single_number_reach_phone_number: str = None, org_id: str = None) → CallInfo[source]

Pickup by Member ID

Picks up an incoming call to another user. A new call is initiated to perform the pickup in a similar manner to the dial command. When target is not present, the API pickups up a call from the user’s call pickup group. When target is present, the API pickups an incoming call from the specified target user.

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

  • target (str) – Identifies the user to pickup an incoming call from. If not provided, an incoming call to the user’s call pickup group is picked up. The target can be digits or a URI. Some examples for target include: 1234, 2223334444, +12223334444, tel:+12223334444, user@company.domain, sip:user@company.domain

  • endpoint_id (str) –

    The ID of the device or application to use for the pickup. 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 pickup. 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

pull(member_id: str, endpoint_id: str = None, org_id: str = None) → CallInfo[source]

Pull by Member ID

Pull a call from one device to another. A temporary new call is initiated to perform the call pull in a similar manner to the dial command. When a user answers an alerting device, the device is connected to the pulled call and the new call created for the call pull is released.

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

  • endpoint_id (str) –

    The ID of the device or application to use for the retrieval. 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:

CallInfo

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

Push by Member ID

Pushes a call from the assistant to the executive the call is associated with. Use of this API is only valid when the assistant’s call is associated with an executive.

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 push.

  • 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

reject(member_id: str, call_id: str, action: RejectAction = None, org_id: str = None) → None[source]

Reject by Member ID

Reject an unanswered incoming call.

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 rejected.

  • action (RejectAction) – The rejection action to apply to the call. The busy action is applied if no specific action is provided.

  • 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

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

Resume by Member ID

Resume a held call.

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 resume.

  • 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

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

Resume Recording by Member ID

Resume recording a call. Use of this API is only valid when a call’s recording is paused and the user’s call recording mode is set to “On Demand” or “Always with Pause/Resume”.

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 resume recording.

  • 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

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

Retrieve by Member ID

Retrieve a parked call. A new call is initiated to perform the retrieval in a similar manner to the dial command. The number field from the park command response can be used as the destination for the retrieve command.

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

  • destination (str) – Identifies where the call is parked. The number field from the park command response can be used as the destination for the retrieve command. If not provided, the call parked against the retrieving user is retrieved. The destination can be digits or a URI. Some examples for destination include: 1234, 2223334444, +12223334444, *73, tel:+12223334444, user@company.domain, sip:user@company.domain

  • endpoint_id (str) –

    The ID of the device or application to use for the retrieval. 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 retrieval. 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

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

Start Recording by Member ID

Start recording a call. Use of this API is only valid when the user’s call recording mode is set to “On Demand”.

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 start recording.

  • 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

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

Stop Recording by Member ID

Stop recording a call. Use of this API is only valid when a call is being recorded and the user’s call recording mode is set to “On Demand”.

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 stop recording.

  • 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

transfer(member_id: str, call_id1: str = None, call_id2: str = None, destination: str = None, org_id: str = None) → CallInfo[source]

Transfer by Member ID

Transfer two calls together.

Unanswered incoming calls cannot be transferred but can be diverted using the divert API.

If the user has only two calls and wants to transfer them together, the callId1 and callId2 parameters are optional and when not provided the calls are automatically selected and transferred.

If the user has more than two calls and wants to transfer two of them together, the callId1 and callId2 parameters are mandatory to specify which calls are being transferred. Those are also commonly referred to as Attended Transfer, Consultative Transfer, or Supervised Transfer and will return a 204 response.

If the user wants to transfer one call to a new destination but only when the destination responds, the callId1 and destination parameters are mandatory to specify the call being transferred and the destination.

This is referred to as a Mute Transfer and is similar to the divert API with the difference of waiting for the destination to respond prior to transferring the call. If the destination does not respond, the call is not transferred. This will return a 201 response.

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

  • call_id1 (str) – The call identifier of the first call to transfer. This parameter is mandatory if either callId2 or destination is provided.

  • call_id2 (str) – The call identifier of the second call to transfer. This parameter is mandatory if callId1 is provided and destination is not provided.

  • destination (str) – The destination to be transferred to. The destination can be digits or a URI. Some examples for destination include: 1234, 2223334444, +12223334444, tel:+12223334444, user@company.domain, sip:user@company.domain. This parameter is mandatory if callId1 is provided and callId2 is not provided.

  • 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

transmit_dtmf(member_id: str, call_id: str = None, dtmf: str = None, org_id: str = None) → None[source]

Transmit DTMF by Member ID

Transmit DTMF digits to a call.

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 transmit DTMF digits for.

  • dtmf (str) – The DTMF digits to transmit. Each digit must be part of the following set: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, *, #, A, B, C, D]. A comma “,” may be included to indicate a pause between digits. For the value “1,234”, the DTMF 1 digit is initially sent. After a pause, the DTMF 2, 3, and 4 digits are sent successively.

  • 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

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

Unmute by Member ID

Unmute a call. This API can only be used for a call that reports itself as mute capable via the muteCapable field in the call details.

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 unmute.

  • 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

set_wrapup_reasons(member_id: str, wrapup_reasons: list[str] = None, org_id: str = None) → None[source]

Set Wrap-up Reasons by Member ID

Sets wrap-up reasons for the specified member’s last completed call. This API is for admins/service apps to perform actions on behalf of a user. The request must provide wrapupReasons.

Parameters:
  • member_id (str) – Unique identifier for the member.

  • wrapup_reasons (list[str]) – Array of wrap-up reason names to apply to the agent’s last completed call.

  • org_id (str) – Organization ID.

Return type:

None

update_external_voicemail_mwi(member_id: str, action: ExternalVoicemailMwiAction, org_id: str = None) → None[source]

Set or Clear Message Waiting Indicator (MWI) Status by Member ID

Enables an external voicemail service to SET or CLEAR the Message Waiting Indicator (MWI) for a person or workspace.

Invoke the API using a bearer token from a Service App in the target organization, created by a full admin with the scope spark-admin:calls_write.

Specify the target user or workspace with the required id query parameter.

Optionally, use the orgId parameter to indicate the organization; if omitted, the Service App’s organization is used.

If orgId is provided, it must match the Service App’s organization or be a managed organization.

Set the desired action (SET or CLEAR) in the message body’s action field.

Learn more about using Webex Service Apps.

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

  • action (ExternalVoicemailMwiAction) – Indicates whether to SET or CLEAR the MWI status.

  • 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'