-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #142 from team-telnyx/docs/WEBRTC-2341-markdown
[WEBRTC-2341] [DOCS] Markdown docs
- Loading branch information
Showing
29 changed files
with
1,473 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,7 +61,7 @@ jobs: | |
with: | ||
add-paths: | | ||
docs/ | ||
docs_markdown/ | ||
docs-markdown/ | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
committer: TelnyxIntegrations <[email protected]> | ||
base: main | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# 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-19 12:53:48 +0000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
**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() | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
**CLASS** | ||
|
||
# `FileLogger` | ||
|
||
```swift | ||
public class FileLogger | ||
``` | ||
|
||
## Properties | ||
### `shared` | ||
|
||
```swift | ||
public static let shared = FileLogger() | ||
``` | ||
|
||
## Methods | ||
### `log(_:)` | ||
|
||
```swift | ||
public func log(_ message: String) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
**CLASS** | ||
|
||
# `StatsMessage` | ||
|
||
```swift | ||
public class StatsMessage | ||
``` |
Oops, something went wrong.