Call
- When you initiate a new outbound call using TxClient’s newCall method
- When you receive an inbound call through the TxClientDelegate’s onIncomingCall callback
Key Features
- Audio and video call support
- Call state management (NEW, CONNECTING, RINGING, ACTIVE, HELD, DONE)
- Mute/unmute functionality
- DTMF tone sending
- Custom headers support for both INVITE and ANSWER messages
- Call statistics reporting when debug mode is enabled
Examples
Creating an Outbound Call:
Handling an Incoming Call:
Properties
onCallQualityChange
inviteCustomHeaders
answerCustomHeaders
sessionId
telnyxSessionId
telnyxLegId
debug
enableQualityMetrics
sendWebRTCStatsViaSocket
forceRelayCandidate
callInfo
- callId: Unique identifier for this call
- callerName: Display name of the caller
- callerNumber: Phone number or SIP URI of the caller
See
TxCallInfofor complete details.
callState
- NEW: Call object created but not yet initiated
- CONNECTING: Outbound call is being established
- RINGING: Incoming call waiting to be answered
- ACTIVE: Call is connected and media is flowing
- HELD: Call is temporarily suspended
- DONE: Call has ended
CallProtocol delegate.
isMuted
- Returns:
trueif the call is muted (audio track disabled) - Returns:
falseif the call is not muted (audio track enabled)
muteAudio() and unmuteAudio() to change the mute state.