fixed cannot answer inbound call

This commit is contained in:
Quan HL
2024-09-09 16:43:18 +07:00
parent 43df0fcd2c
commit 985b105207

View File

@@ -67,7 +67,7 @@ export default class SipSession extends events.EventEmitter {
({ response }: { response: IncomingResponse }) => {
this.emit(SipConstants.SESSION_ANSWERED, {
status: SipConstants.SESSION_ANSWERED,
callSid: response.hasHeader("X-Call-Sid")
callSid: response?.hasHeader("X-Call-Sid")
? response.getHeader("X-Call-Sid")
: null,
});