answer

View as MarkdownOpen in Claude
1answer(options?): void

Accepts an inbound call. The call transitions through connectingconnected as media negotiation completes.

Without options, the call answers with the media defaults configured on the SignalWire client (typically audio + video). Pass options to narrow what’s offered — for example, accepting a video call with audio only.

answer returns synchronously; observe progression through status$ or answered$.

Parameters

options
MediaOptions

Optional media constraints for the answer (audio, video, and the input-stream / constraint overrides defined on MediaOptions). When omitted, the client-level defaults apply.

Returns

void

Examples

Accept with defaults

1call.answer();

Accept audio-only

1call.answer({ audio: true, video: false });

Accept, then await the connection

1import { filter, take } from 'rxjs';
2
3call.answer();
4const connected = await call.status$
5 .pipe(filter((s) => s === 'connected'), take(1))
6 .toPromise();

See

  • reject to decline the call instead.
  • answered$ to observe the acceptance state.