***

title: joinConference
slug: /reference/typescript/agents/function-result/join-conference
description: Join an ad-hoc audio conference with extensive configuration options.
max-toc-depth: 3
---------------------

For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

[functionresult]: /docs/server-sdks/reference/typescript/agents/function-result

Join an ad-hoc audio conference. Conferences support both RELAY and CXML calls
with extensive configuration for moderation, recording, and event callbacks.

When all parameters are at their defaults (except `name`), a simplified form is
used internally. Passing any non-default parameter triggers the full object form.

## **Parameters**

<ParamField path="name" type="string" required={true} toc={true}>
  Conference name. All participants joining the same name are in the same
  conference.
</ParamField>

<ParamField path="opts" type="object" toc={true}>
  Optional conference configuration.
</ParamField>

<Indent>
  <ParamField path="opts.muted" type="boolean" default="false" toc={true}>
    Join the conference muted.
  </ParamField>

  <ParamField path="opts.beep" type={'"true" | "false" | "onEnter" | "onExit"'} toc={true}>
    Beep configuration for join/leave notifications.

    * `"true"` -- beep on both enter and exit
    * `"false"` -- no beep
    * `"onEnter"` -- beep only when a participant joins
    * `"onExit"` -- beep only when a participant leaves
  </ParamField>

  <ParamField path="opts.startOnEnter" type="boolean" default="true" toc={true}>
    Whether the conference starts when this participant enters. When `false`,
    the participant waits until another participant with `startOnEnter: true` joins.
  </ParamField>

  <ParamField path="opts.endOnExit" type="boolean" default="false" toc={true}>
    Whether the conference ends for all participants when this participant leaves.
  </ParamField>

  <ParamField path="opts.waitUrl" type="string" toc={true}>
    SWML URL for hold music played while waiting for the conference to start.
    When omitted, default hold music is used.
  </ParamField>

  <ParamField path="opts.maxParticipants" type="number" toc={true}>
    Maximum number of participants.
  </ParamField>

  <ParamField path="opts.record" type="string" default="do-not-record" toc={true}>
    Recording mode.

    * `"do-not-record"` -- do not record the conference
    * `"record-from-start"` -- begin recording as soon as the conference starts
  </ParamField>

  <ParamField path="opts.region" type="string" toc={true}>
    Conference region for geographic optimization.
  </ParamField>

  <ParamField path="opts.trim" type="string" default="trim-silence" toc={true}>
    Silence trimming in recordings.

    * `"trim-silence"` -- remove leading and trailing silence from the recording
    * `"do-not-trim"` -- keep silence in the recording as-is
  </ParamField>

  <ParamField path="opts.coach" type="string" toc={true}>
    SWML Call ID or CXML CallSid of a participant who can coach (whisper to)
    this participant without other participants hearing.
  </ParamField>

  <ParamField path="opts.statusCallbackEvent" type="string" toc={true}>
    Space-separated list of events to report.

    * `"start"` -- conference has started
    * `"end"` -- conference has ended
    * `"join"` -- a participant joined
    * `"leave"` -- a participant left
    * `"mute"` -- a participant was muted or unmuted
    * `"hold"` -- a participant was placed on hold or resumed
    * `"modify"` -- conference settings were modified
    * `"speaker"` -- active speaker changed
    * `"announcement"` -- an announcement was played
  </ParamField>

  <ParamField path="opts.statusCallback" type="string" toc={true}>
    URL to receive conference status event webhooks.
  </ParamField>

  <ParamField path="opts.statusCallbackMethod" type={'"GET" | "POST"'} toc={true}>
    HTTP method for status callbacks.

    * `"GET"` -- send status callbacks as GET requests
    * `"POST"` -- send status callbacks as POST requests
  </ParamField>

  <ParamField path="opts.recordingStatusCallback" type="string" toc={true}>
    URL to receive recording status event webhooks.
  </ParamField>

  <ParamField path="opts.recordingStatusCallbackMethod" type={'"GET" | "POST"'} toc={true}>
    HTTP method for recording status callbacks.

    * `"GET"` -- send recording status callbacks as GET requests
    * `"POST"` -- send recording status callbacks as POST requests
  </ParamField>

  <ParamField path="opts.recordingStatusCallbackEvent" type="string" toc={true}>
    Space-separated list of recording events to report.

    * `"in-progress"` -- recording is currently in progress
    * `"completed"` -- recording has completed
    * `"absent"` -- no recording was produced
  </ParamField>

  <ParamField path="opts.result" type="unknown" toc={true}>
    Result handling configuration. Pass an object `{}` for `return_value`-based
    switching, or an array `[]` for conditional switching.
  </ParamField>
</Indent>

## **Returns**

[`FunctionResult`][functionresult] -- `this`, for chaining.

## **Examples**

### Simple Conference

```typescript {4}
import { FunctionResult } from '@signalwire/sdk';

const result = new FunctionResult()
  .joinConference('team-meeting');
```

### Moderated Conference

```typescript {4}
import { FunctionResult } from '@signalwire/sdk';

const result = new FunctionResult()
  .joinConference('team-meeting', {
    muted: true,
    record: 'record-from-start',
  });
```