joinConference

View as MarkdownOpen in Claude

Join an ad-hoc audio conference. The conference is created automatically if it does not already exist. Multiple calls can join the same conference by name.

Use leaveConference() to remove the call from the conference.

This method emits calling.conference events. See Call Events for payload details.

Parameters

name
stringRequired

Conference name. All calls joining the same name are in the same conference.

muted
boolean | undefined

Join the conference muted.

beep
string | undefined

Play a beep when joining or leaving.

  • "true" — beep on both enter and exit
  • "false" — no beep
  • "onEnter" — beep only when a participant joins
  • "onExit" — beep only when a participant leaves
startOnEnter
boolean | undefined

Start the conference when this participant enters. If false, the conference waits until a participant with startOnEnter: true joins.

endOnExit
boolean | undefined

End the conference when this participant leaves.

maxParticipants
number | undefined

Maximum number of participants in the conference.

record
string | undefined

Recording mode:

  • "record-from-start" — begin recording when the conference starts
  • "do-not-record" — do not record the conference
waitUrl
string | undefined

URL of audio to play while waiting for the conference to start.

region
string | undefined

Region for the conference media server.

trim
string | undefined

Whether to trim silence from the conference recording.

coach
string | undefined

Call ID of a participant who can hear but not be heard (coaching mode).

statusCallback
string | undefined

URL to receive conference status webhooks.

statusCallbackEvent
string | undefined

Events that trigger status callbacks.

statusCallbackEventType
string | undefined

Content type for status callback requests.

statusCallbackMethod
string | undefined

HTTP method for the status callback ("GET" or "POST").

recordingStatusCallback
string | undefined

URL to receive recording status webhooks.

recordingStatusCallbackEvent
string | undefined

Events that trigger recording status callbacks.

recordingStatusCallbackEventType
string | undefined

Content type for recording status callback requests.

recordingStatusCallbackMethod
string | undefined

HTTP method for the recording status callback ("GET" or "POST").

stream
Record<string, unknown> | undefined

Stream configuration for the conference audio.

Returns

Promise<Record<string, unknown>> — Server response confirming the join.

Example

1import { RelayClient } from '@signalwire/sdk';
2
3const client = new RelayClient({
4 project: process.env.SIGNALWIRE_PROJECT_ID!,
5 token: process.env.SIGNALWIRE_TOKEN!,
6 contexts: ['default']
7});
8
9client.onCall(async (call) => {
10 await call.answer();
11 await call.play([{ type: 'tts', text: 'Joining the team conference.' }]);
12
13 // Join a conference
14 await call.joinConference('team-standup', {
15 beep: 'onEnter',
16 startOnEnter: true,
17 });
18
19 // The call is now in the conference until it leaves or the call ends
20});
21
22await client.run();