Invite a member to a Call

Invite a member to an established call.

Restriction

Up to 9 members are supported to be on a call simultaneously.

Request URL

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

Request parameters

Parameter Required Type Description
channel_id Yes String The call channel ID of the member that wants to invite another member.
Note: You can obtain the call channel ID in the (30011) Call Status Changed event.
number Yes String The number of the invited party.
Note: Only one member can be invited every time the API interface is called.
dial_permission No String Enter an extension number that has the desired dial permission.
Note:
  • If the number is an extension number, and you want the API interface to follow the extension visibility permission set by Client Permission on the PBX, you must enter an extension number that can view the number.
  • If the number is an external number, and the member that initiates the invitation has no outbound call permission, you should enter an extension number that has the outbound call permission.

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

Extension 2005 uses the outbound call permission of extension 2002 to invite an external member 13900000002 to an established call.

POST /openapi/v1.0/call/add_member?access_token=iT5jNGS42RRrbsr0dRz18dDN2cZtcYTz HTTP/1.1
Host: 192.168.5.150:8088
Content-Type: application/json
{
    "channel_id": "PJSIP/2005-0000007c",
    "number": "13900000002",
    "dial_permission": "2002"
}

Response example

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