I am porting an embedded system from Asterisk 1.4 to Asterisk 1.8. Making it work was ok, but one important module keep making me waste my time: chan_sip.ko . I can’t set a bindaddr. Every time I try (with ::, 0.0.0.0, 192.168.1.1 or an /etc/hosts hostname), I get this:
[Nov 16 21:03:52] ERROR: netsock2.c:219 ast_sockaddr_parse: getaddrinfo("0.0.0.0", "0", ...): Bad value for ai_flags
[Nov 16 21:03:52] ERROR: netsock2.c:219 ast_sockaddr_parse: getaddrinfo("host_test_ast", "(null)", ...): Bad value for ai_flags
[Nov 16 21:03:52] WARNING: chan_sip.c:27726 reload_config: Invalid address: host_test_ast
[Nov 16 21:03:52] WARNING: chan_sip.c:26112 handle_common_options: Unknown directmedia mode '' on line 30
[Nov 16 21:03:52] WARNING: chan_sip.c:27973 reload_config: To disallow external domains, you need to configure local SIP domains.
Other than that, everything seem to work. So I edited the code to “fix” ai_flags and set it to “4”, a totally legal value in both asterisk and uClibC. But instead of simply printing those error, it segfault later in the code. So, apparently, this is a real error. If I comment the bindaddr line in sip.conf while having my “fix” in the code, it does not crash, but use NULL as the bind addr. Asterisk 1.4 was working fine. Going back to 1.4 is not an option as the client want new features that can’t be backported to 1.4 (aka, all new features plus some backported from asterisk 10).
Does anybdy have any idea what I could do?