

Ioqueue epoll stops processing socket events The crash occurs in pj_ioqueue_register_sock2() when there is a failure in early stage, i.e: before 'key' is initialized, and before the function returns, it tries to access the uninitialized 'key'. Any future making/incoming call will fail due to unavailable call slot until the stack is restarted.Īfter investigation, when PJSUA terminates a call due to media channel init error, the pointer to dialog (for async media transport creation), i.e: pjsua_call.async_call.dlg, is not nullified, while the call slot allocation will inspect this pointer (along with the INVITE session pointer) to check the call slot availability.Now the B will reject with 486 (busy here), instead of 406.Repeat the above two steps for about four more times (or as many as max calls setting).

B rejects with 406 (not acceptable here) due to no matching audio codec available.See this MSDN page for more info.Ĭall slot unavailable after some fail calls due to codec mismatch The reason why it's not set by default on Windows is because this option will steal the port from other program even if that program is currently active and the socket has not been closed. By default, these macros will be set to 1 on non-Windows platforms, meaning that SO_REUSEADDR will be set to the listener sockets, and zero on Windows platforms (including mobile). The default value for those settings are taken from these new compile time macros: PJSIP_TCP_TRANSPORT_REUSEADDR and PJSIP_TLS_TRANSPORT_REUSEADDR. The run-time options are pjsip_tcp_transport_cfg.reuse_addr and pjsip_tls_setting.reuse_addr, and pj_ssl_sock_param.reuse_addr for the lower level PJSIP's SSL socket. Option to use SO_REUSEADDR for TCP and TLS listeners and use it by default on non-Windows platformsĬompile time and run-time options to use SO_REUSEADDR for SIP TCP and TLS transports. Just for future refs, a couple tweaking efforts have been tried in pj_getipinterface(): send few UDP packet first, use TCP socket & async without waiting connect(), but 0.0.0.0 is still returned by getsockname(). 488), next re-INVITE SDP offer will have the same SDP version number as the last one.įail to generate contact when making call via UDP on WM6Īfter investigation, the ENOTFOUND error was raised by pj_getipinterface() as getsockname() on UDP socket always returning IP address 0.0.0.0, which may be related to this KB129065. SDP offer version number is not incremented if re-INVITE offer is rejected Stop media endpoint's worker threads first when destroying media subsystem
