# Call Park

Manage call park functions.

## Retrieve call park server

> Retrieve call park server information.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.0"},"tags":[{"name":"Call Park","description":"Manage call park functions.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/call_park":{"get":{"tags":["Call Park"],"operationId":"showCallParkServer","summary":"Retrieve call park server","description":"Retrieve call park server information.\n","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable call park server or not.\n"},"extension_number":{"allOf":[{"type":"string","minLength":3,"maxLength":64,"pattern":"[0-9]{3,64}","description":"The extension number.\n"}],"description":"Extension number used by call park server.\n"},"recall_to":{"type":"string","enum":["USER_ONLY","USER_FIRST_THEN_RING_GROUP","RING_GROUP_ONLY"],"description":"Select how the park server forwards the call\nwhen the parked call is not picked up in the **Recall Time**.\nThe forwarding destination can be an extension or a ring group.\nCan be either:\n- `USER_ONLY`: \n- `USER_FIRST_THEN_RING_GROUP`: \n- `RING_GROUP_ONLY`:\n\nWhen set to `USER_FIRST_THEN_RING_GROUP` or `RING_GROUP_ONLY`, `ring_group_id` must also be specified.\n"},"recall_time":{"type":"integer","format":"int32","minimum":60,"maximum":900,"default":300,"description":"Set how long the call can be parked on the park server, in seconds.\nAfter this time, the park server needs to forward the call to the preset extension or ring group according to the settings.\nThe default value is 300 seconds, the minimum value is 60 seconds, and the maximum value is 900 seconds.\n"},"recall_ring_group_time":{"type":"integer","format":"int32","minimum":60,"maximum":900,"default":300,"description":"Set how long the call can be parked on the park server, in seconds.\nIf the call is not picked up after this time,\nthe park server needs to forward the call to the preset ring group according to the settings.\nThe default value is 300 seconds, the minimum value is 60 seconds, and the maximum value is 90 seconds.\n"},"ring_group_id":{"allOf":[{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of ring group.\n"}],"description":"The unique ID of ring group.\nSelect a Ring Group as the Recall destination. \nOnly valid when the value of `recall_to` is `USER_FIRST_THEN_RING_GROUP` or `RING_GROUP_ONLY`.\n"},"prompt_file_name":{"type":"string","description":"The name of the file.\n"},"prompt_file_size":{"type":"integer","format":"int64","minimum":0,"description":"The file size in bytes.\n"},"prompt_file_url":{"type":"string","readOnly":true,"description":"The relative path to file url for file downloading.\n"}}}}}},"4XX":{"description":"Error"}}}}}}
```

## Update call park server

> Update call park server<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.0"},"tags":[{"name":"Call Park","description":"Manage call park functions.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/call_park":{"post":{"tags":["Call Park"],"operationId":"updateCallParkServer","summary":"Update call park server","description":"Update call park server\n","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable call park server or not.\n"},"extension_number":{"allOf":[{"type":"string","minLength":3,"maxLength":64,"pattern":"[0-9]{3,64}","description":"The extension number.\n"}],"description":"Extension number used by call park server.\n"},"recall_to":{"type":"string","enum":["USER_ONLY","USER_FIRST_THEN_RING_GROUP","RING_GROUP_ONLY"],"description":"Select how the park server forwards the call\nwhen the parked call is not picked up in the **Recall Time**.\nThe forwarding destination can be an extension or a ring group.\nCan be either:\n- `USER_ONLY`: \n- `USER_FIRST_THEN_RING_GROUP`: \n- `RING_GROUP_ONLY`:\n\nWhen set to `USER_FIRST_THEN_RING_GROUP` or `RING_GROUP_ONLY`, `ring_group_id` must also be specified.\n"},"recall_time":{"type":"integer","format":"int32","minimum":60,"maximum":900,"default":300,"description":"Set how long the call can be parked on the park server, in seconds.\nAfter this time, the park server needs to forward the call to the preset extension or ring group according to the settings.\nThe default value is 300 seconds, the minimum value is 60 seconds, and the maximum value is 900 seconds.\n"},"recall_ring_group_time":{"type":"integer","format":"int32","minimum":60,"maximum":900,"default":300,"description":"Set how long the call can be parked on the park server, in seconds.\nIf the call is not picked up after this time,\nthe park server needs to forward the call to the preset ring group according to the settings.\nThe default value is 300 seconds, the minimum value is 60 seconds, and the maximum value is 90 seconds.\n"},"ring_group_id":{"allOf":[{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of ring group.\n"}],"description":"The unique ID of ring group.\nSelect a Ring Group as the Recall destination. \nOnly valid when the value of `recall_to` is `USER_FIRST_THEN_RING_GROUP` or `RING_GROUP_ONLY`.\n"},"prompt_file_id":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of the file.\n"}}}}}},"responses":{"200":{"description":"OK"},"4XX":{"description":"Error"}}}}}}
```

## List call park groups

> List call park groups<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.0"},"tags":[{"name":"Call Park","description":"Manage call park functions.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/call_park_groups":{"get":{"tags":["Call Park"],"operationId":"listCallParkGroups","summary":"List call park groups","description":"List call park groups\n","parameters":[{"name":"filter","in":"query","schema":{"type":"string"},"description":"Use the `filter` query parameter to retrieve just a subset of a collection.\n"},{"name":"search","in":"query","schema":{"type":"string"},"description":"Use the `search` query parameter to restrict the results of a request to match a search criterion.\n"},{"name":"orderby","in":"query","schema":{"type":"string"},"description":"Use the `orderby` query parameter to specify the sort order of the items returned from server.  \nThe default order is ascending order.\n"},{"name":"skip","in":"query","schema":{"type":"integer","format":"int32","minimum":0,"default":0},"description":"Use the `skip` query parameter to set the number of items to skip at the start of a collection.\n"},{"name":"top","in":"query","schema":{"type":"integer","format":"int32","minimum":1,"maximum":100,"default":100},"description":"Use the `top` query parameter to specify the page size of the result set.\n"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer","format":"int64","minimum":0,"description":"Total number of resource.\n"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of call park group.\n"},"name":{"type":"string","minLength":1,"maxLength":64,"description":"The name of call park group\n"},"recall_to":{"type":"string","enum":["USER_ONLY","USER_FIRST_THEN_RING_GROUP","RING_GROUP_ONLY"],"description":"Select how the park server forwards the call\nwhen the parked call is not picked up in the **Recall Time**.\nThe forwarding destination can be an extension or a ring group.\nCan be either:\n- `USER_ONLY`: \n- `USER_FIRST_THEN_RING_GROUP`: \n- `RING_GROUP_ONLY`:\n\nWhen set to `USER_FIRST_THEN_RING_GROUP` or `RING_GROUP_ONLY`, `ring_group_id` must also be specified.\n"},"ring_group_id":{"allOf":[{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of ring group.\n"}],"description":"The unique ID of ring group.\nSelect a Ring Group as the Recall destination. \nOnly valid when the value of `recall_to` is `USER_FIRST_THEN_RING_GROUP` or `RING_GROUP_ONLY`.\n"}}}}}}}}},"4XX":{"description":"Error"}}}}}}
```

## Create a call park group

> Create a new call park group.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.0"},"tags":[{"name":"Call Park","description":"Manage call park functions.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/call_park_groups":{"post":{"tags":["Call Park"],"operationId":"createCallParkGroup","summary":"Create a call park group","description":"Create a new call park group.\n","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64,"description":"The name of call park group\n"},"recall_to":{"type":"string","enum":["USER_ONLY","USER_FIRST_THEN_RING_GROUP","RING_GROUP_ONLY"],"description":"Select how the park server forwards the call\nwhen the parked call is not picked up in the **Recall Time**.\nThe forwarding destination can be an extension or a ring group.\nCan be either:\n- `USER_ONLY`: \n- `USER_FIRST_THEN_RING_GROUP`: \n- `RING_GROUP_ONLY`:\n\nWhen set to `USER_FIRST_THEN_RING_GROUP` or `RING_GROUP_ONLY`, `ring_group_id` must also be specified.\n"},"ring_group_id":{"allOf":[{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of ring group.\n"}],"description":"The unique ID of ring group.\nSelect a Ring Group as the Recall destination. \nOnly valid when the value of `recall_to` is `USER_FIRST_THEN_RING_GROUP` or `RING_GROUP_ONLY`.\n"}}}}}},"responses":{"201":{"description":"Created call park group","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of call park group.\n"}}}}}},"4XX":{"description":"Error"}}}}}}
```

## Retrieve a call park group

> Retrieves details of a call park group.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.0"},"tags":[{"name":"Call Park","description":"Manage call park functions.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/call_park_groups/{id}":{"get":{"tags":["Call Park"],"operationId":"showCallParkGroup","summary":"Retrieve a call park group","description":"Retrieves details of a call park group.\n","parameters":[{"name":"id","in":"path","required":true,"schema":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of call park group.\n"},"description":"The unique ID of the call park group.\n"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of call park group.\n"},"name":{"type":"string","minLength":1,"maxLength":64,"description":"The name of call park group\n"},"recall_to":{"type":"string","enum":["USER_ONLY","USER_FIRST_THEN_RING_GROUP","RING_GROUP_ONLY"],"description":"Select how the park server forwards the call\nwhen the parked call is not picked up in the **Recall Time**.\nThe forwarding destination can be an extension or a ring group.\nCan be either:\n- `USER_ONLY`: \n- `USER_FIRST_THEN_RING_GROUP`: \n- `RING_GROUP_ONLY`:\n\nWhen set to `USER_FIRST_THEN_RING_GROUP` or `RING_GROUP_ONLY`, `ring_group_id` must also be specified.\n"},"ring_group_id":{"allOf":[{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of ring group.\n"}],"description":"The unique ID of ring group.\nSelect a Ring Group as the Recall destination. \nOnly valid when the value of `recall_to` is `USER_FIRST_THEN_RING_GROUP` or `RING_GROUP_ONLY`.\n"}}}}}},"4XX":{"description":"Error"}}}}}}
```

## Update an call park group.

> Update an call park group.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.0"},"tags":[{"name":"Call Park","description":"Manage call park functions.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/call_park_groups/{id}":{"post":{"tags":["Call Park"],"operationId":"updateCallParkGroup","summary":"Update an call park group.","description":"Update an call park group.\n","parameters":[{"name":"id","in":"path","required":true,"schema":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of call park group.\n"},"description":"The unique ID of the call park group.\n"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64,"description":"The name of call park group\n"},"recall_to":{"type":"string","enum":["USER_ONLY","USER_FIRST_THEN_RING_GROUP","RING_GROUP_ONLY"],"description":"Select how the park server forwards the call\nwhen the parked call is not picked up in the **Recall Time**.\nThe forwarding destination can be an extension or a ring group.\nCan be either:\n- `USER_ONLY`: \n- `USER_FIRST_THEN_RING_GROUP`: \n- `RING_GROUP_ONLY`:\n\nWhen set to `USER_FIRST_THEN_RING_GROUP` or `RING_GROUP_ONLY`, `ring_group_id` must also be specified.\n"},"ring_group_id":{"allOf":[{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of ring group.\n"}],"description":"The unique ID of ring group.\nSelect a Ring Group as the Recall destination. \nOnly valid when the value of `recall_to` is `USER_FIRST_THEN_RING_GROUP` or `RING_GROUP_ONLY`.\n"}}}}}},"responses":{"200":{"description":"Updated call park group"},"4XX":{"description":"Error"}}}}}}
```

## Delete a call park group

> Delete a call park group.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.0"},"tags":[{"name":"Call Park","description":"Manage call park functions.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/call_park_groups/{id}/destroy":{"post":{"tags":["Call Park"],"operationId":"deleteCallParkGroup","summary":"Delete a call park group","description":"Delete a call park group.\n","parameters":[{"name":"id","in":"path","required":true,"schema":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of call park group.\n"},"description":"The unique ID of the call park group."}],"responses":{"204":{"description":"No Content"},"4XX":{"description":"Error"}}}}}}
```

## List call park group members

> Retrieve a collection of call park group members.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.0"},"tags":[{"name":"Call Park","description":"Manage call park functions.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/call_park_groups/{id}/members":{"get":{"tags":["Call Park"],"operationId":"listCallParkGroupMembers","summary":"List call park group members","description":"Retrieve a collection of call park group members.\n","parameters":[{"name":"id","in":"path","required":true,"schema":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of call park group.\n"},"description":"The unique ID of the call park group."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of user.\n"},"name":{"type":"string","minLength":1,"maxLength":64,"description":"The user's account name.   \nOnly letters, numbers, and the following special characters can be added: underscore, dash, single quote, and period (_, -, ', and .).   \nUsername cannot start or end with period (.).   \n`admin`, `system`, `administrator`, and `root` are reserved names for system admin only with case ignored.\n"},"display_name":{"type":"string","maxLength":1024,"description":"The display name of user.\n"},"extension_number":{"type":"string","minLength":3,"maxLength":64,"pattern":"[0-9]{3,64}","description":"The extension number.\n"}}}}}}}}},"4XX":{"description":"Error"}}}}}}
```

## Add call park group member

> Add user member into call park group.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.0"},"tags":[{"name":"Call Park","description":"Manage call park functions.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/call_park_groups/{id}/members/{extension_number}":{"post":{"tags":["Call Park"],"operationId":"createCallParkGroupMember","summary":"Add call park group member","description":"Add user member into call park group.\n","parameters":[{"name":"id","in":"path","required":true,"schema":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of call park group.\n"},"description":"The unique ID of the call park group.\n"},{"name":"extension_number","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":64,"pattern":"[0-9]{3,64}","description":"The extension number.\n"},"description":"The extension number of the member."}],"responses":{"200":{"description":"OK"},"4XX":{"description":"Error"}}}}}}
```

## Delete call park group member

> Delete a call park group member.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.0"},"tags":[{"name":"Call Park","description":"Manage call park functions.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/call_park_groups/{id}/members/{extension_number}/destroy":{"post":{"tags":["Call Park"],"operationId":"deleteCallParkGroupMember","summary":"Delete call park group member","description":"Delete a call park group member.\n","parameters":[{"name":"id","in":"path","required":true,"schema":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of call park group.\n"},"description":"The unique ID of the call park group."},{"name":"extension_number","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":64,"pattern":"[0-9]{3,64}","description":"The extension number.\n"},"description":"The extension number of the group member."}],"responses":{"204":{"description":"No Content"},"4XX":{"description":"Error"}}}}}}
```
