Skip to main content

Is there a way to obtain the sessionId or telephonySessionId of a session object in the webrtc library without making a request to the /restapi/v1.0/account/accountId/extension/extensionId/active-calls and finding the current session data by phone number? I'm referring to the session returned by this function

var session = webPhone.userAgent.invite(/* ... */);

You can get the session id nor the telephony session id from the WebPhone object. You have to call the platform to get the user's active call to grab the ids.

async function getPresenceActiveCalls() {
return await platform.get('/restapi/v1.0/account/~/extension/~/presence?detailedTelephonyState=true');
}

Reply