Relate

About Relate

Conferences allow you to relate certain participants to each other, such as muting audio between them.

Schema

Relate two participants to each other in a conference

KeyDescriptionTypeDefaultRequiredSupport Level
conference_idThe ID of the conferencestring()true
other_participantThe other participant ID to relate`string()integer()`true
participant_idThe participant ID to relate`string()integer()`true
relationshipThe relationship to establish between the two participants`string(‘deaf''clear''mute’)`clear

Usage

When a conference is active, Kazoo will return the list of current participants when the conference is queried:

curl -v -X GET \
-H "X-Auth-Token: $AUTH_TOKEN" \
http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/conferences/{CONFERENCE_ID}
{
    "auth_token": "{AUTH_TOKEN}",
    "data": {
        "_read_only": {
            "duration": 2890,
            "is_locked": false,
            "members": 2,
            "moderators": 0,
            "participants": [
                {
                    "call_id": "{CALL_ID}",
                    "caller_id_name": "{CALLER_ID_NAME}",
                    "caller_id_number": "{CALLER_ID_NUMBER}",
                    "conference_channel_vars": {
                        "energy_level": 20,
                        "floor": false,
                        "hear": true,
                        "is_moderator": false,
                        "member_ghost": false,
                        "member_id": 4,
                        "member_type": "member",
                        "mute_detect": false,
                        "see": true,
                        "speak": true,
                        "talking": false,
                        "video": false
                    },
                    "conference_name": "{CONFERENCE_ID}",
                    "conference_uuid": "{CONFERENCE_UUID}",
                    "custom_channel_vars": {
                        "account_id": "{ACCOUNT_ID}",
                        "account_name": "{ACCOUNT_NAME}",
                        "account_realm": "{SIP_REALM}",
                        "application_name": "callflow",
                        "application_node": "{APP_NODE}",
                        "authorizing_id": "{DEVICE_ID}",
                        "authorizing_type": "device",
                        "bridge_id": "{CALL_ID}",
                        "call_interaction_id": "{INTERACTION_ID}",
                        "caller_privacy_hide_name": "false",
                        "caller_privacy_hide_number": "false",
                        "caller_screen_bit": "true",
                        "callflow_id": "{CALLFLOW_ID}",
                        "channel_authorized": "true",
                        "ecallmgr_node": "{APP_NODE}",
                        "fetch_id": "{FETCH_ID}",
                        "is_conference": "true",
                        "realm": "{SIP_REALM}",
                        "username": "{SIP_USERNAME}"
                    },
                    "duration": 2877,
                    "join_time": 63676253358,
                    "participant_id": 4,
                    "switch_hostname": "{FREESWITCH_SERVER}"
                },
                {
                    "call_id": "{CALL_ID}",
                    "caller_id_name": "{CALLER_ID_NAME}",
                    "caller_id_number": "{CALLER_ID_NUMBER}",
                    "conference_channel_vars": {
                        "energy_level": 20,
                        "floor": false,
                        "hear": true,
                        "is_moderator": false,
                        "member_ghost": false,
                        "member_id": 3,
                        "member_type": "member",
                        "mute_detect": false,
                        "see": true,
                        "speak": true,
                        "talking": false,
                        "video": true
                    },
                    "conference_name": "{CONFERENCE_ID}",
                    "conference_uuid": "{CONFERENCE_UUID}",
                    "custom_channel_vars": {
                        "account_id": "{ACCOUNT_ID}",
                        "account_name": "{ACCOUNT_NAME}",
                        "account_realm": "{SIP_REALM}",
                        "application_name": "callflow",
                        "application_node": "{APP_NODE}",
                        "authorizing_id": "{DEVICE_ID}",
                        "authorizing_type": "device",
                        "bridge_id": "{CALL_ID}",
                        "call_interaction_id": "{INTERACTION_ID}",
                        "caller_privacy_hide_name": "false",
                        "caller_privacy_hide_number": "false",
                        "caller_screen_bit": "true",
                        "callflow_id": "{CALLFLOW_ID}",
                        "channel_authorized": "true",
                        "ecallmgr_node": "{APP_NODE}",
                        "fetch_id": "{FETCH_ID}",
                        "is_conference": "true",
                        "realm": "{SIP_REALM}",
                        "username": "{SIP_USERNAME}"
                    },
                    "duration": 2890,
                    "join_time": 63676253345,
                    "participant_id": 3,
                    "switch_hostname": "{FREESWITCH_SERVER}"
                }
            ]
        },
        "conference_numbers": [],
        "id": "{CONFERENCE_ID}",
        "member": {
            "join_deaf": false,
            "join_muted": false,
            "numbers": [],
            "pins": []
        },
        "moderator": {
            "join_deaf": false,
            "join_muted": false,
            "numbers": [],
            "pins": []
        },
        "name": "{CONFERENCE_NAME}",
        "play_entry_tone": true,
        "play_exit_tone": true,
        "play_name": false,
        "ui_metadata": {
            "origin": "callflows",
            "ui": "monster-ui",
            "version": "4.2-9"
        }
    },
    "node": "{CROSSBAR_NODE}",
    "request_id": "{REQUEST_ID}",
    "revision": "{REVISION}",
    "status": "success",
    "timestamp": "{TIMESTAMP}",
    "version": "{KAZOO_VERSION}"
}

data._read_only.participants contains the array of participants currently in the conference. The call_id can then be extracted to use in the /channels API to execute the relate command (or any other metaflows). The participant_id is then used in the data portion of the relate command.

On this page