java 从sip服务器_如何通过域而不是IP地址注册到SIP服务器并从客户端创建SIP帐户?...

我已经成功编译了Android的Liblinphone库并使用它注册到Brekeke SIP服务器并在Android客户端和PC客户端(x-Lite,linphone)之间进行调用 . 但我面临两个问题:

客户端使用其IP地址而不是域注册到服务器 .

例如:如果服务器IP:192.168.10.105和客户端(IP,名称):( 192.168.10.101,101),用户将注册到Brekeke作为sip:101@192.168.10.101而不是sip:101@192.168.10.105所以当我从linphone客户端拨打101时,结果是Not Found

try{

from = LinphoneCoreFactory.instance()

.createLinphoneAddress("sip:101@192.168.10.105");

proxy_cfg = LinphoneCoreFactory.instance().createProxyConfig

("sip:101@192.168.10.105","sip:"+from.getDomain(),null,true);

} catch (LinphoneCoreException e) {

FileLog.e("proxy_cfg error",e);

}

LinphoneAuthInfo info;

info = LinphoneCoreFactory.instance().createAuthInfo(from.getUserName(),

"password",null,"sip:"+from.getDomain());

mLinphoneCore.addAuthInfo(info);

try {

mLinphoneCore.addProxyConfig(proxy_cfg);

} catch (LinphoneCoreException e) {

FileLog.e("reg error",e);

}

mLinphoneCore.setDefaultProxyConfig(proxy_cfg);

我需要在客户端通过代码在SIP服务器上创建用户,这可能是使用Liblinphone还是我自己应该实现它?

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值