Monitor a Call

If call monitor is allowed for extensions, the application server can monitor a call on specified extension by another extension.

Request URL

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

Request parameters

Parameter Required Type Description
monitor Yes Integer The monitor's extension number.
extension Yes Integer The extension number of the user who will be monitored.
type Yes String The monitor mode.
Valid values:
  • listen: The monitor can listen to a call in real time.
  • whisper: The monitor can listen to a call in real time, and talk with the monitored extension user privately.
  • barge: The monitor can listen to a call in real time and talk with both parties.

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/listen?token=3c423b4c0e7cab4e164a01523b8ac512 HTTP/1.1
Content-Type:application/json; charset=utf-8
Host: 192.168.5.150

{
    "monitor": "2023",
    "extension":"1023", 
    "type": "listen"
}
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":"1571624363.72"
}