(30011) Call State Changed
The PBX will send the status information of all calls to the third-party application in real-time.
Prerequisites
If you want to monitor the call status on specific trunk, make sure you have enabled the Call Status Monitor feature for the desired trunks on PBX.
For more information, see Enable Cloud One Business Communication Suite API.
Report parameters
| Parameter | Type | Description |
|---|---|---|
| type | Integer | Event ID. |
| sn | String | PBX's serial number. |
| msg | Object<Call_Info> | The detailed information of the calls. |
Call_Info
| Parameter | Type | Description |
|---|---|---|
| call_id | String | The unique ID of each call. |
| members | Array<Members> | A list of information for different types of members during the call. |
Members
| Parameter | Type | Description |
|---|---|---|
| extension | Object<Extension_Info> | The information of the extensions. |
| internal | Object<Internal_Info> | The information of the internal calls. |
| inbound | Object<Inbound_Info> | The information of the inbound calls. |
| outbound | Object<Outbound_Info> | The information of the outbound calls. |
Extension_Info
| Parameter | Type | Description |
|---|---|---|
| number | String | Extension number. |
| channel_id | String | The call channel ID of each member during the call. |
| member_status | String | The current call status of the member.
|
| call_path | String | The call path that indicates how the call is established. Note: This parameter returns the call path when the call passes through IVR, Call Flow, Queue, Ring Group, Paging/Intercom, or Conference. |
Internal_Info
| Parameter | Type | Description |
|---|---|---|
| from | String | The caller number. |
| to | String | The callee number. |
| trunk_name | String | The name of the trunk that passes the call. Note: For internal calls, this value is always empty. |
| channel_id | String | The call channel ID of each member during the call. |
| member_status | String | The current call status of the member.
|
| call_path | String | The call path that indicates how the call is established. Note: This parameter returns the call path when the call passes through IVR, Call Flow, Queue, Ring Group, Paging/Intercom, or Conference. |
Inbound_Info
| Parameter | Type | Description |
|---|---|---|
| from | String | The caller number. |
| to | String | The callee number. |
| trunk_name | String | The name of the trunk that passes the inbound call. |
| channel_id | String | The call channel ID of each member during the call. |
| member_status | String | The current call status of the member.
|
| call_path | String | The call path that indicates how the call is established. Note: This parameter returns the call path when the call passes through IVR, Call Flow, Queue, Ring Group, Paging/Intercom, or Conference. |
Outbound_Info
| Parameter | Type | Description |
|---|---|---|
| from | String | The caller number. |
| to | String | The callee number. |
| trunk_name | String | The name of the trunk that passes the outbound call. |
| channel_id | String | The call channel ID of each member during the call. |
| member_status | String | The current call status of the member.
|
| call_path | String | The call path that indicates how the call is established. Note: This parameter returns the call path when the call passes through IVR, Call Flow, Queue, Ring Group, Paging/Intercom, or Conference. |
Report example
Extension 2002 calls to an external number 5503301.
{
"type": 30011,
"sn": "3631A2124XXX",
"msg": "
{
"call_id":"1648801160.110",
"members":
[
{"extension":
{
"number":"2002",
"channel_id":"PJSIP/2002-0000004f",
"member_status":"ANSWERED",
"call_path":" "
}
},
{"outbound":
{
"from":"2002",
"to":"5503301",
"trunk_name":"peer-to-41",
"channel_id":"PJSIP/trunk-peer-to-41-endpoint-00000050",
"member_status":"ANSWER",
"call_path":" "
}
}
]
}"
}