Hy all, 我是星号的新手,所以不太了解它。我目前纠缠在一个拨打电话的应用程序中。以前它由于某些配置问题而无法工作,然后ANI显示NULL值。但现在它工作正常,因为我使用了java的setCallerID函数。
问题是出口呼叫是成功生成给用户的数字为123,但前导零“0”附加到它并变为'0123',我假设'0'是国家号码哪个星号按照星号中的定义附加,我所需的数字是'123',我想从java代码更改。
我搜索了许多论坛/网站,包括voip-info的主要网站,但尚未获得成功。如果可能的话,我想通过java代码解决它。任何帮助将不胜感激。
更新
asterisk版本为1.8,链ss7为2.1
[gu]
exten =>007775,1,Answer(); this will answer the call
exten =>007775,2,Wait(1); will wait for 1 second
exten =>007775,3,NoOp(Call from ${CALLERID(all)})
exten =>007775,4,AGI(agi://localhost:4573/com.digitania.ivr.gu.domain.ServiceImplDelegate?uniqueId=${UNIQUEID}&isOutbound=${isOutbound}&msisdn=${MSISDN})
exten =>007775,5,Hangup(); end the call
private static final String PARAM_MSISDN = "MSISDN";
private static final String PARAM_ISOUTBOUND = "isOutbound";
private static final String EXTENSION = "007775";
private static final String CALLER_ID = "7775";
public static int callCount = 0;
public void call(String msisdn, CallListener listener) {
try {
{
OriginateAction originateAction = new OriginateAction();
originateAction.setChannel((new StringBuilder("SS7/").append(msisdn).toString()));
originateAction.setContext("gu");
originateAction.setPriority(new Integer(1));
originateAction.setExten(EXTENSION);
originateAction.setCallerId(CALLER_ID);
originateAction.setVariable(PARAM_MSISDN, msisdn);
originateAction.setVariable(PARAM_ISOUTBOUND, "true");
ManagerResponse originateResponse = managerConnection
.sendAction(originateAction, 30000L);
System.out.println((new StringBuilder("RESPONSE: \n")).append(
originateResponse.getResponse()).toString());
System.out.println(originateResponse.getMessage());
}
} catch (TimeoutException e) {
listener.callTimeOutException();
} catch (Exception e) {
e.printStackTrace();
}
callCount++;
}
答案 0 :(得分:0)
使用libss7已经有一段时间了,但您是否尝试过在chan_dahdi.conf中查看这些选项?
与他们一起玩(并与您的提供者交谈)应该允许您发送正确的号码。
希望它有所帮助。