Skip to content

Commit

Permalink
feat: add telnyx id getter (#131)
Browse files Browse the repository at this point in the history
  • Loading branch information
SuaYoo authored Jan 9, 2021
1 parent 7abc8db commit 0cc6a41
Showing 1 changed file with 18 additions and 0 deletions.
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

0 comments on commit 0cc6a41

Please sign in to comment.