Commit 630b21ab by Huang Linyu

add 0 before the phone number that not belong to shanghai when calling

parent debe0b5e
......@@ -229,6 +229,12 @@ public class SipPhoneControl {
String srcGateway = null;
String srcAccessNumber = null;
GetMobileInfoResponse response = sipPhoneService.getMobileInfo(dst);
//如果是上海的手机号码,不需加0,非上海手机号码, 需在手机号码前面加0代表区号
if("0".equals(response.getErrCode()) && "021".equals(response.getAreaCode())){
}else{
dst = "0"+dst;
}
//获得绑定的分机号码 分机A
AgentSipPhoneBindInfoResponse bindInfo = sipPhoneService.getBindInfo(userName, null);
......
......@@ -20,13 +20,7 @@ import javax.websocket.server.ServerEndpoint;
public class NewStateWebSocket {
public NewStateWebSocket(){}
private static NewStateWebSocket single = null;
public static NewStateWebSocket getInstance(){
if(single==null){
single = new NewStateWebSocket();
}
return single;
}
private static Map<String, Session> sessionMap=new HashMap<String, Session>();//在线的客户端session集合,只在第一次new的时候初始化。
/**
......
......@@ -71,21 +71,7 @@ public final class UserDetailsService extends BaseService implements org.springf
dbAuths = new ArrayList<GrantedAuthority>(dbAuthsSet);
}
/*//将当前用户添加到callcenter中的 Agent
AgentSipPhoneBindInfoResponse aspbiresp = sipPhoneService.getBindInfo(adminUserBean.getUserName(), null);
if("SUCCESS".equals( aspbiresp.getErrMsg()) &&StringUtils.isNotBlank(aspbiresp.getSipPhoneName())){
// adminUserBean.setSipPhone(aspbiresp.getSipPhoneName());
}else{
// Agent agent = new Agent();
// agent.setAgentName(adminUserBean.getUserName());
// agent.setAid(adminUserBean.getUserName());
// agent.setJobNumber((long)adminUserBean.getId());
// List<Agent> agentList = new ArrayList<Agent>();
// agentList.add(agent);
//同步Agent
sipPhoneService.agentSave(adminUserBean.getUserName(),adminUserBean.getUserName(), 0l);
}
*/
// Ruisheng ruisheng = new Ruisheng();
Runnable myRunnable = new Ruisheng(adminUserBean);
Thread ruishengThread = new Thread(myRunnable);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment