RELAYCall

join_conference

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 leave_conference() to remove the call from the conference.

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

Parameters

name
strRequired

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

muted
Optional[bool]

Join the conference muted.

beep
Optional[str]

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
start_on_enter
Optional[bool]

Start the conference when this participant enters. If False, the conference waits until a participant with start_on_enter=True joins.

end_on_exit
Optional[bool]

End the conference when this participant leaves.

wait_url
Optional[str]

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

max_participants
Optional[int]

Maximum number of participants in the conference.

record
Optional[str]

Recording mode.

  • "record-from-start" — begin recording when the conference starts
  • "do-not-record" — do not record the conference
region
Optional[str]

Region for the conference media server.

trim
Optional[str]

Whether to trim silence from the conference recording.

coach
Optional[str]

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

status_callback
Optional[str]

URL to receive conference status webhooks.

status_callback_event
Optional[str]

Events that trigger status callbacks.

status_callback_event_type
Optional[str]

Content type for status callback requests.

status_callback_method
Optional[str]

HTTP method for status callbacks (e.g., "POST", "GET").

recording_status_callback
Optional[str]

URL to receive recording status webhooks.

recording_status_callback_event
Optional[str]

Events that trigger recording status callbacks.

recording_status_callback_event_type
Optional[str]

Content type for recording status callback requests.

recording_status_callback_method
Optional[str]

HTTP method for recording status callbacks.

stream_obj
Optional[dict]

Attach a bidirectional WebSocket stream to the conference audio, enabling real-time audio processing, transcription, or AI agents that listen to the conference. Uses the same stream schema as the stream device type in connect.

stream_obj.url
strRequired

Secure WebSocket URL (wss://) to stream the conference audio to. Plain ws:// is not supported.

stream_obj.name
Optional[str]

A friendly name to identify the stream at the WebSocket endpoint.

stream_obj.codec
Optional[str]

Audio codec for the streamed audio (e.g., "PCMU", "PCMA", "G722", "L16").

stream_obj.status_url
Optional[str]

HTTP or HTTPS URL to receive stream status webhooks.

stream_obj.status_url_method
Optional[str]Defaults to POST

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

stream_obj.realtime
Optional[bool]

When True, enables bidirectional audio so your endpoint can stream audio back into the conference (not just receive it).

stream_obj.authorization_bearer_token
Optional[str]

Bearer token sent in the Authorization header when the WebSocket connection is opened, so your endpoint can authenticate the request.

stream_obj.custom_parameters
Optional[dict]

Custom key-value pairs delivered to your WebSocket endpoint when the stream connects. Use them to pass context such as a session or customer ID.

Returns

dict — Server response confirming the join.

Example

1from signalwire.relay import RelayClient
2
3client = RelayClient(
4 project="your-project-id",
5 token="your-api-token",
6 host="your-space.signalwire.com",
7 contexts=["default"],
8)
9
10@client.on_call
11async def handle_call(call):
12 await call.answer()
13 await call.play([{"type": "tts", "text": "Joining the team conference."}])
14
15 # Join a conference and attach a bidirectional WebSocket stream
16 await call.join_conference(
17 "team-standup",
18 beep="onEnter",
19 start_on_enter=True,
20 stream_obj={
21 "url": "wss://example.com/conference-audio",
22 "codec": "PCMU",
23 "realtime": True,
24 "status_url": "https://example.com/stream-status",
25 },
26 )
27
28 # The call is now in the conference until it leaves or the call ends
29
30client.run()