Hi, I did not say my question clearly in previous. So the question is how can I shut down the transport correctly when register failed (especially for 408 error) ? Qiulang On 15/8/27 ??11:54, ? ? wrote: > Hi, > > When register failed, why call pjsip_regc_destroy instead of > pjsip_transport_shutdown (regc_cb in sip_reg.c, pjsip 2.2.1) ? > > > if (param->code < 0 || param->code >= 300) { > PJ_LOG(2, (THIS_FILE, "SIP registration failed, status=%d (%.*s)", > param->code, > (int)param->reason.slen, param->reason.ptr)); > pjsip_regc_destroy(acc->regc); > > In my case (email below) I found acc->regc->last_transport is NULL, so > calling *pjsip_regc_destroy* has no effect. But the invalid transport > still exists and next time when register pjsip will still use it, > which I have not figured out why, so the register failed! > > But if call pjsip_transport_shutdown, register will succeed next time. > > > > > On 15/8/17 ??6:15, ? ? wrote: >> Hi, >> >> When switching to a new WiFi register sometime will fail with 408. It >> does not always happen but when it happens I run out of solution but >> to kill the app and restart it. >> I am using pjsip 2.2.1 does anyone experience this and know how to >> fix it ? >> >> Thanks >> >> Qiulang >> >> >> _______________________________________________ >> Visit our blog:http://blog.pjsip.org >> >> pjsip mailing list >> pjsip at lists.pjsip.org >> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > > > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip at lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20150827/89599886/attachment.html>