wxc_sdk.me.calls package
- class wxc_sdk.me.calls.MeCallControlApi(*, session: RestSession, base: str = None)[source]
Bases:
ApiChildCall Controls Members Me
Call Control Me APIs in support of Webex Calling. All GET commands require the spark:calls_read scope while all other commands require the spark: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.
The Call Control APIs are not supported by Service Apps. Please see Call Control Members APIs for Service Apps
support.
- answer(call_id: str, endpoint_id: str = None, line_owner_id: str = None) None[source]
Answer
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:
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.
line_owner_id (str) – The ID of a user, workspace, or virtual line for which there is a secondary line on a device owned by the user invoking the API.
- Return type:
None
- list_calls(line_owner_id: str = None) list[TelephonyCall][source]
List Calls
Get the list of details for all active calls associated with the user.
- Parameters:
line_owner_id (str) – The ID of a user, workspace, or virtual line for which there is a secondary line on a device owned by the user invoking the API.
- Return type:
list[TelephonyCall]
- call_details(call_id: str, line_owner_id: str = None) TelephonyCall[source]
Get Call Details
Get the details of the specified active call for the user.
- Parameters:
call_id (str) – The call identifier of the call.
line_owner_id (str) – The ID of a user, workspace, or virtual line for which there is a secondary line on a device owned by the user invoking the API.
- Return type:
TelephonyCall
- dial(destination: str, endpoint_id: str = None, single_number_reach_phone_number: str = None, line_owner_id: str = None) CallInfo[source]
Dial
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:
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.
line_owner_id (str) – The ID of a user, workspace, or virtual line for which there is a secondary line on a device owned by the user invoking the API.
- Return type:
CallInfo
- hangup(call_id: str, line_owner_id: str = None) None[source]
Hangup
Hangup a call. If used on an unanswered incoming call, the call is rejected and sent to busy.
- Parameters:
call_id (str) – The call identifier of the call to hangup.
line_owner_id (str) – The ID of a user, workspace, or virtual line for which there is a secondary line on a device owned by the user invoking the API.
- Return type:
None
- base = 'telephony/calls/members/me'