> Frankly I disagree with your approach to implement the retry method. > IMO, it's best to implement it in the application code rather than > modifying pjsip. You just need to check for the appropriate condition > in regc callback, schedule the timer, and when the timer elapses > perform a fresh registration again. > I will give that a try but I had tried the same from our sip phone application (a layer above pjsua_lib) with same results. There, depending on the error code, I started the timer (with callback func in the same layer) and performed a fresh registration every time. It crashed everytime I started the timer after receiving a 4xx response. Just to be sure, is any timer initialization needed before calling pjsip_endpt_schedule_timer() ? Thanks, Anshuman