Why pjsip_regc_destroy instead of pjsip_transport_shutdown when register failed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sorry, "changing to a new Wifi" means connecting to another AP (my bad). 
So we are in a big room and set up 2 APs(but of course they will get the 
same outer IP address).

The problem we find is that sometime we walk from one side of room to 
the other side and the phone has already switched to the other AP, the 
app also shows that it has got the new IP address, but when re-register, 
pjsip stack still uses the old transport then register will fail with 
408. But even in this case pjsip stack will keep using old (and invalid) 
transport to continue to register.

The only solution I can come up with right now is call 
pjsip_transport_shutdown myself and that does fix the problem! But I was 
wondering is there a better way ?

Thanks

Qiulang


On 15/8/27 ??4:15, Harald Radke wrote:
> Hm, transport is below registration, and I guess you cannot be sure 
> that the transport is exclusivly used for the registration, thus if a 
> failed registration attempt would shutdown the transport,
> other active connections might suffer from that.
> stupid question: "changing to a new Wifi" means connecting to another 
> AP? doesnt your own IP change on such occasions? Does your SIP app 
> then still works? Dont you have to restart it anyways?
> Regards,
> Harry
> *Gesendet:* Donnerstag, 27. August 2015 um 05:54 Uhr
> *Von:* "? ?" <qiulang at emicnet.com>
> *An:* "pjsip list" <pjsip at lists.pjsip.org>
> *Betreff:* [pjsip] Why pjsip_regc_destroy instead of 
> pjsip_transport_shutdown when register failed
> 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
>
>
> _______________________________________________
> 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/dce71c73/attachment.html>


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux