Set up Conference Callbacks Using CarrierX Portal
Most of the events associated with your partner account and your rented phone numbers (DIDs) can send callbacks. You can specify URL addresses where you have some service installed which can process these callbacks.
The callbacks contain the detailed data about the event. The data depends on the event that triggers the callback.
You can set callback URLs for four main events:
- When sending or receiving a text message (SMS or MMS),
- When making a call that engages a Mediator endpoint,
- Two events for receiving a call to a Conference endpoint: one for a conference Call object and another for a conference Meeting object,
- And when you are ordering a phone number from an external provider and you wish to be informed when such a phone number has been ordered successfully.
In this quick start guide we will see how to set up the system behavior to send callbacks when the rented phone number associated with the Conference endpoint receives calls.
I. Navigate to Callbacks Tab
- Register with CarrierX to access the API and CarrierX portal.
- Rent a phone number from CarrierX.
- Create a Conference endpoint and associate it with the rented phone number.
You can set the Conference callbacks in the Callbacks tab of the Global Settings section of CarrierX portal.
To get there, log in to the portal. On the left-side menu, locate and click the Configure menu. Click Global Settings.
Then select the Callbacks tab.
Click Edit.
Click Add Callback.
Now you can select the event type that will trigger the callback and enter the URLs for your selected callbacks.
II. Create Callbacks for Conference
Conference endpoints trigger two stages of callbacks:
-
The Conference endpoint call callback will be sent when a user calls into a conference associated with the partner account. The system sends this callback to the URL specified even before the user enters the conference meeting room once a real-time Call object is created.
-
The Conference endpoint meeting callback will be sent when a user enters a meeting room and the meeting starts. The system sends this callback to the URL specified when a real-time Meeting object is created.
Conference Call Callback
At the Callbacks tab, select the app_conference_call callback event type from the list.
Then enter the URL to your web service that is going to process the callback, e.g., https://example.com/conference-callback-url
.
Click Update to save the results.
The created callback will be available in the list of the created callbacks.
Receive and Parse App Conference Call Object
Now if you use the Conference endpoint and call the phone number associated with it, your service located at the URL you entered will receive the callback like this:
{
"address_dst": "\\"15162065515\\" \\u003csip:15162065515@11.22.33.44\\u003e",
"address_src": "\\"1234\\" \\u003csip:+17605692222@12.34.56.78",
"bridge": "conference-bridge",
"call_sid": "69057c3e-bb90-4ed3-9c53-000000001090",
"custom_call_type": "foreign",
"custom_name": "\\u00271234\\u0027",
"date_disconnected": "2021-12-14T07:08:01.000Z",
"date_insert": "2021-12-14T07:40:27.706Z",
"date_join": "2021-12-14T07:07:31.000Z",
"date_start": "2021-12-14T07:07:09.000Z",
"date_stop": "2021-12-14T07:08:01.000Z",
"direction": "inbound",
"disconnect_cause": 16,
"disconnect_originator": "src",
"disconnect_reason": "Normal",
"duration": 50,
"duration_meeting": 30,
"endpoint_sid": "e3ddc435-7b07-4f3a-98d5-4fe9be107652",
"meeting_room_sid": "f752b4a5-b821-4322-a26f-db5cfbf014ab",
"meeting_sid": "69057c3e-bb90-4ed3-9c53-000000000373",
"node": "11.22.33.44",
"number_dst": "15162065515",
"number_src": "+17605692222",
"partner_sid": "cee93bf3-5746-43fe-a1a2-822c05fef687",
"role": "participant",
"user_agent": "CX-IVS-SBC"
}
You can now parse it and use for your own purposes.
App Conference Call Fields
The object in the callback has the following fields.
Attribute | Data Type | Description |
---|---|---|
address_dst | string | The fully qualified address of the called party which includes the SIP information with special characters formatted. |
address_src | string | The fully qualified address of the calling party which includes the SIP information with special characters formatted. |
bridge | string | The name of the bridge which handled the call. |
call_sid | string | The secure ID of the call which the system uses to identify it among other calls. |
custom_call_type | string | The special field used to identify the origin of the call. Values accepted in this field are:
|
custom_name | string | The custom name for the calling party set by the software used, web, or IVR with special characters formatted. |
date_disconnected | string | The date and time when the call was disconnected from the meeting. |
date_insert | string | The date and time when the detail record about the call was inserted into the database. |
date_join | string | The date and time when the calling party joined the meeting. |
date_start | string | The date and time when the call started. |
date_stop | string | The date and time when the call ended. |
direction | string | The call direction, either inbound or outbound . |
disconnect_cause | integer | The numeric SIP code used to describe the reason to drop the call. |
disconnect_originator | string | The initiator of the disconnection. Values accepted in this field are:
|
disconnect_reason | string | The detailed descriptive information about the reason to drop the call. |
duration | number | The total call duration, specified in seconds. |
duration_meeting | number | The duration of the caller’s participation in the meeting, specified in seconds. |
endpoint_sid | string | The secure ID of the Conference endpoint associated with the call. |
meeting_room_sid | string | The secure ID of the meeting room with which the meeting is associated. This field is only available for the secured call flow type. |
meeting_sid | string | The secure ID of the meeting in which the calling party participated. |
node | string | The IP address of the bridge node. |
number_dst | string | The called party phone number. |
number_src | string | The calling party phone number. |
partner_sid | string | The secure ID of the partner with which the Conference endpoint is associated. |
role | string | The role of the calling party in the meeting. Values accepted in this field are:
|
user_agent | string | The details about the user agent used by the calling party, if available. |
Conference Meeting Callback
At the Callbacks tab, select the app_conference_meeting callback event type from the list.
Then enter the URL to your web service that is going to process the callback, e.g., https://example.com/meeting-callback-url
.
Click Update to save the results.
The created callback will be available in the list of the created callbacks.
Receive and Parse App Conference Meeting Object
Now if you use the Conference endpoint, call the phone number associated with it, enter the access code, and enter the meeting room, your service located at the URL you entered will receive the callback like this:
{
"attendee_count": 2,
"audio_attendee_count": 2,
"control_attendee_count": 0,
"data_attendee_count": 0,
"date_insert": "2021-12-14T07:40:33.843Z",
"date_start": "2021-12-14T07:04:41.000Z",
"date_stop": "2021-12-14T07:08:06.000Z",
"duration": 205,
"duration_audio": 205,
"duration_control": 0,
"duration_data": 0,
"duration_meeting": 205,
"duration_recording": 0,
"duration_video": 0,
"endpoint_sid": "e3ddc435-7b07-4f3a-98d5-4fe9be107652",
"has_recording": false,
"meeting_room_sid": "f752b4a5-b821-4322-a26f-db5cfbf014ab",
"meeting_sid": "69057c3e-bb90-4ed3-9c53-000000000373",
"partner_sid": "cee93bf3-5746-43fe-a1a2-822c05fef687",
"unique_attendee_count": 2,
"video_attendee_count": 0
}
You can now parse it and use for your own purposes.
App Conference Meeting Fields
The object in the callback has the following fields.
Attribute | Data Type | Description |
---|---|---|
attendee_count | integer | The total number of the meeting attendees. |
audio_attendee_count | integer | The number of the attendees which used audio conferencing during the meeting. |
control_attendee_count | integer | The number of the attendees which used conference controls during the meeting. |
data_attendee_count | integer | The number of the attendees which sent some data during the meeting. |
date_insert | string | The date and time when the detail record about the meeting was inserted into the database. |
date_start | string | The date and time when the meeting started. |
date_stop | string | The date and time when the meeting ended. |
duration | number | The total conference duration, measured in seconds. |
duration_audio | number | The duration of the meeting audio conferencing, measured in seconds. |
duration_control | number | The duration of the conference control usage during the meeting, measured in seconds. |
duration_data | number | The duration of the meeting during which some data was sent or received (e.g., the participants used the screensharing feature), measured in seconds. |
duration_meeting | number | The duration of the meeting, measured in seconds. |
duration_recording | number | The duration of the meeting during which the recording was made, measured in seconds. |
duration_video | number | The duration of the meeting during which the video conferencing was used, measured in seconds. |
endpoint_sid | string | The secure ID of the Conference endpoint associated with the meeting. |
has_recording | boolean | Whether or not the meeting was recorded. |
meeting_room_sid | string | The secure ID of the meeting room associated with the meeting. |
meeting_sid | string | The secure ID of the meeting which the system uses to identify it among other meetings. |
partner_sid | string | The secure ID of the partner with which the Conference endpoint is associated. |
unique_attendee_count | integer | The number of the unique attendees which took part in the meeting. |
video_attendee_count | integer | The number of the attendees which used video conferencing during the meeting. |
III. Next Steps
You successfully created callbacks for Conference endpoint events associated with your partner account.
Now you can try and use your Conference endpoint, and your web services will receive the callbacks triggered by the endpoint events.