Debugging VOIP calls: How to get your CallId #5025
alkwa-msft
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This CallId allows both us and yourself to debug what happened to a specific call.
When starting prototyping of any calls we encourage you to print out the callId in the case that the call may fail for whatever reason.
There can be many different strings you encounter during development. I am putting together a set of values you may encounter and then indicating which one is correct.
id
property of the call object ✅Important notes
You need to make sure your call state is 'connected'
Getting the callId with the Javascript Calling SDK
Once the call is connected you should be able to write code to get the string value from
call.id
Here is a working example you can try out. . All you need to set up is your ACS token which you can create dynamically from Azure Portal
console.log('my call Id for this group call is '+call.id)
If you want to read the official documentation for how to get the CallId, please check out this link
Getting the callId with the Web UI Library
Once the call is connected you can listen to the state listener for when the call is connected and then get the call id in a similar fashion to the example above.
Here is a working example you can try out. . All you need to set up is your ACS token which you can create dynamically from Azure Portal
callAdapter.onStateChange((state) => { if(state?.call?.id ) { console.log('Call Id: '+state.call.id+''); } });
The officially supported path is to build a typescript/react environment locally however once set up, listening to the adapter state changes and grabbing the callId would be the same code as the CallComposite.js example above
Try this out today and happy debugging! 🚀
Beta Was this translation helpful? Give feedback.
All reactions