|
|
@@ -6,12 +6,12 @@ import midware.service.eslclient.*;
|
|
6
|
6
|
import midware.service.eslclient.entity.Agent;
|
|
7
|
7
|
import midware.service.eslclient.entity.Channel;
|
|
8
|
8
|
import midware.service.eslclient.entity.Session;
|
|
9
|
|
-import midware.util.config.CommonConfig;
|
|
10
|
9
|
import midware.util.config.EslClientConfig;
|
|
11
|
10
|
import midware.util.enums.EslAgentEnum;
|
|
12
|
11
|
import midware.util.enums.EslCommandEnum;
|
|
13
|
12
|
import midware.util.enums.EslEventEnum;
|
|
14
|
13
|
import midware.util.helper.SecretHelper;
|
|
|
14
|
+import midware.util.helper.SpringHelper;
|
|
15
|
15
|
import midware.util.helper.StringHelper;
|
|
16
|
16
|
import midware.util.helper.TtsHelper;
|
|
17
|
17
|
import org.freeswitch.esl.client.inbound.Client;
|
|
|
@@ -542,7 +542,8 @@ public class EslClientService {
|
|
542
|
542
|
params.put("hotwords", null);
|
|
543
|
543
|
String arg = "";
|
|
544
|
544
|
if (isAsr) {
|
|
545
|
|
- arg = chanId + " start " + CommonConfig.funasr + " mono 16k " + JSON.toJSONString(params);
|
|
|
545
|
+ String url=SpringHelper.getRequiredProperty("common.funasr");
|
|
|
546
|
+ arg = chanId + " start " + url + " mono 16k " + JSON.toJSONString(params);
|
|
546
|
547
|
} else {
|
|
547
|
548
|
arg = chanId + " stop " + JSON.toJSONString(params);
|
|
548
|
549
|
}
|
|
|
@@ -825,8 +826,9 @@ public class EslClientService {
|
|
825
|
826
|
//源号码
|
|
826
|
827
|
private String getOrigination(String calleeNum) {
|
|
827
|
828
|
String str = "";
|
|
828
|
|
- if (!EslCommon.existExten(calleeNum) && StringHelper.isNotEmpty(CommonConfig.gateway_origination)) {
|
|
829
|
|
- str = ",origination_caller_id_number=" + CommonConfig.gateway_origination;
|
|
|
829
|
+ String origination= SpringHelper.getRequiredProperty("common.gateway.origination");
|
|
|
830
|
+ if (!EslCommon.existExten(calleeNum) && StringHelper.isNotEmpty(origination)) {
|
|
|
831
|
+ str = ",origination_caller_id_number=" + origination;
|
|
830
|
832
|
}
|
|
831
|
833
|
return str;
|
|
832
|
834
|
}
|
|
|
@@ -837,8 +839,9 @@ public class EslClientService {
|
|
837
|
839
|
String callStr = "user/" + calleeNum;
|
|
838
|
840
|
//呼叫外线号码
|
|
839
|
841
|
if (!EslCommon.existExten(calleeNum)) {
|
|
840
|
|
- if (StringHelper.isNotEmpty(CommonConfig.gateway_register)) {
|
|
841
|
|
- callStr = "sofia/internal/" + calleeNum + "@" + CommonConfig.gateway_register;
|
|
|
842
|
+ String register= SpringHelper.getRequiredProperty("common.gateway.register");
|
|
|
843
|
+ if (StringHelper.isNotEmpty(register)) {
|
|
|
844
|
+ callStr = "sofia/internal/" + calleeNum + "@" + register;
|
|
842
|
845
|
|
|
843
|
846
|
// //注册网关
|
|
844
|
847
|
// EslMessage message = client.sendSyncApiCommand("sofia_contact", "9400");
|