Accept a Call

Accept an inbound call through the interface.

Scenario

If Control Inbound Call Accepting is enabled for the trunk on PBX web interface, PBX will send an Invite event to the application server when receiving an inbound call through the trunk. The application server has 10 seconds to decide whether to accept the call or not.

Note: If no response from the application server within 10 seconds, PBX will accept and route the call to the destination of originated inbound route.

Request URL

{base_url}/{api_path}/call/accept_inbound?token={token}

Request parameters

Parameter Required Type Description
channelid Yes String The call channel ID of each member during the call.

Response parameters

Parameter Type Description
status String Request result.
  • Success
  • Failed
callid String The unique ID of each call.

Examples

Request example
POST /api/v2.0.0/call/accept_inbound?token=623a2d1c21f69e9f7d78ce1c5ef56da5 HTTP/1.1
Content-Type:application/json; charset=utf-8
Host: 192.168.5.150

{
    "channelid": "PJSIP/trunk-siptrunk-endpoint-0000001f"
}
Response example
HTTP/1.1 200 OK
Server: Boa/0.94.14rc21
Accept-Ranges: bytes
Connection: close
Content-Type: application/json
Access-control-allow-origin: *
Access-control-allow-methods: GET, POST, OPTIONS, PUT, DELETE

{
   "status":"Success",
   "callid":"1571621890.58"
}