Skip to main content

CallControlService

A list of all methods in the CallControlService service. Click on the method name to view detailed information about that method.

MethodsDescription
create_call_out_call_sessionCreates a new outbound call out session. Currently this method is supported for Softphone/Hardphone only, since device IDs for WebRTC/Mobile apps cannot be obtained.
create_conference_call_sessionInitiates a conference call session.
read_call_session_statusReturns the status of a call session by ID.
delete_call_sessionDrops a call session.
create_call_party_with_bring_inAdds a new party to the call session by bringing in an established SIP call connection. The maximum number of parties to bring in is 10; only 1 call party can be added per request. Currently, the method is supported for sessions of the Conference origin only.
read_call_party_statusReturns a call party status by ID.
update_call_partyModifies a call party by ID. There is a known limitation for Mute scenario - mute via REST API doesn't work with mute placed via RingCentral apps or HardPhone. It means that if you muted participant via Call Control API and RingCentral Desktop app you need to unmute both endpoints to bring the media back.
delete_call_partyDeletes a party from a call session by ID. A party can be deleted only if supervised or parked. It is possible to delete only one conference participant per request.
unhold_call_partyBrings a party back into a call and stops to play Hold Music. There is a known limitation for Hold API - hold via REST API doesn't work with hold placed via RingCentral apps or HardPhone. It means that if you muted participant via Call Control API and RingCentral Desktop app, then you need to un-hold both endpoints to remove Hold Music and bring media back.
call_park_partyParks a call to a virtual location from where it can further be retrieved by any user from any phone of the system. The call session and call party identifiers should be specified in path. Currently, the users can park only their own incoming calls. Up to 50 calls can be parked simultaneously. Park location starts with asterisk (*) and ranges 801-899.
call_flip_partyPerforms call flip procedure by holding opposite party and calling to the specified target
reply_partyReplies with text/pattern without picking up a call.
bridge_call_partyAllows the user to connect multiple call session participants over a conference call bridge. The current active call session ID and party ID of the user within this session should be specified in path; the bridged call session ID and party ID of the user within that session should be specified in request body. Thus, the user connects participants of two sessions into the one conference call using his/her own party IDs from both sessions."
ignore_call_in_queueIgnores a call to a call queue agent in Setup or Proceeding state.
supervise_call_partyAllows to monitor a call party in 'Listen' mode. Input parameters are extension number of a monitored user and internal identifier of a supervisor's device. Call session and party identifiers should be specified in path. Please note that for this method dual channel audio flow is supported, which means that you need to make one more request for monitoring the second participant of a call. And as a result of each monitoring request the client receives SIP invite with the following header p-rc-api-monitoring-ids containing IDs of the monitored party and session. The flow is supported for calls with no more than 2 participants. Currently, this method is supported for Softphone/Hardphone devices only, since device IDs for WebRTC/Mobile apps cannot be obtained.
reject_partyRejects an inbound call in a "Setup" or "Proceeding" state
start_call_recordingStarts a new call recording for the party
pause_resume_call_recordingPause/resume recording
answer_call_partyAnswers a call on a certain device by passing the corresponding device ID in request body. Supported for call forwarding, call transfer, call flip and call queues.
transfer_call_partyTransfers an answered call to the specified call party. Applicable for a call session in "Answered" or "Hold" state.
hold_call_partyPuts the party to stand-alone mode and starts to play Hold Music according to configuration & state to peers. There is a known limitation for Hold API - hold via REST API doesn't work with hold placed via RingCentral apps or HardPhone. It means that if you muted participant via Call Control API and RingCentral Desktop app, then you need to un-hold both endpoints to remove Hold Music and bring media back.
pickup_call_partyPicks up a call parked to the specified park location.
forward_call_partyForwards a non-answered incoming call to the specified call party. Applicable for a call session in "Setup" or "Proceeding" state.
supervise_call_sessionAllows monitoring a call session in 'Listen' mode. Input parameters should contain internal identifiers of a monitored user and a supervisor's device. Call session should be specified in path. Please note that this method supports single channel audio flow, which means that audio of both call participants is mixed and delivered to the supervisor in single audio channel. Currently this method is supported for Softphone/Hardphone only, since device IDs for WebRTC/Mobile apps cannot be obtained.

create_call_out_call_session

Creates a new outbound call out session. Currently this method is supported for Softphone/Hardphone only, since device IDs for WebRTC/Mobile apps cannot be obtained.

  • HTTP Method: POST
  • Endpoint: /restapi/v1.0/account/{accountId}/telephony/call-out

Parameters

NameTypeRequiredDescription
request_bodyMakeCallOutRequestThe request body.
account_idstrInternal identifier of the RingCentral account (can be set to "~" to indicate that the account associated with current authorization session should be used)

Return Type

CallSession

Example Usage Code Snippet

from ring_central import RingCentral, Environment
from ring_central.models import MakeCallOutRequest

sdk = RingCentral(
access_token="YOUR_ACCESS_TOKEN",
base_url=Environment.DEFAULT.value
)

request_body = MakeCallOutRequest(
from_={
"device_id": "59474004"
},
to={
"phone_number": "+16502223366",
"extension_number": "103"
},
country_id=10
)

result = sdk.call_control.create_call_out_call_session(
request_body=request_body,
account_id="~"
)

print(result)

create_conference_call_session

Initiates a conference call session.

  • HTTP Method: POST
  • Endpoint: /restapi/v1.0/account/{accountId}/telephony/conference

Parameters

NameTypeRequiredDescription
account_idstrInternal identifier of the RingCentral account (can be set to "~" to indicate that the account associated with current authorization session should be used)

Return Type

CallSession

Example Usage Code Snippet

from ring_central import RingCentral, Environment

sdk = RingCentral(
access_token="YOUR_ACCESS_TOKEN",
base_url=Environment.DEFAULT.value
)

result = sdk.call_control.create_conference_call_session(account_id="~")

print(result)

read_call_session_status

Returns the status of a call session by ID.

  • HTTP Method: GET
  • Endpoint: /restapi/v1.0/account/{accountId}/telephony/sessions/{telephonySessionId}

Parameters

NameTypeRequiredDescription
account_idstrInternal identifier of the RingCentral account (can be set to "~" to indicate that the account associated with current authorization session should be used)
telephony_session_idstrInternal identifier of a call session
timestampstrThe date and time of a call session latest change
timeoutstrThe time frame of awaiting for a status change before sending the resulting one in response

Return Type

CallSessionObject

Example Usage Code Snippet

from ring_central import RingCentral, Environment

sdk = RingCentral(
access_token="YOUR_ACCESS_TOKEN",
base_url=Environment.DEFAULT.value
)

result = sdk.call_control.read_call_session_status(
account_id="~",
telephony_session_id="telephonySessionId",
timestamp="timestamp",
timeout="timeout"
)

print(result)

delete_call_session

Drops a call session.

  • HTTP Method: DELETE
  • Endpoint: /restapi/v1.0/account/{accountId}/telephony/sessions/{telephonySessionId}

Parameters

NameTypeRequiredDescription
account_idstrInternal identifier of the RingCentral account (can be set to "~" to indicate that the account associated with current authorization session should be used)
telephony_session_idstrInternal identifier of a call session

Example Usage Code Snippet

from ring_central import RingCentral, Environment

sdk = RingCentral(
access_token="YOUR_ACCESS_TOKEN",
base_url=Environment.DEFAULT.value
)

result = sdk.call_control.delete_call_session(
account_id="~",
telephony_session_id="telephonySessionId"
)

print(result)

create_call_party_with_bring_in

Adds a new party to the call session by bringing in an established SIP call connection. The maximum number of parties to bring in is 10; only 1 call party can be added per request. Currently, the method is supported for sessions of the Conference origin only.

  • HTTP Method: POST
  • Endpoint: /restapi/v1.0/account/{accountId}/telephony/sessions/{telephonySessionId}/parties/bring-in

Parameters

NameTypeRequiredDescription
request_bodyAddPartyRequestThe request body.
account_idstrInternal identifier of the RingCentral account (can be set to "~" to indicate that the account associated with current authorization session should be used)
telephony_session_idstrInternal identifier of a call session

Return Type

CallParty

Example Usage Code Snippet

from ring_central import RingCentral, Environment
from ring_central.models import AddPartyRequest

sdk = RingCentral(
access_token="YOUR_ACCESS_TOKEN",
base_url=Environment.DEFAULT.value
)

request_body = AddPartyRequest(
session_id="sessionId",
party_id="partyId"
)

result = sdk.call_control.create_call_party_with_bring_in(
request_body=request_body,
account_id="~",
telephony_session_id="telephonySessionId"
)

print(result)

read_call_party_status

Returns a call party status by ID.

  • HTTP Method: GET
  • Endpoint: /restapi/v1.0/account/{accountId}/telephony/sessions/{telephonySessionId}/parties/{partyId}

Parameters

NameTypeRequiredDescription
account_idstrInternal identifier of the RingCentral account (can be set to "~" to indicate that the account associated with current authorization session should be used)
telephony_session_idstrInternal identifier of a call session
party_idstrInternal identifier of a call party

Return Type

CallParty

Example Usage Code Snippet

from ring_central import RingCentral, Environment

sdk = RingCentral(
access_token="YOUR_ACCESS_TOKEN",
base_url=Environment.DEFAULT.value
)

result = sdk.call_control.read_call_party_status(
account_id="~",
telephony_session_id="telephonySessionId",
party_id="partyId"
)

print(result)

update_call_party

Modifies a call party by ID. There is a known limitation for Mute scenario - mute via REST API doesn't work with mute placed via RingCentral apps or HardPhone. It means that if you muted participant via Call Control API and RingCentral Desktop app you need to unmute both endpoints to bring the media back.

  • HTTP Method: PATCH
  • Endpoint: /restapi/v1.0/account/{accountId}/telephony/sessions/{telephonySessionId}/parties/{partyId}

Parameters

NameTypeRequiredDescription
request_bodyPartyUpdateRequestThe request body.
account_idstrInternal identifier of the RingCentral account (can be set to "~" to indicate that the account associated with current authorization session should be used)
telephony_session_idstrInternal identifier of a call session
party_idstrInternal identifier of a call party

Return Type

CallParty

Example Usage Code Snippet

from ring_central import RingCentral, Environment
from ring_central.models import PartyUpdateRequest

sdk = RingCentral(
access_token="YOUR_ACCESS_TOKEN",
base_url=Environment.DEFAULT.value
)

request_body = PartyUpdateRequest(
party={
"muted": True,
"stand_alone": True
}
)

result = sdk.call_control.update_call_party(
request_body=request_body,
account_id="~",
telephony_session_id="telephonySessionId",
party_id="partyId"
)

print(result)

delete_call_party

Deletes a party from a call session by ID. A party can be deleted only if supervised or parked. It is possible to delete only one conference participant per request.

  • HTTP Method: DELETE
  • Endpoint: /restapi/v1.0/account/{accountId}/telephony/sessions/{telephonySessionId}/parties/{partyId}

Parameters

NameTypeRequiredDescription
account_idstrInternal identifier of the RingCentral account (can be set to "~" to indicate that the account associated with current authorization session should be used)
telephony_session_idstrInternal identifier of a call session
party_idstrInternal identifier of a call party

Example Usage Code Snippet

from ring_central import RingCentral, Environment

sdk = RingCentral(
access_token="YOUR_ACCESS_TOKEN",
base_url=Environment.DEFAULT.value
)

result = sdk.call_control.delete_call_party(
account_id="~",
telephony_session_id="telephonySessionId",
party_id="partyId"
)

print(result)

unhold_call_party

Brings a party back into a call and stops to play Hold Music. There is a known limitation for Hold API - hold via REST API doesn't work with hold placed via RingCentral apps or HardPhone. It means that if you muted participant via Call Control API and RingCentral Desktop app, then you need to un-hold both endpoints to remove Hold Music and bring media back.

  • HTTP Method: POST
  • Endpoint: /restapi/v1.0/account/{accountId}/telephony/sessions/{telephonySessionId}/parties/{partyId}/unhold

Parameters

NameTypeRequiredDescription
account_idstrInternal identifier of the RingCentral account (can be set to "~" to indicate that the account associated with current authorization session should be used)
telephony_session_idstrInternal identifier of a call session
party_idstrInternal identifier of a call party

Return Type

CallParty

Example Usage Code Snippet

from ring_central import RingCentral, Environment

sdk = RingCentral(
access_token="YOUR_ACCESS_TOKEN",
base_url=Environment.DEFAULT.value
)

result = sdk.call_control.unhold_call_party(
account_id="~",
telephony_session_id="telephonySessionId",
party_id="partyId"
)

print(result)

call_park_party

Parks a call to a virtual location from where it can further be retrieved by any user from any phone of the system. The call session and call party identifiers should be specified in path. Currently, the users can park only their own incoming calls. Up to 50 calls can be parked simultaneously. Park location starts with asterisk (*) and ranges 801-899.

  • HTTP Method: POST
  • Endpoint: /restapi/v1.0/account/{accountId}/telephony/sessions/{telephonySessionId}/parties/{partyId}/park

Parameters

NameTypeRequiredDescription
account_idstrInternal identifier of the RingCentral account (can be set to "~" to indicate that the account associated with current authorization session should be used)
telephony_session_idstrInternal identifier of a call session
party_idstrInternal identifier of a call party

Return Type

CallParty

Example Usage Code Snippet

from ring_central import RingCentral, Environment

sdk = RingCentral(
access_token="YOUR_ACCESS_TOKEN",
base_url=Environment.DEFAULT.value
)

result = sdk.call_control.call_park_party(
account_id="~",
telephony_session_id="telephonySessionId",
party_id="partyId"
)

print(result)

call_flip_party

Performs call flip procedure by holding opposite party and calling to the specified target

  • HTTP Method: POST
  • Endpoint: /restapi/v1.0/account/{accountId}/telephony/sessions/{telephonySessionId}/parties/{partyId}/flip

Parameters

NameTypeRequiredDescription
request_bodyCallPartyFlipThe request body.
account_idstrInternal identifier of the RingCentral account (can be set to "~" to indicate that the account associated with current authorization session should be used)
telephony_session_idstrInternal identifier of a call session
party_idstrInternal identifier of a call party

Example Usage Code Snippet

from ring_central import RingCentral, Environment
from ring_central.models import CallPartyFlip

sdk = RingCentral(
access_token="YOUR_ACCESS_TOKEN",
base_url=Environment.DEFAULT.value
)

request_body = CallPartyFlip(
call_flip_id="callFlipId"
)

result = sdk.call_control.call_flip_party(
request_body=request_body,
account_id="~",
telephony_session_id="telephonySessionId",
party_id="partyId"
)

print(result)

reply_party

Replies with text/pattern without picking up a call.

  • HTTP Method: POST
  • Endpoint: /restapi/v1.0/account/{accountId}/telephony/sessions/{telephonySessionId}/parties/{partyId}/reply

Parameters

NameTypeRequiredDescription
request_bodyCallPartyReplyThe request body.
account_idstrInternal identifier of the RingCentral account (can be set to "~" to indicate that the account associated with current authorization session should be used)
telephony_session_idstrInternal identifier of a call session
party_idstrInternal identifier of a call party

Return Type

ReplyParty

Example Usage Code Snippet

from ring_central import RingCentral, Environment
from ring_central.models import CallPartyReply

sdk = RingCentral(
access_token="YOUR_ACCESS_TOKEN",
base_url=Environment.DEFAULT.value
)

request_body = CallPartyReply(
reply_with_text="replyWithText",
reply_with_pattern={
"pattern": "WillCallYouBack",
"time": 5,
"time_unit": "Minute"
}
)

result = sdk.call_control.reply_party(
request_body=request_body,
account_id="~",
telephony_session_id="telephonySessionId",
party_id="partyId"
)

print(result)

bridge_call_party

Allows the user to connect multiple call session participants over a conference call bridge. The current active call session ID and party ID of the user within this session should be specified in path; the bridged call session ID and party ID of the user within that session should be specified in request body. Thus, the user connects participants of two sessions into the one conference call using his/her own party IDs from both sessions."

  • HTTP Method: POST
  • Endpoint: /restapi/v1.0/account/{accountId}/telephony/sessions/{telephonySessionId}/parties/{partyId}/bridge

Parameters

NameTypeRequiredDescription
request_bodyBridgeTargetRequestThe request body.
account_idstrInternal identifier of the RingCentral account (can be set to "~" to indicate that the account associated with current authorization session should be used)
telephony_session_idstrInternal identifier of a call session
party_idstrInternal identifier of a call party

Return Type

CallParty

Example Usage Code Snippet

from ring_central import RingCentral, Environment
from ring_central.models import BridgeTargetRequest

sdk = RingCentral(
access_token="YOUR_ACCESS_TOKEN",
base_url=Environment.DEFAULT.value
)

request_body = BridgeTargetRequest(
telephony_session_id="telephonySessionId",
party_id="partyId"
)

result = sdk.call_control.bridge_call_party(
request_body=request_body,
account_id="~",
telephony_session_id="telephonySessionId",
party_id="partyId"
)

print(result)

ignore_call_in_queue

Ignores a call to a call queue agent in Setup or Proceeding state.

  • HTTP Method: POST
  • Endpoint: /restapi/v1.0/account/{accountId}/telephony/sessions/{telephonySessionId}/parties/{partyId}/ignore

Parameters

NameTypeRequiredDescription
request_bodyIgnoreRequestBodyThe request body.
account_idstrInternal identifier of the RingCentral account (can be set to "~" to indicate that the account associated with current authorization session should be used)
telephony_session_idstrInternal identifier of a call session
party_idstrInternal identifier of a call party

Example Usage Code Snippet

from ring_central import RingCentral, Environment
from ring_central.models import IgnoreRequestBody

sdk = RingCentral(
access_token="YOUR_ACCESS_TOKEN",
base_url=Environment.DEFAULT.value
)

request_body = IgnoreRequestBody(
device_id="400020454008"
)

result = sdk.call_control.ignore_call_in_queue(
request_body=request_body,
account_id="~",
telephony_session_id="telephonySessionId",
party_id="partyId"
)

print(result)

supervise_call_party

Allows to monitor a call party in 'Listen' mode. Input parameters are extension number of a monitored user and internal identifier of a supervisor's device. Call session and party identifiers should be specified in path. Please note that for this method dual channel audio flow is supported, which means that you need to make one more request for monitoring the second participant of a call. And as a result of each monitoring request the client receives SIP invite with the following header p-rc-api-monitoring-ids containing IDs of the monitored party and session. The flow is supported for calls with no more than 2 participants. Currently, this method is supported for Softphone/Hardphone devices only, since device IDs for WebRTC/Mobile apps cannot be obtained.

  • HTTP Method: POST
  • Endpoint: /restapi/v1.0/account/{accountId}/telephony/sessions/{telephonySessionId}/parties/{partyId}/supervise

Parameters

NameTypeRequiredDescription
request_bodyPartySuperviseRequestThe request body.
account_idstrInternal identifier of the RingCentral account (can be set to "~" to indicate that the account associated with current authorization session should be used)
telephony_session_idstrInternal identifier of a call session
party_idstrInternal identifier of a call party

Return Type

PartySuperviseResponse

Example Usage Code Snippet

from ring_central import RingCentral, Environment
from ring_central.models import PartySuperviseRequest

sdk = RingCentral(
access_token="YOUR_ACCESS_TOKEN",
base_url=Environment.DEFAULT.value
)

request_body = PartySuperviseRequest(
mode="Listen",
supervisor_device_id="191888004",
agent_extension_id="400378008008",
auto_answer=True,
media_sdp="sendOnly"
)

result = sdk.call_control.supervise_call_party(
request_body=request_body,
account_id="~",
telephony_session_id="telephonySessionId",
party_id="partyId"
)

print(result)

reject_party

Rejects an inbound call in a "Setup" or "Proceeding" state

  • HTTP Method: POST
  • Endpoint: /restapi/v1.0/account/{accountId}/telephony/sessions/{telephonySessionId}/parties/{partyId}/reject

Parameters

NameTypeRequiredDescription
account_idstrInternal identifier of the RingCentral account (can be set to "~" to indicate that the account associated with current authorization session should be used)
telephony_session_idstrInternal identifier of a call session
party_idstrInternal identifier of a call party

Example Usage Code Snippet

from ring_central import RingCentral, Environment

sdk = RingCentral(
access_token="YOUR_ACCESS_TOKEN",
base_url=Environment.DEFAULT.value
)

result = sdk.call_control.reject_party(
account_id="~",
telephony_session_id="telephonySessionId",
party_id="partyId"
)

print(result)

start_call_recording

Starts a new call recording for the party

  • HTTP Method: POST
  • Endpoint: /restapi/v1.0/account/{accountId}/telephony/sessions/{telephonySessionId}/parties/{partyId}/recordings

Parameters

NameTypeRequiredDescription
account_idstrInternal identifier of the RingCentral account (can be set to "~" to indicate that the account associated with current authorization session should be used)
telephony_session_idstrInternal identifier of a call session
party_idstrInternal identifier of a call party

Example Usage Code Snippet

from ring_central import RingCentral, Environment

sdk = RingCentral(
access_token="YOUR_ACCESS_TOKEN",
base_url=Environment.DEFAULT.value
)

result = sdk.call_control.start_call_recording(
account_id="~",
telephony_session_id="telephonySessionId",
party_id="partyId"
)

print(result)

pause_resume_call_recording

Pause/resume recording

  • HTTP Method: PATCH
  • Endpoint: /restapi/v1.0/account/{accountId}/telephony/sessions/{telephonySessionId}/parties/{partyId}/recordings/{recordingId}

Parameters

NameTypeRequiredDescription
request_bodyCallRecordingUpdateThe request body.
account_idstrInternal identifier of the RingCentral account (can be set to "~" to indicate that the account associated with current authorization session should be used)
telephony_session_idstrInternal identifier of a call session
party_idstrInternal identifier of a call party
recording_idstrInternal identifier of a recording
brand_idstrIdentifies a brand of a logged-in user or a brand of a sign-up session

Return Type

CallRecording

Example Usage Code Snippet

from ring_central import RingCentral, Environment
from ring_central.models import CallRecordingUpdate

sdk = RingCentral(
access_token="YOUR_ACCESS_TOKEN",
base_url=Environment.DEFAULT.value
)

request_body = CallRecordingUpdate(
active=False
)

result = sdk.call_control.pause_resume_call_recording(
request_body=request_body,
account_id="~",
telephony_session_id="telephonySessionId",
party_id="partyId",
recording_id="recordingId",
brand_id="~"
)

print(result)

answer_call_party

Answers a call on a certain device by passing the corresponding device ID in request body. Supported for call forwarding, call transfer, call flip and call queues.

  • HTTP Method: POST
  • Endpoint: /restapi/v1.0/account/{accountId}/telephony/sessions/{telephonySessionId}/parties/{partyId}/answer

Parameters

NameTypeRequiredDescription
request_bodyAnswerTargetThe request body.
account_idstrInternal identifier of the RingCentral account (can be set to "~" to indicate that the account associated with current authorization session should be used)
telephony_session_idstrInternal identifier of a call session
party_idstrInternal identifier of a call party

Return Type

CallParty

Example Usage Code Snippet

from ring_central import RingCentral, Environment
from ring_central.models import AnswerTarget

sdk = RingCentral(
access_token="YOUR_ACCESS_TOKEN",
base_url=Environment.DEFAULT.value
)

request_body = AnswerTarget(
device_id="400018633008"
)

result = sdk.call_control.answer_call_party(
request_body=request_body,
account_id="~",
telephony_session_id="telephonySessionId",
party_id="partyId"
)

print(result)

transfer_call_party

Transfers an answered call to the specified call party. Applicable for a call session in "Answered" or "Hold" state.

  • HTTP Method: POST
  • Endpoint: /restapi/v1.0/account/{accountId}/telephony/sessions/{telephonySessionId}/parties/{partyId}/transfer

Parameters

NameTypeRequiredDescription
request_bodyTransferTargetThe request body.
account_idstrInternal identifier of the RingCentral account (can be set to "~" to indicate that the account associated with current authorization session should be used)
telephony_session_idstrInternal identifier of a call session
party_idstrInternal identifier of a call party

Return Type

CallParty

Example Usage Code Snippet

from ring_central import RingCentral, Environment
from ring_central.models import TransferTarget

sdk = RingCentral(
access_token="YOUR_ACCESS_TOKEN",
base_url=Environment.DEFAULT.value
)

request_body = TransferTarget(
phone_number="phoneNumber",
voicemail="voicemail",
park_orbit="parkOrbit",
extension_number="extensionNumber"
)

result = sdk.call_control.transfer_call_party(
request_body=request_body,
account_id="~",
telephony_session_id="telephonySessionId",
party_id="partyId"
)

print(result)

hold_call_party

Puts the party to stand-alone mode and starts to play Hold Music according to configuration & state to peers. There is a known limitation for Hold API - hold via REST API doesn't work with hold placed via RingCentral apps or HardPhone. It means that if you muted participant via Call Control API and RingCentral Desktop app, then you need to un-hold both endpoints to remove Hold Music and bring media back.

  • HTTP Method: POST
  • Endpoint: /restapi/v1.0/account/{accountId}/telephony/sessions/{telephonySessionId}/parties/{partyId}/hold

Parameters

NameTypeRequiredDescription
request_bodyHoldCallPartyRequestThe request body.
account_idstrInternal identifier of the RingCentral account (can be set to "~" to indicate that the account associated with current authorization session should be used)
telephony_session_idstrInternal identifier of a call session
party_idstrInternal identifier of a call party

Return Type

CallParty

Example Usage Code Snippet

from ring_central import RingCentral, Environment
from ring_central.models import HoldCallPartyRequest

sdk = RingCentral(
access_token="YOUR_ACCESS_TOKEN",
base_url=Environment.DEFAULT.value
)

request_body = HoldCallPartyRequest(
proto="Auto"
)

result = sdk.call_control.hold_call_party(
request_body=request_body,
account_id="~",
telephony_session_id="telephonySessionId",
party_id="partyId"
)

print(result)

pickup_call_party

Picks up a call parked to the specified park location.

  • HTTP Method: POST
  • Endpoint: /restapi/v1.0/account/{accountId}/telephony/sessions/{telephonySessionId}/parties/{partyId}/pickup

Parameters

NameTypeRequiredDescription
request_bodyPickupTargetThe request body.
account_idstrInternal identifier of the RingCentral account (can be set to "~" to indicate that the account associated with current authorization session should be used)
telephony_session_idstrInternal identifier of a call session
party_idstrInternal identifier of a call party

Return Type

CallParty

Example Usage Code Snippet

from ring_central import RingCentral, Environment
from ring_central.models import PickupTarget

sdk = RingCentral(
access_token="YOUR_ACCESS_TOKEN",
base_url=Environment.DEFAULT.value
)

request_body = PickupTarget(
device_id="400018633008"
)

result = sdk.call_control.pickup_call_party(
request_body=request_body,
account_id="~",
telephony_session_id="telephonySessionId",
party_id="partyId"
)

print(result)

forward_call_party

Forwards a non-answered incoming call to the specified call party. Applicable for a call session in "Setup" or "Proceeding" state.

  • HTTP Method: POST
  • Endpoint: /restapi/v1.0/account/{accountId}/telephony/sessions/{telephonySessionId}/parties/{partyId}/forward

Parameters

NameTypeRequiredDescription
request_bodyForwardTargetThe request body.
account_idstrInternal identifier of the RingCentral account (can be set to "~" to indicate that the account associated with current authorization session should be used)
telephony_session_idstrInternal identifier of a call session
party_idstrInternal identifier of a call party

Return Type

ForwardCallPartyResponse

Example Usage Code Snippet

from ring_central import RingCentral, Environment
from ring_central.models import ForwardTarget

sdk = RingCentral(
access_token="YOUR_ACCESS_TOKEN",
base_url=Environment.DEFAULT.value
)

request_body = ForwardTarget(
phone_number="phoneNumber",
voicemail="voicemail",
extension_number="extensionNumber"
)

result = sdk.call_control.forward_call_party(
request_body=request_body,
account_id="~",
telephony_session_id="telephonySessionId",
party_id="partyId"
)

print(result)

supervise_call_session

Allows monitoring a call session in 'Listen' mode. Input parameters should contain internal identifiers of a monitored user and a supervisor's device. Call session should be specified in path. Please note that this method supports single channel audio flow, which means that audio of both call participants is mixed and delivered to the supervisor in single audio channel. Currently this method is supported for Softphone/Hardphone only, since device IDs for WebRTC/Mobile apps cannot be obtained.

  • HTTP Method: POST
  • Endpoint: /restapi/v1.0/account/{accountId}/telephony/sessions/{telephonySessionId}/supervise

Parameters

NameTypeRequiredDescription
request_bodySuperviseCallSessionRequestThe request body.
account_idstrInternal identifier of the RingCentral account (can be set to "~" to indicate that the account associated with current authorization session should be used)
telephony_session_idstrInternal identifier of a call session

Return Type

SuperviseCallSessionResponse

Example Usage Code Snippet

from ring_central import RingCentral, Environment
from ring_central.models import SuperviseCallSessionRequest

sdk = RingCentral(
access_token="YOUR_ACCESS_TOKEN",
base_url=Environment.DEFAULT.value
)

request_body = SuperviseCallSessionRequest(
mode="Listen",
supervisor_device_id="191888004",
agent_extension_id="400378008008",
auto_answer=True,
media_sdp="sendOnly"
)

result = sdk.call_control.supervise_call_session(
request_body=request_body,
account_id="~",
telephony_session_id="telephonySessionId"
)

print(result)

Build Your Own SDKs with  liblab

Build developer friendly SDKs in minutes from your APIs

Start for Free →