I have been going through Android Pjsip
pjsua2
sample app. It works but they didn't implemented registration listener. And couldn't find any good enough documentation as well. Eg for android native sip stack, they have registration listener for registration failure, registration success as well. Please help me with a sample code as well if its possible.
I guess you're talking about empty brackets beside notifyRegState at files sample.java and sample2.java in pjsip-apps sources. You can easily implement your own registration listener there.
public void notifyRegState(pjsip_status_code code, String reason, int expiration) {}
All you have to do, is to check the values of arguments in this method. Most important is first argument (code
) - compare it's value with status you want to check from pjsip_status_code
enumeration (link), and perform some action proper for your needs. Explanation of SIP response codes can be found i.e here (link). Second argument (reason
) is description (reason phrase) of received status. The last one (expiration
) is interval to next SIP registration (another words - validity time of current registration).
If this is not helpful for you, tell something more about your problem.