Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Telnyx ID getter #131

Merged
merged 1 commit into from
Jan 9, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions packages/js/src/Modules/Verto/webrtc/BaseCall.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,24 @@ export default abstract class BaseCall implements IWebRTCCall {
this._targetNodeId = what;
}

/**
* Gets Telnyx call IDs, if using Telnyx Call Control services.
* You can use these IDs to identify specific calls in your application code.
*
* @examples
*
* ```js
* const { telnyxCallControlId, telnyxSessionId, telnyxLegId } = call.telnyxIDs;
* ```
*/
get telnyxIDs() {
return {
telnyxCallControlId: this.options.telnyxCallControlId,
telnyxSessionId: this.options.telnyxSessionId,
telnyxLegId: this.options.telnyxLegId,
};
}

/**
* Gets the local stream of the call.
* This can be used in a video/audio element to play the local media.
Expand Down