TelnyxClient class
The TelnyxClient class that can be used to control the SDK. Such as connect, disconnect, check gateway status or create instance of Call to make calls.
Constructors
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 specifiedcallerName
,callerNumber
andclientState
-
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.
-
disconnectWithCallBack(
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
andcredentialConfig
ortokenConfig
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 providedpushMetaData
andcredentialConfig
ortokenConfig
-
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 aclientState
-
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