Forward an Incoming Call to Voicemail

Forward an incoming call to the voicemail of either the called party's own extension or another specified extension.

Request URL

POST {base_url}/{api_path}/call/directly_forward_to_voicemail?access_token={access_token}

Request parameters

Parameter Required Type Description
callee_channel Yes String The call channel ID of the callee.
Note: You can obtain the call channel ID in the (30011) Call State Changed event.
number Yes String The target extension number.

The call will be forward to the extension's voicemail.

Response parameters

Parameter Type Description
errcode Integer Returned error code.
  • 0: Succeed.
  • Non-zero value: Failed.
Note: You can check the error code and error message in Error Code and Error Message.
errmsg String Returned message.
  • SUCCESS: Succeed.
  • FAILURE: Failed.
call_id String The unique ID of each call.

Examples

Request example

POST /openapi/v1.0/call/directly_forward_to_voicemail?access_token=EQRuteleNDuN2q914CvJ07ua25Qo84uu HTTP/1.1

Host: yeastardocs.example.yeastarcloud.com
Content-Type: application/json
{
    "callee_channel": "PJSIP/1001-00000076",
    "number": "1000"
}

Response example

HTTP/1.1 200 OK
{
    "errcode": 0,
    "errmsg": "SUCCESS",
    "call_id": "1758505980.197"
}