Skip to main content

Call Class

The Call object represents a voice call. It’s created by client.newCall() (outbound) or received via telnyx.notification (inbound).

Getting a Call Object

Outbound call

Inbound call


Properties


Call States


Methods

answer()

Answer an incoming call.
Only call answer() when the call state is ringing. Calling answer() on an already-active call creates a duplicate PeerConnection, which causes one-way audio issues.

hangup()

End the call.
See Migration Guide for upgrading from 2.25.x.

muteAudio() / unmuteAudio()

Toggle the microphone.

hold() / unhold()

Put the call on hold or resume it.

dtmf(digit)

Send a DTMF tone (0-9, *, #).

sendDigits(digits)

Send a sequence of DTMF digits.

Events

Register event listeners using call.on(eventName, handler):

Call State Events


Advanced

Access the PeerConnection

For custom WebRTC monitoring or manipulation:
Direct PeerConnection access is for advanced use cases only. The SDK manages the PeerConnection lifecycle — calling methods like close() or setRemoteDescription() directly may break the call.

Custom headers

Add SIP headers to the INVITE for server-side correlation:

Common Patterns

Simple outbound call with state handling

Inbound call with accept/reject UI

Hold and resume


See Also