answer

View as MarkdownOpen in Claude
answer(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

call.answer();

Accept audio-only

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

Accept, then await the connection

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

See

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