TelnyxClient class

Constructors

TelnyxClient()

Properties

call Call
no setter
calls Map<String, Call>
getter/setter pair
earlySDP bool
getter/setter pair
gatewayState String
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
onSocketErrorReceived OnSocketErrorReceived
getter/setter pair
onSocketMessageReceived OnSocketMessageReceived
getter/setter pair
ringBackpath String
getter/setter pair
ringtonePath String
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sessid String
The current session ID related to this client
getter/setter pair
storedCredentialConfig CredentialConfig?
getter/setter pair
storedTokenConfig TokenConfig?
getter/setter pair
txSocket TxSocket
getter/setter pair

Methods

acceptCall(IncomingInviteParams invite, String callerName, String callerNumber, String clientState, {bool isAttach = false, Map<String, String> customHeaders = const {}}) Call
Accepts the incoming call specified via the invite parameter, sending your local specified callerName, callerNumber and clientState
activeCalls() Map<String, Call>
checkReconnection() → void
connect() → void
connectWithCredential(CredentialConfig credentialConfig) → void
connectWithToken(TokenConfig tokenConfig) → void
credentialLogin(CredentialConfig config) → void
Uses the provided config to send a credential login message to the Telnyx backend. If successful, the gateway registration process will start.
disconnect() → void
Closes the socket connection, effectively logging the user out.
disconnectWithCallBck(OnCloseCallback? closeCallback) → void
Closes the socket connection, effectively logging the user out.
getCallOrNull(String callId) Call?
getGatewayStatus() String
Returns the current Gateway state for the socket connection
handlePushNotification(PushMetaData pushMetaData, CredentialConfig? credentialConfig, TokenConfig? tokenConfig) → void
Handles the push notification received from the backend and initiates the connection with the provided pushMetaData and credentialConfig or tokenConfig If the push notification is received while the client is not connected Note: Do not call the connect method after calling this method, it implicitly calls the connect method with the provided pushMetaData and credentialConfig or tokenConfig
isConnected() bool
Returns whether or not the client is connected to the socket connection
newInvite(String callerName, String callerNumber, String destinationNumber, String clientState, {Map<String, String> customHeaders = const {}}) Call
using the provided callerName, callerNumber and a clientState
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
tokenLogin(TokenConfig config) → void
Uses the provided config to send a token login message to the Telnyx backend. If successful, the gateway registration process will start.
toString() String
A string representation of this object.
inherited
updateCall(Call call) → void

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

getPushData() Future<Map<String, dynamic>?>
setPushMetaData(Map<String, dynamic> pushMetaData, {bool isAnswer = false, bool isDecline = false}) → void

Constants

GATEWAY_RESPONSE_DELAY → const int
RECONNECT_TIMER → const int
RETRY_CONNECT_TIME → const int
RETRY_REGISTER_TIME → const int