diff --git a/docs_markdown/README.md b/docs_markdown/README.md deleted file mode 100644 index ff840993..00000000 --- a/docs_markdown/README.md +++ /dev/null @@ -1,44 +0,0 @@ -# Reference Documentation - -## Protocols - -- [TxClientDelegate](protocols/TxClientDelegate.md) - -## Structs - -- [TxCallInfo](structs/TxCallInfo.md) -- [TxConfig](structs/TxConfig.md) -- [TxPushConfig](structs/TxPushConfig.md) -- [TxPushIPConfig](structs/TxPushIPConfig.md) -- [TxServerConfiguration](structs/TxServerConfiguration.md) - -## Classes - -- [Call](classes/Call.md) -- [FileLogger](classes/FileLogger.md) -- [StatsMessage](classes/StatsMessage.md) -- [TxClient](classes/TxClient.md) - -## Enums - -- [CallState](enums/CallState.md) -- [LogLevel](enums/LogLevel.md) -- [PushEnvironment](enums/PushEnvironment.md) -- [TxError](enums/TxError.md) -- [TxError.CallFailureReason](enums/TxError.CallFailureReason.md) -- [TxError.ClientConfigurationFailureReason](enums/TxError.ClientConfigurationFailureReason.md) -- [TxError.ServerErrorReason](enums/TxError.ServerErrorReason.md) -- [TxError.SocketFailureReason](enums/TxError.SocketFailureReason.md) -- [WebRTCEnvironment](enums/WebRTCEnvironment.md) - -## Extensions - -- [Call](extensions/Call.md) -- [TxClient](extensions/TxClient.md) -- [TxError](extensions/TxError.md) -- [TxError.CallFailureReason](extensions/TxError.CallFailureReason.md) -- [TxError.ClientConfigurationFailureReason](extensions/TxError.ClientConfigurationFailureReason.md) -- [TxError.ServerErrorReason](extensions/TxError.ServerErrorReason.md) -- [TxError.SocketFailureReason](extensions/TxError.SocketFailureReason.md) - -This file was generated by [SourceDocs](https://github.com/eneko/SourceDocs) on 2024-11-15 15:47:47 +0000 \ No newline at end of file diff --git a/docs_markdown/classes/Call.md b/docs_markdown/classes/Call.md deleted file mode 100644 index a6f64b93..00000000 --- a/docs_markdown/classes/Call.md +++ /dev/null @@ -1,120 +0,0 @@ -**CLASS** - -# `Call` - -```swift -public class Call -``` - -A Call is the representation of an audio or video call between two WebRTC Clients, SIP clients or phone numbers. -The call object is created whenever a new call is initiated, either by you or the remote caller. -You can access and act upon calls initiated by a remote caller by registering to TxClientDelegate of the TxClient - -## Examples: -### Create a call: - -``` - // Create a client instance - self.telnyxClient = TxClient() - - // Asign the delegate to get SDK events - self.telnyxClient?.delegate = self - - // Connect the client (Check TxClient class for more info) - self.telnyxClient?.connect(....) - - // Create the call and start calling - self.currentCall = try self.telnyxClient?.newCall(callerName: "Caller name", - callerNumber: "155531234567", - // Destination is required and can be a phone number or SIP URI - destinationNumber: "18004377950", - callId: UUID.init()) -``` - -### Answer an incoming call: -``` -//Init your client -func initTelnyxClient() { - // - self.telnyxClient = TxClient() - - // Asign the delegate to get SDK events - self.telnyxClient?.delegate = self - - // Connect the client (Check TxClient class for more info) - self.telnyxClient?.connect(....) -} - -extension ViewController: TxClientDelegate { - //.... - func onIncomingCall(call: Call) { - //We are automatically answering any incoming call as an example, but - //maybe you want to store a reference of the call, and answer the call after a button press. - self.myCall = call.answer() - } -} -``` - -## Properties -### `inviteCustomHeaders` - -```swift -public internal(set) var inviteCustomHeaders: [String:String]? -``` - -Custum headers pased /from webrtc telnyx_rtc.INVITE Messages - -### `answerCustomHeaders` - -```swift -public internal(set) var answerCustomHeaders: [String:String]? -``` - -Custum headers pased tfrom telnyx_rtc.ANSWER webrtcMessages - -### `sessionId` - -```swift -public internal(set) var sessionId: String? -``` - -The Session ID of the current connection - -### `telnyxSessionId` - -```swift -public internal(set) var telnyxSessionId: UUID? -``` - -Telnyx call session ID. - -### `telnyxLegId` - -```swift -public internal(set) var telnyxLegId: UUID? -``` - -Telnyx call leg ID - -### `callInfo` - -```swift -public var callInfo: TxCallInfo? -``` - -`TxCallInfo` Contains the required information of the current Call. - -### `callState` - -```swift -public var callState: CallState = .NEW -``` - -`CallState` The actual state of the Call. - -## Methods -### `startDebugStats()` - -```swift -public func startDebugStats() -``` diff --git a/docs_markdown/classes/FileLogger.md b/docs_markdown/classes/FileLogger.md deleted file mode 100644 index cd8a1ebd..00000000 --- a/docs_markdown/classes/FileLogger.md +++ /dev/null @@ -1,21 +0,0 @@ -**CLASS** - -# `FileLogger` - -```swift -public class FileLogger -``` - -## Properties -### `shared` - -```swift -public static let shared = FileLogger() -``` - -## Methods -### `log(_:)` - -```swift -public func log(_ message: String) -``` diff --git a/docs_markdown/classes/StatsMessage.md b/docs_markdown/classes/StatsMessage.md deleted file mode 100644 index a1f9ecdd..00000000 --- a/docs_markdown/classes/StatsMessage.md +++ /dev/null @@ -1,7 +0,0 @@ -**CLASS** - -# `StatsMessage` - -```swift -public class StatsMessage -``` diff --git a/docs_markdown/classes/TxClient.md b/docs_markdown/classes/TxClient.md deleted file mode 100644 index 1fda9915..00000000 --- a/docs_markdown/classes/TxClient.md +++ /dev/null @@ -1,251 +0,0 @@ -**CLASS** - -# `TxClient` - -```swift -public class TxClient -``` - -The `TelnyxRTC` client connects your application to the Telnyx backend, -enabling you to make outgoing calls and handle incoming calls. - -## Examples -### Connect and login: - -``` -// Initialize the client -let telnyxClient = TxClient() - -// Register to get SDK events -telnyxClient.delegate = self - -// Setup yor connection parameters. - -// Set the login credentials and the ringtone/ringback configurations if required. -// Ringtone / ringback tone files are not mandatory. -// You can user your sipUser and password -let txConfigUserAndPassowrd = TxConfig(sipUser: sipUser, - password: password, - ringtone: "incoming_call.mp3", - ringBackTone: "ringback_tone.mp3", - //You can choose the appropriate verbosity level of the SDK. - //Logs are disabled by default - logLevel: .all) - -// Use a JWT Telnyx Token to authenticate (recommended) -let txConfigToken = TxConfig(token: "MY_JWT_TELNYX_TOKEN", - ringtone: "incoming_call.mp3", - ringBackTone: "ringback_tone.mp3", - //You can choose the appropriate verbosity level of the SDK. Logs are disabled by default - logLevel: .all) - -do { - // Connect and login - // Use `txConfigUserAndPassowrd` or `txConfigToken` - try telnyxClient.connect(txConfig: txConfigToken) -} catch let error { - print("ViewController:: connect Error \(error)") -} - -// You can call client.disconnect() when you're done. -Note: you need to relese the delegate manually when you are done. - -// Disconnecting and Removing listeners. -telnyxClient.disconnect(); - -// Release the delegate -telnyxClient.delegate = nil - -``` - -### Listen TxClient delegate events. - -``` -extension ViewController: TxClientDelegate { - - func onRemoteCallEnded(callId: UUID) { - // Call has been removed internally. - } - - func onSocketConnected() { - // When the client has successfully connected to the Telnyx Backend. - } - - func onSocketDisconnected() { - // When the client from the Telnyx backend - } - - func onClientError(error: Error) { - // Something went wrong. - } - - func onClientReady() { - // You can start receiving incoming calls or - // start making calls once the client was fully initialized. - } - - func onSessionUpdated(sessionId: String) { - // This function will be executed when a sessionId is received. - } - - func onIncomingCall(call: Call) { - // Someone is calling you. - } - - // You can update your UI from here base on the call states. - // Check that the callId is the same as your current call. - func onCallStateUpdated(callState: CallState, callId: UUID) { - DispatchQueue.main.async { - switch (callState) { - case .CONNECTING: - break - case .RINGING: - break - case .NEW: - break - case .ACTIVE: - break - case .DONE: - break - case .HELD: - break - } - } - } -} -``` - -## Properties -### `calls` - -```swift -public internal(set) var calls: [UUID: Call] = [UUID: Call]() -``` - -Keeps track of all the created calls by theirs UUIDs - -### `delegate` - -```swift -public weak var delegate: TxClientDelegate? -``` - -Subscribe to TxClient delegate to receive Telnyx SDK events - -### `isAudioDeviceEnabled` - -```swift -public var isAudioDeviceEnabled : Bool -``` - -When implementing CallKit framework, audio has to be manually handled. -Set this property to TRUE when `provider(CXProvider, didActivate: AVAudioSession)` is called on your CallKit implementation -Set this property to FALSE when `provider(CXProvider, didDeactivate: AVAudioSession)` is called on your CallKit implementation - -### `isRegistered` - -```swift -public var isRegistered: Bool -``` - -Client must be registered in order to receive or place calls. - -## Methods -### `enableAudioSession(audioSession:)` - -```swift -public func enableAudioSession(audioSession: AVAudioSession) -``` - -### `disableAudioSession(audioSession:)` - -```swift -public func disableAudioSession(audioSession: AVAudioSession) -``` - -### `init()` - -```swift -public init() -``` - -TxClient has to be instantiated. - -### `connect(txConfig:serverConfiguration:)` - -```swift -public func connect(txConfig: TxConfig, serverConfiguration: TxServerConfiguration = TxServerConfiguration()) throws -``` - -Connects to the iOS cloglient to the Telnyx signaling server using the desired login credentials. -- Parameters: - - txConfig: The desired login credentials. See TxConfig docummentation for more information. - - serverConfiguration: (Optional) To define a custom `signaling server` and `TURN/ STUN servers`. As default we use the internal Telnyx Production servers. -- Throws: TxConfig parameters errors - -#### Parameters - -| Name | Description | -| ---- | ----------- | -| txConfig | The desired login credentials. See TxConfig docummentation for more information. | -| serverConfiguration | (Optional) To define a custom `signaling server` and `TURN/ STUN servers`. As default we use the internal Telnyx Production servers. | - -### `disconnect()` - -```swift -public func disconnect() -``` - -Disconnects the TxClient from the Telnyx signaling server. - -### `isConnected()` - -```swift -public func isConnected() -> Bool -``` - -To check if TxClient is connected to Telnyx server. -- Returns: `true` if TxClient socket is connected, `false` otherwise. - -### `answerFromCallkit(answerAction:customHeaders:)` - -```swift -public func answerFromCallkit(answerAction:CXAnswerCallAction,customHeaders:[String:String] = [:]) -``` - -To answer and control callKit active flow -- Parameters: - - answerAction : `CXAnswerCallAction` from callKit - - customHeaders: (Optional) - -#### Parameters - -| Name | Description | -| ---- | ----------- | -| answerAction | `CXAnswerCallAction` from callKit | -| customHeaders | (Optional) | - -### `endCallFromCallkit(endAction:callId:)` - -```swift -public func endCallFromCallkit(endAction:CXEndCallAction,callId:UUID? = nil) -``` - -To end and control callKit active and conn - -### `disablePushNotifications()` - -```swift -public func disablePushNotifications() -``` - -To disable push notifications for the current user - -### `getSessionId()` - -```swift -public func getSessionId() -> String -``` - -Get the current session ID after logging into Telnyx Backend. -- Returns: The current sessionId. If this value is empty, that means that the client is not connected to Telnyx server. diff --git a/docs_markdown/enums/CallState.md b/docs_markdown/enums/CallState.md deleted file mode 100644 index 519b713d..00000000 --- a/docs_markdown/enums/CallState.md +++ /dev/null @@ -1,58 +0,0 @@ -**ENUM** - -# `CallState` - -```swift -public enum CallState -``` - -`CallState` represents the state of the call - -## Cases -### `NEW` - -```swift -case NEW -``` - -New call has been created in the client. - -### `CONNECTING` - -```swift -case CONNECTING -``` - -The outbound call is being sent to the server. - -### `RINGING` - -```swift -case RINGING -``` - -Call is pending to be answered. Someone is attempting to call you. - -### `ACTIVE` - -```swift -case ACTIVE -``` - -Call is active when two clients are fully connected. - -### `HELD` - -```swift -case HELD -``` - -Call has been held. - -### `DONE` - -```swift -case DONE -``` - -Call has ended. diff --git a/docs_markdown/enums/LogLevel.md b/docs_markdown/enums/LogLevel.md deleted file mode 100644 index 38e38f44..00000000 --- a/docs_markdown/enums/LogLevel.md +++ /dev/null @@ -1,73 +0,0 @@ -**ENUM** - -# `LogLevel` - -```swift -public enum LogLevel: Int -``` - -Available Log levels: -- `none`: Print no messages -- `error`: Message of level `error` -- `warning`: Message of level `warning` -- `success`: Message of level `success` -- `info`: Message of level `info` -- `verto`: Message of level `verto` messages. -- `all`: Will print all level of messages - -## Cases -### `none` - -```swift -case none = 0 -``` - -Disable logs. SDK logs will not printed. This is the default configuration. - -### `error` - -```swift -case error -``` - -Print `error` logs only - -### `warning` - -```swift -case warning -``` - -Print `warning` logs only - -### `success` - -```swift -case success -``` - -Print `success` logs only - -### `info` - -```swift -case info -``` - -Print `info` logs only - -### `verto` - -```swift -case verto -``` - -Print `verto` messages. Incoming and outgoing verto messages are printed. - -### `all` - -```swift -case all -``` - -All the SDK logs are printed. diff --git a/docs_markdown/enums/PushEnvironment.md b/docs_markdown/enums/PushEnvironment.md deleted file mode 100644 index d9c03f98..00000000 --- a/docs_markdown/enums/PushEnvironment.md +++ /dev/null @@ -1,20 +0,0 @@ -**ENUM** - -# `PushEnvironment` - -```swift -public enum PushEnvironment: String -``` - -## Cases -### `production` - -```swift -case production = "production" -``` - -### `debug` - -```swift -case debug = "debug" -``` diff --git a/docs_markdown/enums/TxError.CallFailureReason.md b/docs_markdown/enums/TxError.CallFailureReason.md deleted file mode 100644 index 1820fb55..00000000 --- a/docs_markdown/enums/TxError.CallFailureReason.md +++ /dev/null @@ -1,26 +0,0 @@ -**ENUM** - -# `TxError.CallFailureReason` - -```swift -public enum CallFailureReason -``` - -The underlying reason of the call errors - -## Cases -### `destinationNumberIsRequired` - -```swift -case destinationNumberIsRequired -``` - -There's no destination number when placing an outbound call - -### `sessionIdIsRequired` - -```swift -case sessionIdIsRequired -``` - -Session Id is missing when starting a call. Check you're logged in before starting a call. diff --git a/docs_markdown/enums/TxError.ClientConfigurationFailureReason.md b/docs_markdown/enums/TxError.ClientConfigurationFailureReason.md deleted file mode 100644 index a233894e..00000000 --- a/docs_markdown/enums/TxError.ClientConfigurationFailureReason.md +++ /dev/null @@ -1,50 +0,0 @@ -**ENUM** - -# `TxError.ClientConfigurationFailureReason` - -```swift -public enum ClientConfigurationFailureReason -``` - -The underlying reason of client setup configuration errors - -## Cases -### `userNameAndPasswordAreRequired` - -```swift -case userNameAndPasswordAreRequired -``` - -`sip user`and `sip password` are missing when using the USER / PASSWORD login method - -### `userNameIsRequired` - -```swift -case userNameIsRequired -``` - -`sip user` is missing when using the USER / PASSWORD login method - -### `passwordIsRequired` - -```swift -case passwordIsRequired -``` - -`password` is missing when using the USER / PASSWORD login method - -### `tokenIsRequired` - -```swift -case tokenIsRequired -``` - -`token` is missing when using the Token login method. - -### `voiceSdkIsRequired` - -```swift -case voiceSdkIsRequired -``` - -`token` is missing when using the Token login method. diff --git a/docs_markdown/enums/TxError.ServerErrorReason.md b/docs_markdown/enums/TxError.ServerErrorReason.md deleted file mode 100644 index af254e19..00000000 --- a/docs_markdown/enums/TxError.ServerErrorReason.md +++ /dev/null @@ -1,26 +0,0 @@ -**ENUM** - -# `TxError.ServerErrorReason` - -```swift -public enum ServerErrorReason -``` - -The underlying reason of the server errors - -## Cases -### `signalingServerError(message:code:)` - -```swift -case signalingServerError(message: String, code: String) -``` - -Any server signaling error. We get the message and code from the server - -### `gatewayNotRegistered` - -```swift -case gatewayNotRegistered -``` - -Gateway is not registered. diff --git a/docs_markdown/enums/TxError.SocketFailureReason.md b/docs_markdown/enums/TxError.SocketFailureReason.md deleted file mode 100644 index 7fff16e0..00000000 --- a/docs_markdown/enums/TxError.SocketFailureReason.md +++ /dev/null @@ -1,26 +0,0 @@ -**ENUM** - -# `TxError.SocketFailureReason` - -```swift -public enum SocketFailureReason -``` - -The underlying reason of the Socket connection failure - -## Cases -### `socketNotConnected` - -```swift -case socketNotConnected -``` - -Socket is not connected. Check that you have an active connection. - -### `socketCancelled(nativeError:)` - -```swift -case socketCancelled(nativeError:Error) -``` - -Socket connection was cancelled. diff --git a/docs_markdown/enums/TxError.md b/docs_markdown/enums/TxError.md deleted file mode 100644 index 36be004e..00000000 --- a/docs_markdown/enums/TxError.md +++ /dev/null @@ -1,43 +0,0 @@ -**ENUM** - -# `TxError` - -```swift -public enum TxError : Error -``` - -`TxError` is the error type returned by Telnyx WebRTC SDK. It encompasses a few different types of errors, each with -their own associated reasons. - -## Cases -### `socketConnectionFailed(reason:)` - -```swift -case socketConnectionFailed(reason: SocketFailureReason) -``` - -Socket connection failures. - -### `clientConfigurationFailed(reason:)` - -```swift -case clientConfigurationFailed(reason: ClientConfigurationFailureReason) -``` - -There's an invalid parameter when setting up the SDK - -### `callFailed(reason:)` - -```swift -case callFailed(reason: CallFailureReason) -``` - -There's an invalid parameter when starting a call - -### `serverError(reason:)` - -```swift -case serverError(reason: ServerErrorReason) -``` - -When the signaling server sends an error diff --git a/docs_markdown/enums/WebRTCEnvironment.md b/docs_markdown/enums/WebRTCEnvironment.md deleted file mode 100644 index 34697b97..00000000 --- a/docs_markdown/enums/WebRTCEnvironment.md +++ /dev/null @@ -1,20 +0,0 @@ -**ENUM** - -# `WebRTCEnvironment` - -```swift -public enum WebRTCEnvironment -``` - -## Cases -### `development` - -```swift -case development -``` - -### `production` - -```swift -case production -``` diff --git a/docs_markdown/extensions/Call.md b/docs_markdown/extensions/Call.md deleted file mode 100644 index ec4c5ab9..00000000 --- a/docs_markdown/extensions/Call.md +++ /dev/null @@ -1,104 +0,0 @@ -**EXTENSION** - -# `Call` -```swift -extension Call -``` - -## Methods -### `hangup()` - -```swift -public func hangup() -``` - -Hangup or reject an incoming call. -### Example: - call.hangup() - -### `answer(customHeaders:)` - -```swift -public func answer(customHeaders:[String:String] = [:]) -``` - -Starts the process to answer the incoming call. -### Example: - call.answer() - - Parameters: - - customHeaders: (optional) Custom Headers to be passed over webRTC Messages, should be in the - format `X-key:Value` `X` is required for headers to be passed. - -### `dtmf(dtmf:)` - -```swift -public func dtmf(dtmf: String) -``` - -Sends dual-tone multi-frequency (DTMF) signal -- Parameter dtmf: Single DTMF key -## Examples: -### Send DTMF signals: - -``` - currentCall?.dtmf("0") - currentCall?.dtmf("1") - currentCall?.dtmf("*") - currentCall?.dtmf("#") -``` - -#### Parameters - -| Name | Description | -| ---- | ----------- | -| dtmf | Single DTMF key | - -### `muteAudio()` - -```swift -public func muteAudio() -``` - -Turns off audio output, i.e. makes it so other call participants cannot hear your audio. -### Example: - call.muteAudio() - -### `unmuteAudio()` - -```swift -public func unmuteAudio() -``` - -Turns on audio output, i.e. makes it so other call participants can hear your audio. -### Example: - call.unmuteAudio() - -### `hold()` - -```swift -public func hold() -``` - -Holds the call. -### Example: - call.hold() - -### `unhold()` - -```swift -public func unhold() -``` - -Removes hold from the call. -### Example: - call.unhold() - -### `toggleHold()` - -```swift -public func toggleHold() -``` - -Toggles between `active` and `held` state of the call. -### Example: - call.toggleHold() diff --git a/docs_markdown/extensions/TxClient.md b/docs_markdown/extensions/TxClient.md deleted file mode 100644 index e72e8868..00000000 --- a/docs_markdown/extensions/TxClient.md +++ /dev/null @@ -1,102 +0,0 @@ -**EXTENSION** - -# `TxClient` -```swift -extension TxClient -``` - -## Methods -### `getCall(callId:)` - -```swift -public func getCall(callId: UUID) -> Call? -``` - -This function can be used to access any active call tracked by the SDK. - A call will be accessible until has ended (transitioned to the DONE state). -- Parameter callId: The unique identifier of a call. -- Returns: The` Call` object that matches the requested `callId`. Returns `nil` if no call was found. - -#### Parameters - -| Name | Description | -| ---- | ----------- | -| callId | The unique identifier of a call. | - -### `newCall(callerName:callerNumber:destinationNumber:callId:clientState:customHeaders:)` - -```swift -public func newCall(callerName: String, - callerNumber: String, - destinationNumber: String, - callId: UUID, - clientState: String? = nil, - customHeaders:[String:String] = [:]) throws -> Call -``` - -Creates a new Call and starts the call sequence, negotiate the ICE Candidates and sends the invite. -- Parameters: - - callerName: The caller name. This will be displayed as the caller name in the remote's client. - - callerNumber: The caller Number. The phone number of the current user. - - destinationNumber: The destination `SIP user address` (sip:YourSipUser@sip.telnyx.com) or `phone number`. - - callId: The current call UUID. - - clientState: (optional) Custom state in string format encoded in base64 - - customHeaders: (optional) Custom Headers to be passed over webRTC Messages, should be in the - format `X-key:Value` `X` is required for headers to be passed. -- Throws: - - sessionId is required if user is not logged in - - socket connection error if socket is not connected - - destination number is required to start a call. -- Returns: The call that has been created - -#### Parameters - -| Name | Description | -| ---- | ----------- | -| callerName | The caller name. This will be displayed as the caller name in the remote’s client. | -| callerNumber | The caller Number. The phone number of the current user. | -| destinationNumber | The destination `SIP user address` (sip:YourSipUser@sip.telnyx.com) or `phone number`. | -| callId | The current call UUID. | -| clientState | (optional) Custom state in string format encoded in base64 | -| customHeaders | (optional) Custom Headers to be passed over webRTC Messages, should be in the format `X-key:Value` `X` is required for headers to be passed. | - -### `processVoIPNotification(txConfig:serverConfiguration:pushMetaData:)` - -```swift -public func processVoIPNotification(txConfig: TxConfig, - serverConfiguration: TxServerConfiguration,pushMetaData:[String: Any]) throws -``` - -Call this function to process a VoIP push notification of an incoming call. -This function will be executed when the app was closed and the user executes an action over the VoIP push notification. - You will need to -- Parameters: - - txConfig: The desired configuration to login to B2B2UA. User credentials must be the same as the - - serverConfiguration : required to setup from VoIP push notification metadata. - - pushMetaData : meta data payload from VOIP Push notification - (this should be gotten from payload.dictionaryPayload["metadata"] as? [String: Any]) -- Throws: Error during the connection process - -#### Parameters - -| Name | Description | -| ---- | ----------- | -| txConfig | The desired configuration to login to B2B2UA. User credentials must be the same as the | -| serverConfiguration | required to setup from VoIP push notification metadata. | -| pushMetaData | meta data payload from VOIP Push notification (this should be gotten from payload.dictionaryPayload[“metadata”] as? [String: Any]) | - -### `setEarpiece()` - -```swift -public func setEarpiece() -``` - -Select the internal earpiece as the audio output - -### `setSpeaker()` - -```swift -public func setSpeaker() -``` - -Select the speaker as the audio output diff --git a/docs_markdown/extensions/TxError.CallFailureReason.md b/docs_markdown/extensions/TxError.CallFailureReason.md deleted file mode 100644 index 5d891a61..00000000 --- a/docs_markdown/extensions/TxError.CallFailureReason.md +++ /dev/null @@ -1,13 +0,0 @@ -**EXTENSION** - -# `TxError.CallFailureReason` -```swift -extension TxError.CallFailureReason -``` - -## Properties -### `localizedDescription` - -```swift -public var localizedDescription: String? -``` diff --git a/docs_markdown/extensions/TxError.ClientConfigurationFailureReason.md b/docs_markdown/extensions/TxError.ClientConfigurationFailureReason.md deleted file mode 100644 index 6f1258bc..00000000 --- a/docs_markdown/extensions/TxError.ClientConfigurationFailureReason.md +++ /dev/null @@ -1,13 +0,0 @@ -**EXTENSION** - -# `TxError.ClientConfigurationFailureReason` -```swift -extension TxError.ClientConfigurationFailureReason -``` - -## Properties -### `localizedDescription` - -```swift -public var localizedDescription: String? -``` diff --git a/docs_markdown/extensions/TxError.ServerErrorReason.md b/docs_markdown/extensions/TxError.ServerErrorReason.md deleted file mode 100644 index d65372fe..00000000 --- a/docs_markdown/extensions/TxError.ServerErrorReason.md +++ /dev/null @@ -1,13 +0,0 @@ -**EXTENSION** - -# `TxError.ServerErrorReason` -```swift -extension TxError.ServerErrorReason -``` - -## Properties -### `localizedDescription` - -```swift -public var localizedDescription: String -``` diff --git a/docs_markdown/extensions/TxError.SocketFailureReason.md b/docs_markdown/extensions/TxError.SocketFailureReason.md deleted file mode 100644 index fd51a90f..00000000 --- a/docs_markdown/extensions/TxError.SocketFailureReason.md +++ /dev/null @@ -1,13 +0,0 @@ -**EXTENSION** - -# `TxError.SocketFailureReason` -```swift -extension TxError.SocketFailureReason: LocalizedError -``` - -## Properties -### `localizedDescription` - -```swift -public var localizedDescription: String? -``` diff --git a/docs_markdown/extensions/TxError.md b/docs_markdown/extensions/TxError.md deleted file mode 100644 index 4818ec34..00000000 --- a/docs_markdown/extensions/TxError.md +++ /dev/null @@ -1,13 +0,0 @@ -**EXTENSION** - -# `TxError` -```swift -extension TxError: LocalizedError -``` - -## Properties -### `errorDescription` - -```swift -public var errorDescription: String? -``` diff --git a/docs_markdown/protocols/TxClientDelegate.md b/docs_markdown/protocols/TxClientDelegate.md deleted file mode 100644 index 9bcdd78b..00000000 --- a/docs_markdown/protocols/TxClientDelegate.md +++ /dev/null @@ -1,137 +0,0 @@ -**PROTOCOL** - -# `TxClientDelegate` - -```swift -public protocol TxClientDelegate: AnyObject -``` - -Delegate protocol asociated with the TxClient -Methods for receiving TxClient events. - -## Methods -### `onSocketConnected()` - -```swift -func onSocketConnected() -``` - -Tells the delegate when the Telnyx Client has successfully connected to the Telnyx Backend - -### `onSocketDisconnected()` - -```swift -func onSocketDisconnected() -``` - -Tells the delegate when the Telnyx Client has disconnected from the Telnyx Backend - -### `onClientError(error:)` - -```swift -func onClientError(error: Error) -``` - -Tells the delegate when there's an error in the Telnyx Client -- Parameter error: error occurred inside the Telnyx Client - -#### Parameters - -| Name | Description | -| ---- | ----------- | -| error | error occurred inside the Telnyx Client | - -### `onClientReady()` - -```swift -func onClientReady() -``` - -Tells the delegate that the The Telnyx Client is ready to be used. -Has successfully connected and logged in - -### `onPushDisabled(success:message:)` - -```swift -func onPushDisabled(success:Bool,message:String) -``` - -Push notification is disabled for the current user - -### `onSessionUpdated(sessionId:)` - -```swift -func onSessionUpdated(sessionId: String) -``` - -Tells the delegate that the Telnyx Client session has been updated. -- Parameter sessionId: The new sessionId assigned to the client connection. - -#### Parameters - -| Name | Description | -| ---- | ----------- | -| sessionId | The new sessionId assigned to the client connection. | - -### `onCallStateUpdated(callState:callId:)` - -```swift -func onCallStateUpdated(callState: CallState, callId: UUID) -``` - -Tells the delegate that a call has been updated. -- Parameters: - - callState: The new call state - - callId: The UUID of the affected call - -#### Parameters - -| Name | Description | -| ---- | ----------- | -| callState | The new call state | -| callId | The UUID of the affected call | - -### `onIncomingCall(call:)` - -```swift -func onIncomingCall(call: Call) -``` - -Tells the delegate that someone is calling -- Parameter call: The call object of the incoming call. - -#### Parameters - -| Name | Description | -| ---- | ----------- | -| call | The call object of the incoming call. | - -### `onRemoteCallEnded(callId:)` - -```swift -func onRemoteCallEnded(callId: UUID) -``` - -Tells the delegate that a call has ended -- Parameter callId: the UUID of the call that has ended. - -#### Parameters - -| Name | Description | -| ---- | ----------- | -| callId | the UUID of the call that has ended. | - -### `onPushCall(call:)` - -```swift -func onPushCall(call: Call) -``` - -Tells the delegate that an INVITE has been received for the incoming push -- Parameter call: The call object of the incoming call. - -#### Parameters - -| Name | Description | -| ---- | ----------- | -| call | The call object of the incoming call. | \ No newline at end of file diff --git a/docs_markdown/structs/TxCallInfo.md b/docs_markdown/structs/TxCallInfo.md deleted file mode 100644 index ce0d7ea4..00000000 --- a/docs_markdown/structs/TxCallInfo.md +++ /dev/null @@ -1,34 +0,0 @@ -**STRUCT** - -# `TxCallInfo` - -```swift -public struct TxCallInfo -``` - -`TxCallInfo` contains the required information of the current Call - -## Properties -### `callId` - -```swift -public internal(set) var callId: UUID -``` - -The UUID of the call - -### `callerName` - -```swift -public internal(set) var callerName:String? -``` - -The caller name of the call - -### `callerNumber` - -```swift -public internal(set) var callerNumber: String? -``` - -The caller number of the call diff --git a/docs_markdown/structs/TxConfig.md b/docs_markdown/structs/TxConfig.md deleted file mode 100644 index c8e2b39f..00000000 --- a/docs_markdown/structs/TxConfig.md +++ /dev/null @@ -1,132 +0,0 @@ -**STRUCT** - -# `TxConfig` - -```swift -public struct TxConfig -``` - -This structure is intended to used for Telnyx SDK configurations. - -## Properties -### `sipUser` - -```swift -public internal(set) var sipUser: String? -``` - -### `password` - -```swift -public internal(set) var password: String? -``` - -### `token` - -```swift -public internal(set) var token: String? -``` - -### `pushNotificationConfig` - -```swift -public internal(set) var pushNotificationConfig: TxPushConfig? -``` - -### `ringBackTone` - -```swift -public internal(set) var ringBackTone: String? -``` - -### `ringtone` - -```swift -public internal(set) var ringtone: String? -``` - -### `reconnectClient` - -```swift -public internal(set) var reconnectClient: Bool = true -``` - -### `pushEnvironment` - -```swift -public internal(set) var pushEnvironment: PushEnvironment? -``` - -## Methods -### `init(sipUser:password:pushDeviceToken:ringtone:ringBackTone:pushEnvironment:logLevel:reconnectClient:)` - -```swift -public init(sipUser: String, password: String, - pushDeviceToken: String? = nil, - ringtone: String? = nil, - ringBackTone: String? = nil, - pushEnvironment: PushEnvironment? = nil, - logLevel: LogLevel = .none, - reconnectClient:Bool = true -) -``` - -Constructor of the Telnyx SDK configuration: Login using sip user and password. -- Parameters: - - sipUser: sipUser the SIP user - - password: password the password of the SIP user. - - pushDeviceToken: (Optional) the device push notification token. This is required to receive Inbound calls notifications. - - ringtone: (Optional) The audio file name to be played when receiving an incoming call. e.g.: "my-ringtone.mp3" - - ringBackTone: (Optional) The audio file to be played when calling. e.g.: "my-ringbacktone.mp3" - - logLevel: (Optional) Can select the verbosity level of the SDK logs. Is set to `.none` as default - -#### Parameters - -| Name | Description | -| ---- | ----------- | -| sipUser | sipUser the SIP user | -| password | password the password of the SIP user. | -| pushDeviceToken | (Optional) the device push notification token. This is required to receive Inbound calls notifications. | -| ringtone | (Optional) The audio file name to be played when receiving an incoming call. e.g.: “my-ringtone.mp3” | -| ringBackTone | (Optional) The audio file to be played when calling. e.g.: “my-ringbacktone.mp3” | -| logLevel | (Optional) Can select the verbosity level of the SDK logs. Is set to `.none` as default | - -### `init(token:pushDeviceToken:ringtone:ringBackTone:pushEnvironment:logLevel:)` - -```swift -public init(token: String, - pushDeviceToken: String? = nil, - ringtone: String? = nil, - ringBackTone: String? = nil, - pushEnvironment: PushEnvironment? = nil, - logLevel: LogLevel = .none) -``` - -Constructor of the Telnyx SDK configuration: Login using a token. -- Parameters: - - token: Token generated from https://developers.telnyx.com/docs/v2/webrtc/quickstart - - pushDeviceToken: (Optional) the device push notification token. This is required to receive Inbound calls notifications. - - ringtone: (Optional) The audio file name to be played when receiving an incoming call. e.g.: "my-ringtone.mp3" - - ringBackTone: (Optional) The audio file name to be played when calling. e.g.: "my-ringbacktone.mp3" - - logLevel: (Optional) Can select the verbosity level of the SDK logs. Is set to `.none` as default - - serverConfiguration: (Optional) To define a custom `signaling server` and `TURN/ STUN servers`. As default we use the internal Telnyx Production servers. - -#### Parameters - -| Name | Description | -| ---- | ----------- | -| token | Token generated from https://developers.telnyx.com/docs/v2/webrtc/quickstart | -| pushDeviceToken | (Optional) the device push notification token. This is required to receive Inbound calls notifications. | -| ringtone | (Optional) The audio file name to be played when receiving an incoming call. e.g.: “my-ringtone.mp3” | -| ringBackTone | (Optional) The audio file name to be played when calling. e.g.: “my-ringbacktone.mp3” | -| logLevel | (Optional) Can select the verbosity level of the SDK logs. Is set to `.none` as default | -| serverConfiguration | (Optional) To define a custom `signaling server` and `TURN/ STUN servers`. As default we use the internal Telnyx Production servers. | - -### `validateParams()` - -```swift -public func validateParams() throws -``` - -Validate if TxConfig parameters are valid -- Throws: Throws TxConfig parameters errors diff --git a/docs_markdown/structs/TxPushConfig.md b/docs_markdown/structs/TxPushConfig.md deleted file mode 100644 index 74b35808..00000000 --- a/docs_markdown/structs/TxPushConfig.md +++ /dev/null @@ -1,28 +0,0 @@ -**STRUCT** - -# `TxPushConfig` - -```swift -public struct TxPushConfig -``` - -This class contains all the properties related to Push Notifications - -## Properties -### `PUSH_NOTIFICATION_PROVIDER` - -```swift -public static let PUSH_NOTIFICATION_PROVIDER: String = "ios" -``` - -### `pushDeviceToken` - -```swift -public internal(set) var pushDeviceToken: String? -``` - -### `pushNotificationProvider` - -```swift -public internal(set) var pushNotificationProvider: String = PUSH_NOTIFICATION_PROVIDER -``` diff --git a/docs_markdown/structs/TxPushIPConfig.md b/docs_markdown/structs/TxPushIPConfig.md deleted file mode 100644 index ebceaa57..00000000 --- a/docs_markdown/structs/TxPushIPConfig.md +++ /dev/null @@ -1,29 +0,0 @@ -**STRUCT** - -# `TxPushIPConfig` - -```swift -public struct TxPushIPConfig -``` - -This class contains all the properties related to Server Confuguration from Push - -## Properties -### `rtc_ip` - -```swift -public internal(set) var rtc_ip:String -``` - -### `rtc_port` - -```swift -public internal(set) var rtc_port:Int -``` - -## Methods -### `init(rtc_ip:rtc_port:)` - -```swift -public init(rtc_ip: String, rtc_port: Int) -``` diff --git a/docs_markdown/structs/TxServerConfiguration.md b/docs_markdown/structs/TxServerConfiguration.md deleted file mode 100644 index 589b30cc..00000000 --- a/docs_markdown/structs/TxServerConfiguration.md +++ /dev/null @@ -1,55 +0,0 @@ -**STRUCT** - -# `TxServerConfiguration` - -```swift -public struct TxServerConfiguration -``` - -This class contains all the properties related to: Signaling server URL and STUN / TURN servers - -## Properties -### `environment` - -```swift -public internal(set) var environment: WebRTCEnvironment = .production -``` - -### `signalingServer` - -```swift -public internal(set) var signalingServer: URL -``` - -### `pushMetaData` - -```swift -public internal(set) var pushMetaData: [String:Any]? -``` - -### `webRTCIceServers` - -```swift -public internal(set) var webRTCIceServers: [RTCIceServer] -``` - -## Methods -### `init(signalingServer:webRTCIceServers:environment:pushMetaData:)` - -```swift -public init(signalingServer: URL? = nil, webRTCIceServers: [RTCIceServer]? = nil, environment: WebRTCEnvironment = .production,pushMetaData:[String: Any]? = nil) -``` - -Constructor for the Server configuration parameters. -- Parameters: - - signalingServer: To define the signaling server URL `wss://address:port` - - webRTCIceServers: To define custom ICE servers - - pushMetaData: Contains push info when a PN is received - -#### Parameters - -| Name | Description | -| ---- | ----------- | -| signalingServer | To define the signaling server URL `wss://address:port` | -| webRTCIceServers | To define custom ICE servers | -| pushMetaData | Contains push info when a PN is received | \ No newline at end of file