Search code examples
androidasteriskpjsippjsua2

how can I call re-registration and send registration to server manually on pjsua2?


I'm using pjsip in my android chat application(using pjsua2). All things is good and I can register and make call with others successfully. default re-registration of pjsua2 is 300s and after this time a re-register request will send to server. And I know how to change this time , but some times I need to call re-registration manually depends on some events. how can I call re-registration and send registration to server manually.


Solution

  • If someone need to call re-registration with pjsua2, call bellow function from Account class :

    public void setRegistration(boolean renew) throws java.lang.Exception {
        pjsua2JNI.Account_setRegistration(swigCPtr, this, renew);
    }