Skip to content

Commit

Permalink
How to get telephony session info
Browse files Browse the repository at this point in the history
  • Loading branch information
tylerlong committed Aug 13, 2024
1 parent a133a8c commit bcffbd0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions demo/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,10 @@ $(() => {
}

function onInvite(session: WebPhoneInvitation) {
console.log(
'Telephony Session Info:',
session.request.headers['P-Rc-Api-Ids'] || session.request.headers['p-rc-api-ids'],
);
const $modal = cloneTemplate($incomingTemplate).modal({
backdrop: 'static',
});
Expand Down Expand Up @@ -556,6 +560,10 @@ $(() => {
homeCountryId,
});

session.on('accepted', (message) => {
console.log('Telephony Session Info:', message.headers['P-Rc-Api-Ids'] || message.headers['p-rc-api-ids']);
});

onAccepted(session);
}

Expand Down

0 comments on commit bcffbd0

Please sign in to comment.