Call Parking and Connection to Parked Call (/valet_park/)

You can test API methods on the interactive API browser page and without writing code
Some of the resources described on the page may not be available by default due to the type of application (see Creating and authorizing applications).

Call parking and connection to a parking slot are performed by analogy with the resource Call Control using the resource
PUT /extension/{extension_id}/valet_park/{call_api_id}

Description of Data Structures 

Option 

Type 

Mandatory 

Description 

Option 

Type 

Mandatory 

Description 

extension_id  

string 

yes 

Identifier of the extension number 

call_api_id  

string 

yes 

Identifier of the call 

action 

string 

yes 

Action option. Possible values: parkbridge, or slots 

slot 

integer 

no 

Slot number. It is mandatory for the action park or slots 

Call Control 

To control the call, you need to make an API request PUT to the following URL, specifying the extension_id and call_api_id:
PUT /extension/{extension_id}/valet_park/{call_api_id}
The request body must contain the action option (action) and optionally the slot number (slot).  

Call Control Actions 

Action 

Description 

Action 

Description 

park 

Parking of the call. The slot number is required. The quantity of slots is equal to the possible quantity of simultaneous calls.
The parked call timeout is 3 minutes. After this time, the call returns to the extension number that parked the call 

bridge 

Connection of the current call to a random slot, if the slot is not specified, or to the specified slot, if it is explicitly specified 

slots 

The slot number is required. It clarifies UUID (part of call_api_id) that is parked there 

Example  

There is an incoming call (it may also be outgoing call) to the extension number 341 with a subscription to the event answer

213.170.66.152 - - [04/Jun/2020 13:33:10] "GET /?CalledExtension=022*341@siptest.ringme.ru& CalledExtensionID=34414&CallerExtension=022*200@siptest.ringme.ru&CallerExtensionID=32494&EventType=answer& CallID=c69226e0a64e11eaa0086fd86d94a0e0&CallerIDNum=000117443&CallerIDName=via200t&CalledDID=78123093582& CallStatus=ANSWER&CallFlow=in&CalledNumber=022*341&SubCallID=34414-c8874b88a64e11eaa0406fd86d94a0e0 &CallAPIID=3232240860-37b98fb2-a66c-11ea-ae69-6fd86d94a0e0&EventTime=1591266790576760 HTTP/1.1" 200 -

We need to remember the CallAPIID that will be used to request the PUT resource /extension/{extension_id}/valet_park/{call_api_id}. You can also get the UUID from the CallAPIID, this UUID is returned when requesting information on the slot. You may understand whether the call with this CallAPIID is still parked or not. Let's send a request: 

If the parking slot is occupied, we will receive an error message: 'slot already have parked member, slot is full'.
If the other conversation participant was put in the waiting slot, then the slot number is announced for the extension number and the conversation ends. 

On the second call (it does not matter whether it is an incoming or outgoing call), using the call call_api_id, you can immediately find out if there is someone in the slot to connect the current call to him or not if the waiting participant has left. You can see the request body within this example: 

{   "action": "slots",   "slot" : "6" }

System response: 

{   u'slot': u'6',   u'UUID': u'37b98fb2-a66c-11ea-ae69-6fd86d94a0e0' }

call_api_id of the parked call: 3232240860-37b98fb2-a66c-11ea-ae69-6fd86d94a0e0
UUID: 37b98fb2-a66c-11ea-ae69-6fd86d94a0e0
Thus, you can relate the UUID in the slot with the parked call. 

To connect the current call to a specific slot, you need to send a request with the following body: 

You can connect the current call to a random slot; in this case, you do not need to specify a slot: 

"Extension Number” Section Resources 

PUT /extension/{extension_id}/valet_park/{call_api_id} 

Update the call (park or unpark it) 

URL Options 

Name 

Type 

Name 

Type 

call_api_id 

string 

extension_id 

string 

JSON Options 

Name 

Type 

Name 

Type 

action 

string 

slot  

long 

Response Fields 

Name 

Type 

Name 

Type 

action 

string 

slot  

long