iOS UDP/DNS issue, background/foreground crash

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

 



hey
i’m working on an iOS app (iOS 11.2) with CallKit and PushKit that started with pjsip 2.7 and i recently upgraded to 2.7.1. 
i have several issues here. so any help is highly appreciated.

since the app is using pushkit and connecting to a udp server is set PJ_IPHONE_OS_HAS_MULTITASKING_SUPPORT to 0. i first did this in xcode in the preprocessor macros. but since i’m not building the library with the app but separately i guess that didn’t really had the desired effect. but as i said. maybe i got something wrong so feel free to give some advice here. 

on startup as well as on connection changes i configure the pj_dns_resolver with the dns entries of the current connection and the standard google dns 8.8.8.8 and 8.8.4.4. all works well for some time but at some point the client is unable to connect reregister. (happens much faster when changing the cellular network cell.. like walking two blocks away. at least it seems like that) console output is as follows:

ioq_select  Error replacing socket: Invalid argument

followed be a nice loop of: udp0x13ff4b6d0  Warning: pj_ioqueue_recvfrom: [err 120009] Bad file descriptor
then i get something like: sip_transport.c  Error processing 74 bytes packet from UDP 8.8.8.8:53 : PJSIP syntax error exception when parsing 'Request Line' header on line 1 col 1: (same for the other DNSs)

then: tsx0x14382d4a8  Failed to send Request msg REGISTER/cseq=61739 (tdta0x1438668a8)! err=70009 (Operation timed out (PJ_ETIMEDOUT))
pjsua_acc.c  ..SIP registration failed, status=503 (Operation timed out (PJ_ETIMEDOUT))
pjsua_acc.c !.Unable to create/send REGISTER: Object is busy (PJSIP_EBUSY) [status=171001]

and ultimately

ioq_select  Error replacing socket: Invalid argument
tsx0x10c811ca8  .Failed to send Request msg REGISTER/cseq=38540 (tdta0x10b009ca8)! err=320046 (No working DNS nameserver (PJLIB_UTIL_EDNSNOWORKINGNS))
pjsua_acc.c  ...SIP registration failed, status=503 (No working DNS nameserver (PJLIB_UTIL_EDNSNOWORKINGNS))

at least this worked somehow. but then i figured that setting PJ_IPHONE_OS_HAS_MULTITASKING_SUPPORT to 0 should have been done in the config_site.h if i’m right. so done that.. compiled the library.
now i have the issue that when i switch the app between foreground and background everything ‘seems’ to be fine. but once i send the app to background, lock the device, unlock it again and trying to send the app to foreground again it crashes.

what i see in the console in case i do this with the debugger attached is

pjsua_acc.c  Error sending keep-alive packet: Broken pipe [status=120032]
followed by an endless loop of 
udp0x102b42740  Warning: pj_ioqueue_recvfrom: [err 120057] Socket is not connected

as i said. maybe i’m getting something essentially wrong so any help is highly appreciated. if anyone needs more information feel free to ask and i happily provide them.

thank you,
gert
_______________________________________________
Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@xxxxxxxxxxxxxxx
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org




[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