fix(sip-invite) fix sip invite jwt not being sent correctly

This commit is contained in:
Tudor-Ovidiu Avram 2021-04-07 15:37:17 +03:00
parent e5277deed5
commit 32ecd6310c
1 changed files with 5 additions and 2 deletions

View File

@ -825,13 +825,15 @@ export function inviteSipEndpoints( // eslint-disable-line max-params
return Promise.resolve();
}
const baseUrl = window.location.href.toLowerCase().replace(`/${roomName}`, '');
return fetch(
`${sipInviteUrl}?token=${jwt}`,
sipInviteUrl,
{
body: JSON.stringify({
callParams: {
callUrlInfo: {
baseUrl: window.location.origin,
baseUrl,
callName: roomName
}
},
@ -842,6 +844,7 @@ export function inviteSipEndpoints( // eslint-disable-line max-params
}),
method: 'POST',
headers: {
'Authorization': `Bearer ${jwt}`,
'Content-Type': 'application/json'
}
}