ws command can have call_id

This commit is contained in:
Dave Horton
2022-03-10 10:52:48 -05:00
parent 15d784a4b0
commit 8c5cdd374b
2 changed files with 9 additions and 9 deletions

View File

@@ -726,7 +726,7 @@ class CallSession extends Emitter {
this.taskIdx = 0;
}
_onCommand({msgid, command, queueCommand, data}) {
_onCommand({msgid, command, call_sid, queueCommand, data}) {
this.logger.info({msgid, command, queueCommand}, 'CallSession:_onCommand - received command');
switch (command) {
case 'redirect':
@@ -751,7 +751,7 @@ class CallSession extends Emitter {
break;
case 'mute:status':
this._lccMuteStatus(this.callSid, data);
this._lccMuteStatus(call_sid, data);
break;
case 'conf:mute-status':
@@ -767,11 +767,11 @@ class CallSession extends Emitter {
break;
case 'whisper':
this._lccWhisper(data, this.callSid);
this._lccWhisper(data, call_sid);
break;
case 'sip:request':
this._lccSipRequest(data, this.callSid)
this._lccSipRequest(data, call_sid)
.catch((err) => {
this.logger.info({err, data}, `CallSession:_onCommand - error sending ${data.method}`);
});