Hi,

Thanks for the answer, but I tried the code below and the data is still
being sent through port 5060, not the new port. Please let me know what I'm
doing wrong:


*LoginActivity.java *





saveCreatedAccount()
> String forcedProxy = "";
>             if (!TextUtils.isEmpty(forcedProxy)) {
>                 builder.setProxy(forcedProxy)
>                         .setOutboundProxyEnabled(true)
>                         .setAvpfRRInterval(5);
>             }
>             builder.setProxy("sip:" +   "domain.com:" + 5353);
>             if(transport != null){
>                 builder.setTransport(transport);
>             }
>             mPrefs.setStunServer("ice.domain.com");
>             mPrefs.setIceEnabled(true);



*LinphoneManager.java:*


> public void initAccounts(LinphoneCore mLc,String username,String password,
> String domain) throws LinphoneCoreException {
>   mLc.clearAuthInfos();
>   mLc.clearProxyConfigs();
>
>   LinphoneAuthInfo lAuthInfo =
>  LinphoneCoreFactory.instance().createAuthInfo(username, password, null,
> domain);
>   mLc.addAuthInfo(lAuthInfo);
>   String identity = "sip:" + username +"@" + domain;
>   String proxy = "sip:" + domain;
>   LinphoneAddress proxyAddr =
> LinphoneCoreFactory.instance().createLinphoneAddress(proxy);
>   proxyAddr.setPort(5353);
>
> proxyAddr.setTransport(LinphoneAddress.TransportType.LinphoneTransportUdp);
>   LinphoneProxyConfig proxycon = mLc.createProxyConfig(identity,
> proxyAddr.asStringUriOnly(), proxyAddr.asStringUriOnly(), true);
>   mLc.addProxyConfig(proxycon);
>   mLc.setDefaultProxyConfig(proxycon);
>   LinphoneProxyConfig lDefaultProxyConfig = mLc.getDefaultProxyConfig();
>   if (lDefaultProxyConfig != null) {
>    //escape +
>    lDefaultProxyConfig.setDialEscapePlus(false);
>   } else if (LinphoneService.isReady()) {
>    getLc().addListener(this);
>   // this.registrationState(mLc, lDefaultProxyConfig,
> RegistrationState.RegistrationNone, null);
>   }
>  }




On 25 April 2016 at 04:21, J Alex Antony Vijay <[email protected]>
wrote:

> Hi Nabeel,
>
>     Use below code to set SIP registration port:
> LinphoneProxyConfig proxyConfig = linphoneCore.createProxyConfig(identity,
> linphoneAddress.asStringUriOnly(), null, true);
> ...
> proxyConfig.setProxy("sip:" + domain + ":" + port);
> ...
> ...
> linphoneCore.addProxyConfig(proxyConfig);
>
>
> Create address and set transport port:
> LinphoneAddress linphoneAddress = LinphoneCoreFactory.instance().
> createLinphoneAddress(identity);
> linphoneAddress.setTransport(LinphoneAddress.TransportType.
> LinphoneTransportTcp);
> linphoneAddress.setPort(port);
>
>
>
> On Mon, Apr 25, 2016 at 7:46 AM, Nabeel <[email protected]> wrote:
>
>> Hi,
>>
>> I have tried to change the SIP port on Android by adding this to the
>> linphonerc files:
>>
>> [sip]
>> sip_port=5353
>>
>> However, on the server using tcpdump, I can see that the SIP messages are 
>> still being transferred on port 5060.
>>
>> Please let me know how I can change the SIP port so that registration and 
>> messages to the server occur on a different port.
>>
>>
>> Nabeel
>>
>>
>>
>>
>> _______________________________________________
>> Linphone-developers mailing list
>> [email protected]
>> https://lists.nongnu.org/mailman/listinfo/linphone-developers
>>
>>
>
>
> --
>
> Regards,
> J Alex Antony Vijay.
>
> _______________________________________________
> Linphone-developers mailing list
> [email protected]
> https://lists.nongnu.org/mailman/listinfo/linphone-developers
>
>
_______________________________________________
Linphone-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/linphone-users

Reply via email to