-
Notifications
You must be signed in to change notification settings - Fork 19
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 Call Control and other call ids to call state #46
Conversation
The RTC backend is going to send `telnyx_call_control_id`, `telnyx_session_id` and `telnyx_leg_id` params in the `telnyx_rtc.invite` message. We then save it inside the Call object so that it is accessible in upcoming `notification` events. This should enable customers to cross-reference calls between the Call Control backend and the WebRTC client. This commit includes a few fixes to the VertoHandler tests.
@@ -1,275 +1,413 @@ | |||
import behaveLikeBaseSession from './behaveLike/BaseSession.spec' | |||
import VertoHandler from './webrtc/VertoHandler' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed this VertoHandler import
VertoHandler.call(this, Verto) | ||
LayoutHandler.call(this, Verto) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed these calls
if (params.telnyx_call_control_id) { | ||
callOptions.telnyxCallControlId = params.telnyx_call_control_id; | ||
} | ||
|
||
if (params.telnyx_session_id) { | ||
callOptions.telnyxSessionId = params.telnyx_session_id; | ||
} | ||
|
||
if (params.telnyx_leg_id) { | ||
callOptions.telnyxLegId = params.telnyx_leg_id; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code to expose telnyxSessionId
and other ids
// Optional, sent by Telnyx RTC | ||
telnyxCallControlId?: string; | ||
telnyxSessionId?: string; | ||
telnyxLegId?: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added options call options from invite
The RTC backend is going to send
telnyx_call_control_id
,telnyx_session_id
andtelnyx_leg_id
params in thetelnyx_rtc.invite
message. We then save it inside the Call object sothat it is accessible in upcoming
notification
events.This should enable customers to cross-reference calls between the Call
Control backend and the WebRTC client.
This PR includes a few fixes to the VertoHandler tests.
📝 To Do
✋ Manual testing
npm link
in this repositorynpm link @telnyx/webrtc
in the repository you will run this code on (e.g. call-center/web-client)rtc.telnyx.com
messagestelnyx_rtc.invite
message params. Confirm it hastelnyx_session_id
andtelnyx_leg_id
.telnyx_call_control_id
to be implemented.telnyxSessionId
andtelnyxLegId
as call options.🦊 Browser testing
Desktop
📸 Screenshots