[iOS] Best way of dealing with network interface changes.

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

 



Hi all,

I've started working with PJSip for a project I'm working on, and so far everything has gone swimmingly, but I've now hit a snag and need some advice.

When the iPhone transitions from WiFi to 3G or 3G to WiFi, PJSip doesn't pick up on the interface change and will continue to use the same socket bound to the old interface for quite some time, meanwhile it reports SIP error 408 when a REGISTER and such is attempted. Eventually the socket will time out, but I've seen durations of as long as 15 minutes before this happens.

Interestingly if you lose connectivity and reconnect over the same interface i.e. change wifi networks or lose 3G signal then regain it, then PJSip has no problems.

Of course, to clarify, I'm using the TCP transport so that my app can have background operation.

I can detect connectivity changes using the SystemConfiguration code (or Apples nice Reachability cocoa class), but my question is: whats the best way to tell PJSip to re-bind to the 'new' active interface and use that.

I've tried removing the transport and recreating it, but that doesn't seem to fix it. I seem to recall a post somewhere that said to completely shutdown and restart PJSip, but that seems a bit drastic (but I'm sure it will work).

So, any suggestions as to the best course of action?

Thanks,
Tony.





[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