Configuring Conferences

About Conferences

Conference documents are enriched with real-time information along side their configuration, namely showing the number of members, number of moderators, duration of the conference, conference locked status.

The real-time information (if available) is added to conference document under the _read_only key (to avoid accidental document update).

Schema

Schema for conferences

KeyDescriptionTypeDefaultRequiredSupport Level
allow_shareable_linkIndicates if the conference is reachable using a public linkboolean()falsefalse
base_profile_namename of base profilestring()false
bridge_passwordthe password used for a conference bridgestring()false
bridge_usernamethe username used for a conference bridgestring()false
caller_controlscaller controls (config settings)string()false
conference_numbers.[]string()false
conference_numbersDefines conference numbers that can be used by members or moderatorsarray(string())[]false
controlscontrolsobject()false
domaindomainstring()false
flags.[]string()falsesupported
flagsFlags set by external applicationsarray(string())falsesupported
focusThis is a read-only property indicating the media server hosting the conferencestring()false
languagePrompt language to play in the conferencestring()false
max_members_mediaMedia to play when the conference is fullstring()false
max_participantsThe maximum number of participants that can joininteger()false
member.join_deafDetermines if a member will join deafboolean()falsefalsesupported
member.join_mutedDetermines if a member will join mutedboolean()truefalsesupported
member.numbers.[]string()false
member.numbersDefines the conference (call in) number(s) for membersarray(string())[]false
member.pins.[]string()false
member.pinsDefines the pin number(s) for membersarray(string())[]false
member.play_entry_promptWhether to play the entry prompt on member joinboolean()false
memberDefines the discovery (call in) properties for a memberobject(){}false
moderator.join_deafDetermines if a moderator will join deafboolean()falsefalse
moderator.join_mutedDetermines if a moderator will join mutedboolean()falsefalse
moderator.numbers.[]string()false
moderator.numbersDefines the conference (call in) number(s) for moderatorsarray(string())[]false
moderator.pins.[]string()false
moderator.pinsDefines the pin number(s) for moderatorsarray(string())[]false
moderatorDefines the discovery (call in) properties for a moderatorobject(){}false
moderator_controlsprofile on the switch for controlling the conference as a moderatorstring()false
nameA friendly name for the conferencestring(1..128)truesupported
owner_idThe user ID who manages this conferencestring(32)falsesupported
play_entry_toneWhether to play an entry tone, or the entry tone to play`boolean()string()`false
play_exit_toneWhether to play an exit tone, or the exit tone to play`boolean()string()`false
play_nameDo we need to announce new conference members?boolean()falsefalse
play_welcomeWhether to play the welcome promptboolean()false
profileProfile configurationobject()false
profile_nameconference profile namestring()false
require_moderatordoes the conference require a moderatorboolean()false
videoIf false, video participants will join with video mutedboolean()false
wait_for_moderatorshould members wait for a moderator before joining the conferenceboolean()false

conferences.profile

Schema for conference profiles

KeyDescriptionTypeDefaultRequiredSupport Level
alone-soundAudio that plays while you are alone in the conferencestring()false
announce-countPlay member count to conference when above this thresholdinteger()false
caller-controlsName of the caller control groupstring()false
comfort-noiseThe volume level of background white noiseinteger(0..10000)false
energy-levelEnergy level required for audio to be sent to other usersinteger(0..1800)false
enter-soundAudio to play when entering a conferencestring()false
exit-soundAudio to play when exiting a conferencestring()false
intervalMilliseconds per frameinteger(10..120)false
locked-soundAudio to play when the conference is lockedstring()false
max-membersSet the maximum number of members in the conferenceinteger(2..)false
max-members-soundIf max-members has been reached, audio to play to caller instead of joining the conferencestring()false
moderator-controlsName of the moderator control group to usestring()false
moh-soundAudio to play, on a loop, while participant count is 1string()false
muted-soundAudio to play when mutedstring()false
rateAudio sample rateinteger()false
unmuted-soundAudio to play when unmutedstring()false

Keys under development

  • require_moderator
  • wait_for_moderator

Perform an action on a conference

PUT /v2/accounts/{ACCOUNT_ID}/conferences/{CONFERENCE_ID}

curl -v -X PUT \
    -d '{"action": "{CONFERENCE_ACTION}", "data": {"ACTION":"DATA"}}' \
    -H "X-Auth-Token: {AUTH_TOKEN}" \
    http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/conferences/{CONFERENCE_ID}
ActionDescription
lockLock the conference; no new participants may join
unlockUnlock the conference; new participants may join
dialDial an endpoint (user/device/DID)
playPlay media to the conference (all participants)
recordStart/stop the recording of the conference
varsPut custom conference variables on the conference

Lock / unlock

Lock and unlock take no additional data.

curl -v -X PUT \
    -d '{"action": "lock", "data": {}}' \
    -H "X-Auth-Token: {AUTH_TOKEN}" \
    http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/conferences/{CONFERENCE_ID}

Play media into a conference

The play action takes the media ID to play into the conference.

curl -v -X PUT \
    -d '{"action": "play", "data": {"media_id":"{MEDIA_TO_PLAY}"}}' \
    -H "X-Auth-Token: {AUTH_TOKEN}" \
    http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/conferences/{CONFERENCE_ID}

Start/Stop recording the conference

The record action takes a toggle of “start” or “stop”:

curl -v -X PUT \
    -d '{"action": "record", "data": {"action":"start"}}' \
    -H "X-Auth-Token: {AUTH_TOKEN}" \
    http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/conferences/{CONFERENCE_ID}

Set custom conference variables

This action allows the client to associate custom conference variables on a running (active) conference. No effect if the conference isn’t running.

Optionally, a SIP NOTIFY can be sent to participants with the X-Conference-Vars header where the key/value pairs will be encoded X-Conference-Vars: key=value;key-value

curl -v -X PUT \
    -d '{"action":"vars","data":{"custom_conference_vars":{"key_the_first":"value_the_first"}}}'
    -H "X-Auth-Token: {AUTH_TOKEN}" \
    http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/conferences/{CONFERENCE_ID}

When the conference config is fetched, custom conference variables will appear in the metadata top-level key.

Dialing an endpoint

Sometimes you want to dial out from a conference to an endpoint (versus waiting for the caller to dial into the conference). Similar to how the group callflow works, you can include device and user IDs; unlike groups, you can include DIDs as well (similar to quickcall/click2call).

Schema

Schema for conferences

KeyDescriptionTypeDefaultRequiredSupport Level
allow_shareable_linkIndicates if the conference is reachable using a public linkboolean()falsefalse
base_profile_namename of base profilestring()false
bridge_passwordthe password used for a conference bridgestring()false
bridge_usernamethe username used for a conference bridgestring()false
caller_controlscaller controls (config settings)string()false
conference_numbers.[]string()false
conference_numbersDefines conference numbers that can be used by members or moderatorsarray(string())[]false
controlscontrolsobject()false
domaindomainstring()false
flags.[]string()falsesupported
flagsFlags set by external applicationsarray(string())falsesupported
focusThis is a read-only property indicating the media server hosting the conferencestring()false
languagePrompt language to play in the conferencestring()false
max_members_mediaMedia to play when the conference is fullstring()false
max_participantsThe maximum number of participants that can joininteger()false
member.join_deafDetermines if a member will join deafboolean()falsefalsesupported
member.join_mutedDetermines if a member will join mutedboolean()truefalsesupported
member.numbers.[]string()false
member.numbersDefines the conference (call in) number(s) for membersarray(string())[]false
member.pins.[]string()false
member.pinsDefines the pin number(s) for membersarray(string())[]false
member.play_entry_promptWhether to play the entry prompt on member joinboolean()false
memberDefines the discovery (call in) properties for a memberobject(){}false
moderator.join_deafDetermines if a moderator will join deafboolean()falsefalse
moderator.join_mutedDetermines if a moderator will join mutedboolean()falsefalse
moderator.numbers.[]string()false
moderator.numbersDefines the conference (call in) number(s) for moderatorsarray(string())[]false
moderator.pins.[]string()false
moderator.pinsDefines the pin number(s) for moderatorsarray(string())[]false
moderatorDefines the discovery (call in) properties for a moderatorobject(){}false
moderator_controlsprofile on the switch for controlling the conference as a moderatorstring()false
nameA friendly name for the conferencestring(1..128)truesupported
owner_idThe user ID who manages this conferencestring(32)falsesupported
play_entry_toneWhether to play an entry tone, or the entry tone to play`boolean()string()`false
play_exit_toneWhether to play an exit tone, or the exit tone to play`boolean()string()`false
play_nameDo we need to announce new conference members?boolean()falsefalse
play_welcomeWhether to play the welcome promptboolean()false
profileProfile configurationobject()false
profile_nameconference profile namestring()false
require_moderatordoes the conference require a moderatorboolean()false
videoIf false, video participants will join with video mutedboolean()false
wait_for_moderatorshould members wait for a moderator before joining the conferenceboolean()false

conferences.profile

Schema for conference profiles

KeyDescriptionTypeDefaultRequiredSupport Level
alone-soundAudio that plays while you are alone in the conferencestring()false
announce-countPlay member count to conference when above this thresholdinteger()false
caller-controlsName of the caller control groupstring()false
comfort-noiseThe volume level of background white noiseinteger(0..10000)false
energy-levelEnergy level required for audio to be sent to other usersinteger(0..1800)false
enter-soundAudio to play when entering a conferencestring()false
exit-soundAudio to play when exiting a conferencestring()false
intervalMilliseconds per frameinteger(10..120)false
locked-soundAudio to play when the conference is lockedstring()false
max-membersSet the maximum number of members in the conferenceinteger(2..)false
max-members-soundIf max-members has been reached, audio to play to caller instead of joining the conferencestring()false
moderator-controlsName of the moderator control group to usestring()false
moh-soundAudio to play, on a loop, while participant count is 1string()false
muted-soundAudio to play when mutedstring()false
rateAudio sample rateinteger()false
unmuted-soundAudio to play when unmutedstring()false

Endpoints

Dial-able endpoints are

  1. Devices (by device id or device JSON)
  2. Users (by user id)
  3. Phone Numbers
  4. SIP URIs (sip:user@realm)

Note: Phone numbers will involve some internal legs being generated (loopback legs) to process the number as if it was a call coming in for the desired number. This means billing and limits will be applied just the same as if a user dialed the number from their device.

Dial schema

Schema for conference dial API command

KeyDescriptionTypeDefaultRequiredSupport Level
caller_id_nameCaller ID Name to use when dialing out to endpointsstring()false
caller_id_numberCaller ID Number to use when dialing out to endpointsstring()false
endpoints.[]`string()#/definitions/devices`
endpointsEndpoints to dial out to and join to the conferencearray()true
participant_flags.[]`string(‘mute’‘deaf’‘distribute_dtmf’‘is_moderator’
participant_flagsParticipant flags applied to each endpoint when it joins the conference`array(string(‘mute’‘deaf’‘distribute_dtmf’‘is_moderator’
profile_nameThe profile name to use for configurationstring()false
target_call_idExisting UUID to use as a hint for where to start the conferencestring()false
timeoutHow long to try to reach the endpoint(s)integer()false

Example payloads

{
    "action":"dial"
    ,"data":{
        "data":{
            "endpoints":["{DEVICE_ID}","{USER_ID}","{NUMBER}","sip:{URI}"],
            "caller_id_name":"Conference XYZ",
            "caller_id_number":"5551212"
        }
    }
}

As when making QuickCalls, you can include custom_application_vars:

{
    "action":"dial"
    ,"data":{
        "custom_application_vars":{
            "foo":"bar"
        }
        ,"data":{
            "endpoints":["{DEVICE_ID}","{USER_ID}","{NUMBER}","sip:{URI}"],
            "caller_id_name":"Conference XYZ",
            "caller_id_number":"5551212"
        }
    }
}

You can also include the outbound call id you’d like the leg to use:

{
    "action":"dial"
    ,"data":{
        "custom_application_vars":{
            "foo":"bar"
        }
        ,"data":{
            "endpoints":["{DEVICE_ID}","{USER_ID}","{NUMBER}","sip:{URI}"],
            "caller_id_name":"Conference XYZ",
            "caller_id_number":"5551212",
            "outbound_call_id":"xyz-abc"
        }
    }
}

Participant Flags

You can specify how a participant will enter a conference with a list of attributes:

ValueDescription
deafParticipant joins unable to hear conference audio
disable_mohDisable music on hold when the participant is the only one in the conference
distribute_dtmfSend DTMF from participant’s leg to all other participants
ghostUncounted in conference membership total
is_moderatorParticipant will join as a moderator
join_existingParticipant may only join a running conference (won’t start a conference)
muteParticipant joins muted
video_muteParticipant joins with video stream muted
{
    "action":"dial"
    ,"data":{
        "data":{
            "endpoints":["{DEVICE_ID}","{USER_ID}","{NUMBER}","sip:{URI}"],
            "caller_id_name":"Conference XYZ",
            "caller_id_number":"5551212",
            "participant_flags":["deaf", "mute"]
        }
    }
}

Dialing out to a dynamic conference

Sometimes you want to create ad-hoc conferences and put a participant in there. You can PUT a conference and the endpoints to dial out to create a temporary conference. The {CONFERENCE_ID} you supply will be used to name the conference and any conference schema parameters in the request will be used when creating the conference. For example:

{
    "action":"dial"
    ,"data":{
        "data":{
            "endpoints":["{DEVICE_ID}","{USER_ID}","{NUMBER}","sip:{URI}"],
            "caller_id_name":"Conference XYZ",
            "caller_id_number":"5551212",
            "play_entry_tone": true,
            "play_exit_tone": true,
            "play_name": false
        }
    }
}

These properties will be merged into a “default” conference document and then executed the same as if the conference was preconfigured.

The API response

{
    "data": {
        "endpoint_responses": [
            {
                "call_id": "{CALL_ID}",
                "endpoint_id": "{ENDPOINT_FROM_REQUEST}",
                "job_id": "{JOB_ID}",
                "message": "dial resulted in call id {CALL_ID}",
                "status": "success"
            }
        ]
    }
    ,...
}

Playing media to a conference

Playing a media file to everyone in a conference:

{
    "action":"play",
    "data": {
        "data":{"media_id":"{MEDIA_ID}"}
    }
}

{MEDIA_ID} can be a pre-uploaded media ID or a URL to fetch media from.

Perform an action on participants

PUT /v2/accounts/{ACCOUNT_ID}/conferences/{CONFERENCE_ID}/participants

curl -v -X PUT \
    -d '{"data": {"action": {PARTICIPANTS_ACTION}}}' \
    -H "X-Auth-Token: {AUTH_TOKEN}" \
    http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/conferences/{CONFERENCE_ID}/participants
ActionDescription
muteMute all the participants that are currently unmuted
unmuteUnmute all the participants that are currently muted
deafStop sending conference audio to all participants
undeafStart sending conference audio to all participants
kickKick all the participants from the conference
relateRelate two participants

Relate participants

The relate action takes a data object:

{
    "data":{
        "action":"relate"
        ,"data":{
            "participant_id":{ID}
            ,"other_participant":{ID}
            ,"relationship":"{RELATIONSHIP}"
        }
    }
}

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

API example

curl -v -X PUT \
    -H "X-Auth-Token: $AUTH_TOKEN" \
    "http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/conferences/{CONFERENCE_ID}/participants" \
    -d'{"data":{"action":"relate","data":{"participant_id":23, "other_participant":24}}}'
{
    "auth_token": "{AUTH_TOKEN}",
    "data": "relating participants",
    "node": "{NODE}",
    "request_id": "{REQUEST_ID}",
    "revision": "1-100475067fa624422c9a21bd976c7b84",
    "status": "success",
    "timestamp": "{TIMESTAMP}",
    "version": "4.2.2"
}

Perform an action on participant

PUT /v2/accounts/{ACCOUNT_ID}/conferences/{CONFERENCE_ID}/participants/{PARTICIPANT_ID}

curl -v -X PUT \
    -d '{"data": {"action": {PARTICIPANT_ACTION}}}' \
    -H "X-Auth-Token: {AUTH_TOKEN}" \
    http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/conferences/{CONFERENCE_ID}/participants/{PARTICIPANT_ID}

Sometimes you may get a HTTP/1.1 304 Not Modified response from crossbar for similar API calls. If you do, add a random string filter to the end of the call to ensure the request is viewed as ‘unique’. For example:

curl -v -X PUT \
    -d '{"data": {"action": {PARTICIPANT_ACTION}}}' \
    -H "X-Auth-Token: {AUTH_TOKEN}" \
    http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/conferences/{CONFERENCE_ID}/participants/{PARTICIPANT_ID}?random={RANDOM_BIT}
ActionDescription
muteMute the participant
unmuteUnmute the participant
deafStop sending conference audio to the participant
undeafStart sending conference audio to the participant
kickKick the participant from the conference
playPlay media to a single participant

Playing media to a conference

Playing a media file to everyone in a conference:

{"data":{
    "action":"play",
    "data":{"media_id":"{MEDIA_ID}"}
 }
}

{MEDIA_ID} can be a pare-uploaded media ID or a URL to fetch media from.

List of conferences example

[
    {
        "id": "",
        "name": "",
        "owner_id": "",
        "member": {
            "join_muted": false,
            "join_deaf": false,
            "numbers": [],
            "pins": []
        },
        "moderator": {
            "join_deaf": false,
            "join_muted": false,
            "numbers": [],
            "pins": []
        },
        "members": 0,
        "admins": 0,
        "duration": 0,
        "is_locked": false
    },
    ...
]

Conference document

{
    "name": "Conf",
    "id": "",
    "owner_id": "",
    "play_entry_tone": true,
    "play_exit_tone": true,
    "play_name": false,
    "conference_numbers": [],
    "member": {
        "join_muted": false,
        "join_deaf": false,
        "numbers": [],
        "pins": []
    },
    "ui_metadata": {
        "ui": "kazoo-ui"
    },
    "moderator": {
        "join_deaf": false,
        "join_muted": false,
        "numbers": [],
        "pins": []
    },
    "_read_only": {
        "members": 0,
        "admins": 0,
        "duration": 0,
        "is_locked": false,
        "participants": [
            {
                "call_id": "",
                "conference_name": "",
                "conference_uuid": "",
                "switch_hostname": "",
                "floor": false,
                "hear": true,
                "speak": true,
                "talking": false,
                "mute_detect": false,
                "participant_id": 1,
                "energy_level": 20,
                "current_energy": 0,
                "video": false,
                "is_moderator": false,
                "join_time": 63635217275,
                "duration": 10
            },
            ...
        ]
    }
}

join_time is participant’s join time as epoch, duration is number of seconds participant participate in conference.

Here we can see values set up for a Member, then for a Moderator.

The last field, play_entry_tone, is at the root of the document: meaning this field applies to everyone in the conference.

Available fields

  • play_entry_tone and play_exit_tone: can be either a boolean or a non-empty string.
    • true means play the default tone when someone joins (or leaves) the conference
    • false disables the tone from being played
    • A string like a tone string or a URI to a media file can be inputted.

Web-socket events

A client may subscribe to conference event using websocket connection. Participant events are published as amqp conference.event.{conference_id}.{call_id}, where call_id is participant”s call.

The list of published events is determined by publish_participant_event parameter of ecallmgr configuration, if parameter is unset, then all events are published.

Participant events

add-member
del-member
stop-talking
start-talking
mute-member
unmute-member
deaf-member
undeaf-member

Example event

{
    "custom_channel_vars": {
        "account_id": "{ACCOUNT_ID}",
        "authorizing_id": "{AUTHZ_ID}",
        "authorizing_type": "device",
        "owner_id": "{OWNER_ID}",
        "presence_id": "1000@kamailio.kazoo",
        "fetch_id": "{FETCH_ID}",
        "bridge_id": "{BRIDGE_ID}",
        "precedence": 5,
        "realm": "kamailio.kazoo",
        "username": "sip1",
        "call_interaction_id": "{INTERACTION_ID}"
    },
    "channel_presence_id": "1000@kamailio.kazoo",
    "caller_id_number": "sip1",
    "caller_id_name": "sip1",
    "mute_detect": false,
    "video": false,
    "energy_level": 20,
    "current_energy": 0,
    "talking": false,
    "speak": true,
    "hear": true,
    "floor": false,
    "participant_id": 20,
    "instance_id": "{INSTANCE_ID}",
    "conference_id": "{CONFERENCE_ID}",
    "focus": "freeswitch@freeswitch.kazoo",
    "call_id": "{CALL_ID}",
    "event": "add-member",
    "node": "kazoo_apps@kazoo.kazoo",
    "msg_id": "{MSG_ID}",
    "event_name": "participant_event",
    "event_category": "conference",
    "app_version": "4.0.0",
    "app_name": "ecallmgr",
    "routing_key": "participant_event"
}

Email Invite

conferences.email_invite

Schema for conference email_invite

KeyDescriptionTypeDefaultRequiredSupport Level
conference_linkLink to join the conferencestring()truesupported
guests.[]string()truesupported
guestsList of email recipients to be invited to the conferencearray(string())truesupported
invite_messageInvite messagestring()truesupported

Send Invite

PUT /v2/accounts/{ACCOUNT_ID}/conferences/{CONFERENCE_ID}/email_invite

curl -v -X PUT \
    -H "X-Auth-Token: {AUTH_TOKEN}" \
    -d '{"data": {"conference_link": "http://link.to/my-conference", \
                  "invite_message": "invite message", \
                  "guests": ["email1@domain.com", "email2@domain.com"]}}' \
    http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/conferences/{CONFERENCE_ID}/email_invite
{
  "version": "{VSN}",
  "timestamp": "2021-04-22T15:10:33Z",
  "node": "{NODE}",
  "request_id": "{REQUEST_ID}",
  "tokens": {
    "consumed": 1,
    "remaining": 100
  },
  "auth_token": "{AUTH_TOKEN}",
  "data": "request accepted",
  "status": "success"
}

On this Page