Linphone reregistering to Sip server using Android

Yonatan Nir Source

I am creating an Android application which uses Linphone to enable Voip calls.

When the connection is lost, I'm attempting to reconnect to the Sip server like this:

@Override
public void reregister()
{
    handler.post(new Runnable()
    {
        @Override
        public void run()
        {
            linphoneCore.getDefaultProxyConfig().edit();
            linphoneCore.getDefaultProxyConfig().enableRegister(true);
            linphoneCore.getDefaultProxyConfig().done();
        }
    });
}

The problem is that many times when using it, the onRegisterFailed, onRegisterSucceeded and even onRegisterProcessing are not getting called, even though the internet connection is fine.

Is the way I'm trying to reregister correct?

androidlinphonesip-server

Answers

answered 2 years ago Erwan Croze #1

to attempt a reconnection with the same register informations, you can used:

linphone_core_refresh_registers()

So in your case in Java:

linphoneCore.refreshRegisters()

comments powered by Disqus