|
@@ -561,32 +561,6 @@ private:
|
|
|
#endif //RVC_OS_WIN
|
|
|
}
|
|
|
|
|
|
- ErrorCodeEnum MakeCall(const char *hint_callnum,int nSipServer)
|
|
|
- {
|
|
|
- if (!m_pPhoneClient) {
|
|
|
- return Error_NetBroken;
|
|
|
- }
|
|
|
-
|
|
|
- if((m_strSIPCallNum[nSipServer]=="")&&(m_strSIPProxyIP[nSipServer]=="")&&(m_iSIPProxyPort[nSipServer]==0)){
|
|
|
- return Error_Param;
|
|
|
- }
|
|
|
-
|
|
|
- CSimpleStringA strCode;
|
|
|
- PhoneService_MakeCall_Req Req;
|
|
|
- PhoneService_MakeCall_Ans Ans;
|
|
|
- Req.to_uri = MakeCallUri(hint_callnum,nSipServer);
|
|
|
-
|
|
|
- PhoneService_SetCallingParam_Info info;
|
|
|
- info.CallType = NORMAL_CALLTYPE;
|
|
|
- if (DOUBLERECORD_CALLTYPE == m_CallingParam.nCallType){
|
|
|
- info.CallType = DOUBLERECORD_CALLTYPE;
|
|
|
- }
|
|
|
- (*m_pPhoneClient)(EntityResource::getLink().upgradeLink())->SetCallingParam(info);
|
|
|
-
|
|
|
- ErrorCodeEnum Error = (*m_pPhoneClient)(EntityResource::getLink().upgradeLink())->MakeCall(Req, Ans, 10000);
|
|
|
- return Error;
|
|
|
- }
|
|
|
-
|
|
|
ErrorCodeEnum MakeCall(const char *to_uri, const char *from_uri, const char *call_id, CallingParam callingparam)
|
|
|
{
|
|
|
if (!m_pPhoneClient){
|
|
@@ -641,12 +615,11 @@ private:
|
|
|
return Error_NetBroken;
|
|
|
}
|
|
|
|
|
|
- if ((m_strChanProxyIP[nChanServer]=="")&&(m_strChanCallNum[nChanServer]=="")&&(m_iChanProxyPort[nChanServer]==0)){
|
|
|
+ if ((m_strChanProxyIP[nChanServer]=="")&&(m_iChanProxyPort[nChanServer]==0)){
|
|
|
return Error_Param;
|
|
|
}
|
|
|
ChannelService_Connect_Req Req;
|
|
|
ChannelService_Connect_Ans Ans;
|
|
|
- Req.callno = m_strChanCallNum[nChanServer];
|
|
|
Req.ip = m_strChanProxyIP[nChanServer];
|
|
|
Req.port = m_iChanProxyPort[nChanServer];
|
|
|
return m_pChannelClient->Connect(Req, Ans, 10000);
|
|
@@ -661,11 +634,10 @@ private:
|
|
|
ChannelService_Connect_Req Req;
|
|
|
ChannelService_Connect_Ans Ans;
|
|
|
|
|
|
- if ((m_strChanProxyIP[nChanServer]=="")&&(m_strChanCallNum[nChanServer]=="")&&(m_iChanProxyPort[nChanServer]==0)){
|
|
|
+ if ((m_strChanProxyIP[nChanServer]=="")&&(m_iChanProxyPort[nChanServer]==0)){
|
|
|
return Error_Param;
|
|
|
}
|
|
|
else{
|
|
|
- Req.callno = m_strChanCallNum[nChanServer];
|
|
|
Req.ip = m_strChanProxyIP[nChanServer];
|
|
|
Req.port = m_iChanProxyPort[nChanServer];
|
|
|
Req.etype = NORMAL_CALLTYPE;
|
|
@@ -691,37 +663,11 @@ private:
|
|
|
callnum, serverip, serverport);
|
|
|
}
|
|
|
|
|
|
- CSimpleStringA MakeCallUri(const char *hint_callnum,int nServer)
|
|
|
- {
|
|
|
- if (m_iSIPProxyPort[nServer] == 5060)
|
|
|
- {
|
|
|
- return CSimpleStringA::Format("sip:%s@%s;transport=UDP",
|
|
|
- hint_callnum, m_strSIPProxyIP[nServer].GetData());
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- return CSimpleStringA::Format("sip:%s@%s:%d;transport=UDP",
|
|
|
- hint_callnum, m_strSIPProxyIP[nServer].GetData(), m_iSIPProxyPort[nServer]);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
ErrorCodeEnum LoadConfig()
|
|
|
{
|
|
|
int iTimeOut = RVC_DEFAULT_HTTPTIMEOUT;
|
|
|
int iPrintDbg = 0;
|
|
|
SpIniMappingTable table;
|
|
|
- table.AddEntryString("CounterConnector", "sip_proxy_ip", m_strSIPProxyIP[0], NULL);
|
|
|
- table.AddEntryInt("CounterConnector", "sip_proxy_port", m_iSIPProxyPort[0], 0);
|
|
|
- table.AddEntryString("CounterConnector", "sip_default_call_no", m_strSIPCallNum[0], NULL);
|
|
|
- table.AddEntryString("CounterConnector", "chan_proxy_ip", m_strChanProxyIP[0], NULL);
|
|
|
- table.AddEntryInt("CounterConnector", "chan_proxy_port", m_iChanProxyPort[0], 0);
|
|
|
- table.AddEntryString("CounterConnector", "chan_default_call_no", m_strChanCallNum[0], NULL);
|
|
|
- table.AddEntryString("CounterConnector", "sip_proxy_ip_backup", m_strSIPProxyIP[1], NULL);
|
|
|
- table.AddEntryInt("CounterConnector", "sip_proxy_port_backup", m_iSIPProxyPort[1], 0);
|
|
|
- table.AddEntryString("CounterConnector", "sip_default_call_no_backup", m_strSIPCallNum[1], NULL);
|
|
|
- table.AddEntryString("CounterConnector", "chan_proxy_ip_backup", m_strChanProxyIP[1], NULL);
|
|
|
- table.AddEntryInt("CounterConnector", "chan_proxy_port_backup", m_iChanProxyPort[1], 0);
|
|
|
- table.AddEntryString("CounterConnector", "chan_default_call_no_backup", m_strChanCallNum[1], NULL);
|
|
|
table.AddEntryString("CounterConnector", "default_voip_server", m_strDefaultServer, NULL);
|
|
|
table.AddEntryString("CounterConnector", "http_call_route_addr", m_strHttpCallRouteAddr, NULL);
|
|
|
table.AddEntryInt("CounterConnector", "http_timeout", iTimeOut, 0);
|
|
@@ -846,7 +792,6 @@ public:
|
|
|
int m_iFailedLastState;
|
|
|
bool m_bConAssist;
|
|
|
bool m_bConSipphone;
|
|
|
- int m_iCallRouteType;
|
|
|
CSimpleStringA m_strQueueName;
|
|
|
CSimpleStringA m_strAddClientLevel;
|
|
|
bool m_bNeedQueueName;
|
|
@@ -857,12 +802,8 @@ private:
|
|
|
ChannelService_ClientBase *m_pChannelClient;
|
|
|
SyncService_ClientBase*m_pSyncServiceClient;
|
|
|
CSimpleStringA m_strTerminalId;
|
|
|
- CSimpleStringA m_strSIPProxyIP[2];
|
|
|
- int m_iSIPProxyPort[2];
|
|
|
- CSimpleStringA m_strSIPCallNum[2];
|
|
|
CSimpleStringA m_strChanProxyIP[2];
|
|
|
int m_iChanProxyPort[2];
|
|
|
- CSimpleStringA m_strChanCallNum[2];
|
|
|
|
|
|
//去分行化
|
|
|
node_list_head_t *m_pCallRouteList;
|