TP-89230 | universal call sdk
This commit is contained in:
@@ -4,12 +4,12 @@ import {AmeyoInitializationOptions, RequestKeys, StateType} from "./types.ts";
|
||||
import MessagingType from "../types/MessagingType.ts";
|
||||
import {
|
||||
ameyoHangupUser,
|
||||
attachOmniqueService, autoSelectExtension,
|
||||
//attachOmniqueService, autoSelectExtension,
|
||||
getSipAccountInfo,
|
||||
loginInAmeyo,
|
||||
selectCampaign,
|
||||
//selectCampaign,
|
||||
setAgentActive, setAgentOnBreak,
|
||||
setAutoStatus
|
||||
//setAutoStatus
|
||||
} from "./api.ts";
|
||||
import {
|
||||
acceptSipCall,
|
||||
@@ -96,26 +96,26 @@ class AmeyoAdapter implements IAdapter {
|
||||
this.sipAccountInfo = payload?.data?.response;
|
||||
setAgentActive(this.sessionId);
|
||||
}
|
||||
if(payload?.data?.requestKey === RequestKeys.AMEYO_AVAILABLE) {
|
||||
setAutoStatus(this.sessionId);
|
||||
attachOmniqueService(this.sessionId, this.userName.toLowerCase());
|
||||
|
||||
}
|
||||
if (payload?.data?.requestKey === RequestKeys.OMNIQUEUE_SERVICE) {
|
||||
selectCampaign(this.sessionId, this.userName.toLowerCase());
|
||||
}
|
||||
if(payload?.data?.requestKey === RequestKeys.SELECT_CAMPAIGN) {
|
||||
console.log('campaign selected', payload?.data?.response);
|
||||
autoSelectExtension(this.sessionId, this.userName.toLowerCase());
|
||||
|
||||
}
|
||||
if(payload?.data?.requestKey === RequestKeys.AUTO_SELECT_EXTENSION) {
|
||||
console.log('auto select extension', payload?.data?.response);
|
||||
setAutoStatus(this.sessionId)
|
||||
}
|
||||
if(payload?.data?.requestKey === RequestKeys.AMEYO_ON_BREAK) {
|
||||
setAutoStatus(this.sessionId);
|
||||
}
|
||||
// if(payload?.data?.requestKey === RequestKeys.AMEYO_AVAILABLE) {
|
||||
// setAutoStatus(this.sessionId);
|
||||
// attachOmniqueService(this.sessionId, this.userName.toLowerCase());
|
||||
//
|
||||
// }
|
||||
// if (payload?.data?.requestKey === RequestKeys.OMNIQUEUE_SERVICE) {
|
||||
// selectCampaign(this.sessionId, this.userName.toLowerCase());
|
||||
// }
|
||||
// if(payload?.data?.requestKey === RequestKeys.SELECT_CAMPAIGN) {
|
||||
// console.log('campaign selected', payload?.data?.response);
|
||||
// autoSelectExtension(this.sessionId, this.userName.toLowerCase());
|
||||
//
|
||||
// }
|
||||
// if(payload?.data?.requestKey === RequestKeys.AUTO_SELECT_EXTENSION) {
|
||||
// console.log('auto select extension', payload?.data?.response);
|
||||
// setAutoStatus(this.sessionId)
|
||||
// }
|
||||
// if(payload?.data?.requestKey === RequestKeys.AMEYO_ON_BREAK) {
|
||||
// setAutoStatus(this.sessionId);
|
||||
// }
|
||||
}
|
||||
|
||||
_registerMessageListener = async ({ data }: GenericObject) => {
|
||||
|
||||
Reference in New Issue
Block a user