Call Class
TheCall 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.
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 usingcall.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
- ICallOptions — Call configuration options
- INotification — Notification types and payloads
- TelnyxRTC Class — Client methods and events
- SDK Commonalities — Call states across all SDK platforms
- Best Practices — Production call management guide