support sbcCallId in calling/status hook (#934)

* support sbcCallId in calling/status hook

* support sbcCallId in calling/status hook

* support sbcCallId in calling/status hook

* wip

* wip

* wip
This commit is contained in:
Hoan Luu Huu
2024-10-15 05:00:09 +07:00
committed by GitHub
parent f541ff1a15
commit e7fd40e297
4 changed files with 7 additions and 0 deletions

View File

@@ -213,6 +213,8 @@ class SingleDialer extends Emitter {
},
cbProvisional: (prov) => {
const status = {sipStatus: prov.status, sipReason: prov.reason};
// Update call-id for sbc outbound INVITE
this.callInfo.sbcCallid = prov.get('X-CID');
if ([180, 183].includes(prov.status) && prov.body) {
if (status.callStatus !== CallStatus.EarlyMedia) {
status.callStatus = CallStatus.EarlyMedia;