Callr Actions: conference@v1 puts callers in a conference room
The new conference@v1 action puts the caller in a conference room. Callers of your account who join the same room are connected together. It replaces the real-time conference and simple_conference commands, ahead of the end of life of real-time apps on January 1, 2027.
# Simple conference room
- action: conference@v1
params:
room: sales
result: $conference
# PIN-protected room, with prompts
- action: conference@v1
params:
room: sales
welcome:
tts:
text: Welcome to the sales conference
waiting:
audioFile:
sid: 'fdsanjkf'
pin:
code: '1234'
prompt:
tts:
text: Please enter your PIN code, followed by the pound key
error:
tts:
text: Wrong PIN code
valid:
tts:
text: PIN code accepted
maxTries: 3
timeout: 10
autoLeave:
enabled: true
announce:
tts:
text: You are the last participant, goodbye
result: $conferenceroomis required: 1 to 32 letters or digits, not case-sensitive (Salesandsalesare the same room). Quote an all-digit room in YAML. The room is created when the first caller joins.- Rooms are private to your account and separate from the rooms of real-time apps: a real-time call and a
conference@v1call never meet. - The caller can press
*at any time to leave the room. The call is not hung up: the next action runs. - Every prompt is either an audio file,
{ audioFile: { sid: 'fdsanjkf' } }(8 lowercase alphanumeric characters, quote it), or a text-to-speech prompt,{ tts: { text: 'Welcome', voice: 'en-US-AvaMultilingual' } }, with an optionalvoiceorlanguage. These are the samettsandaudioFileparameters asplay@v3. No prompt is played by default. welcomeis played before the PIN and before joining the room.waitingis played in a loop whenever the caller is alone in the room.userJoinanduserLeaveare played to the room when someone joins or leaves. They are taken from the caller who opens the room, so use the same values for every caller of a room.pinis optional. Without it, callers join directly.codeis required: 1 to 10 digits. Quote it in YAML, so leading zeros are kept. The caller ends the entry with#.promptis played at each attempt,errorafter a wrong code (not after a timeout), andvalidafter the right code.maxTriesis the number of attempts (1..10, default 3).timeoutis the number of seconds to enter the code at each attempt (1..30, default 10).
autoLeave.enabled(defaultfalse) makes the caller leave the room automatically when they become the last participant. It applies when someone else leaves, not while the caller waits for the first other participant.autoLeave.announceis played to the caller before leaving.- Result:
{ ok, status, duration }.statusisleft(the caller pressed*),lastParticipant(auto-leave),pinError(wrong code at every attempt),pinTimeout(no code entered in time),hangup(the caller hung up) orfailed(the room could not be joined, for example because it is full, or it ended unexpectedly).okistruewhen the caller entered the room:left,lastParticipant, or any other status with adurationabove 0 (for examplehangupafter time in the room).durationis the number of seconds spent in the room, after the welcome and the PIN. It is0if the caller never entered.
- Text-to-speech prompts are billed every time the action runs, like
play@v3. Audio file prompts incur no text-to-speech charge. - If a parameter is invalid, for example an unknown SID or a bad room, the scenario ends and the error appears in the run log (
welcome: audio file not found [fdsanjkf],invalid room: 1 to 32 letters or digits).
Migrating from the real-time conference command
Real-time conference | conference@v1 |
|---|---|
id | room |
welcome | welcome |
waiting | waiting |
pin_code | pin.code |
pin_prompt | pin.prompt |
pin_error | pin.error |
pin_valid | pin.valid |
pin_max_tries | pin.maxTries |
pin_wait | pin.timeout |
user_join | userJoin |
user_leave | userLeave |
auto_leave_when_alone | autoLeave.enabled |
auto_leave_announce | autoLeave.announce |
| Real-time result | status |
|---|---|
LEFT_CONFERENCE | left |
LAST_PARTICIPANT | lastParticipant |
PIN_ERROR | pinError |
PIN_TIMEOUT | pinTimeout |
CONFERENCE_CLOSED | not returned (real-time never returned it either) |
-
A media ID becomes
{ audioFile: { sid: '...' } }, the SID of an audio file of your library. -
A
TTS|VOICE|textstring becomes{ tts: { text: '...', voice: '...' } }, with aplay@v3voice, for exampleen-GB-Ryan. -
Every parameter except
roomis optional. The real-time command required all of them. -
simple_conferenceisroomplusautoLeave:- action: conference@v1 params: room: sales autoLeave: enabled: true -
Real-time and
conference@v1rooms are separate: a real-time caller and aconference@v1caller never meet, even with the same room name. Move all the calls of a room at the same time.
See the Callr Actions reference.
