|
@@ -437,6 +437,7 @@ export default {
|
|
|
|
|
|
|
|
// ===== 委托通话标记 =====
|
|
// ===== 委托通话标记 =====
|
|
|
delegatedCallActive: false, // 是否有通话委托给弹窗的phoneBar
|
|
delegatedCallActive: false, // 是否有通话委托给弹窗的phoneBar
|
|
|
|
|
+ isOutboundInProgress: false, // 外呼进行中(含 SIP 回振坐席阶段,需自动接听)
|
|
|
incomingJsipCall: false, // 是否为JsSIP直接来电(转人工等)
|
|
incomingJsipCall: false, // 是否为JsSIP直接来电(转人工等)
|
|
|
pendingManualNavigation: false // 转人工来电结束后是否需要跳转到通话列表
|
|
pendingManualNavigation: false // 转人工来电结束后是否需要跳转到通话列表
|
|
|
};
|
|
};
|
|
@@ -1110,6 +1111,7 @@ export default {
|
|
|
if (!this.ccSocketConnected && this.ccConnectingReject) this.ccConnectingReject(new Error('服务器错误'));
|
|
if (!this.ccSocketConnected && this.ccConnectingReject) this.ccConnectingReject(new Error('服务器错误'));
|
|
|
});
|
|
});
|
|
|
this.ccPhoneBar.on(EventList.OUTBOUND_START, (msg) => {
|
|
this.ccPhoneBar.on(EventList.OUTBOUND_START, (msg) => {
|
|
|
|
|
+ this.isOutboundInProgress = true;
|
|
|
this.isIncomingCall = false;
|
|
this.isIncomingCall = false;
|
|
|
this.callStatus = UI_STATE.RINGING;
|
|
this.callStatus = UI_STATE.RINGING;
|
|
|
this.showLeftButton = false;
|
|
this.showLeftButton = false;
|
|
@@ -1332,6 +1334,11 @@ export default {
|
|
|
},
|
|
},
|
|
|
onRing(event) {
|
|
onRing(event) {
|
|
|
if (!event.outgoing) {
|
|
if (!event.outgoing) {
|
|
|
|
|
+ // 外呼时呼叫中心回振坐席 SIP,自动接听,不展示来电 UI
|
|
|
|
|
+ if (this.isOutboundInProgress) {
|
|
|
|
|
+ if (this.phone) this.phone.Answer();
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
this.isIncomingCall = true;
|
|
this.isIncomingCall = true;
|
|
|
this.incomingJsipCall = true;
|
|
this.incomingJsipCall = true;
|
|
|
this.incomingCaller = event.caller || '';
|
|
this.incomingCaller = event.caller || '';
|
|
@@ -1370,6 +1377,7 @@ export default {
|
|
|
this.rightButtonHangup = false;
|
|
this.rightButtonHangup = false;
|
|
|
}
|
|
}
|
|
|
this.delegatedCallActive = false;
|
|
this.delegatedCallActive = false;
|
|
|
|
|
+ this.isOutboundInProgress = false;
|
|
|
this.incomingJsipCall = false;
|
|
this.incomingJsipCall = false;
|
|
|
this.incomingCaller = '';
|
|
this.incomingCaller = '';
|
|
|
// 注意:不在_resetCallState中重置pendingManualNavigation,它由onSessionClosed消费
|
|
// 注意:不在_resetCallState中重置pendingManualNavigation,它由onSessionClosed消费
|
|
@@ -1441,12 +1449,9 @@ export default {
|
|
|
|
|
|
|
|
// 人工外呼弹窗打开时,委托弹窗 phoneBar(含通话记录、工作流等业务逻辑)
|
|
// 人工外呼弹窗打开时,委托弹窗 phoneBar(含通话记录、工作流等业务逻辑)
|
|
|
if (window.__floatingPhoneCallDelegateActive) {
|
|
if (window.__floatingPhoneCallDelegateActive) {
|
|
|
|
|
+ this.isOutboundInProgress = true;
|
|
|
this.$root.$emit('floating-softphone-call-triggered', phoneNumber);
|
|
this.$root.$emit('floating-softphone-call-triggered', phoneNumber);
|
|
|
this.delegatedCallActive = true;
|
|
this.delegatedCallActive = true;
|
|
|
- this.isIncomingCall = false;
|
|
|
|
|
- this.callStatus = UI_STATE.RINGING;
|
|
|
|
|
- this.showLeftButton = false;
|
|
|
|
|
- this.showRightButton = false;
|
|
|
|
|
this.showStatus('拨号中...', 'info');
|
|
this.showStatus('拨号中...', 'info');
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
@@ -1454,12 +1459,10 @@ export default {
|
|
|
// 普通页面:使用浮动软电话自身的 ccPhoneBar 直接外呼
|
|
// 普通页面:使用浮动软电话自身的 ccPhoneBar 直接外呼
|
|
|
try {
|
|
try {
|
|
|
this.delegatedCallActive = false;
|
|
this.delegatedCallActive = false;
|
|
|
- this.isIncomingCall = false;
|
|
|
|
|
- this.callStatus = UI_STATE.RINGING;
|
|
|
|
|
- this.showLeftButton = false;
|
|
|
|
|
- this.showRightButton = false;
|
|
|
|
|
|
|
+ this.isOutboundInProgress = true;
|
|
|
this.ccPhoneBar.call(phoneNumber, 'audio', VideoLevels.HD.levelId);
|
|
this.ccPhoneBar.call(phoneNumber, 'audio', VideoLevels.HD.levelId);
|
|
|
} catch (err) {
|
|
} catch (err) {
|
|
|
|
|
+ this.isOutboundInProgress = false;
|
|
|
console.error('[FloatingSoftPhone] 外呼失败:', err);
|
|
console.error('[FloatingSoftPhone] 外呼失败:', err);
|
|
|
this.showStatus('拨号失败', 'error');
|
|
this.showStatus('拨号失败', 'error');
|
|
|
}
|
|
}
|