diff options
author | Joshua Colp <jcolp@digium.com> | 2016-12-01 15:51:06 -0600 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2016-12-01 15:51:06 -0600 |
commit | c3a509be7ebc1e8d2be8077b54474c32131a1187 (patch) | |
tree | b120b143dce4d5d6af07dc344c8240749949f226 /res | |
parent | cd5e9a89d16432c630ee6b2a02714ee8b69d101a (diff) | |
parent | 2ceb609edb64e930300806e75dc1a45386f800ef (diff) |
Merge "res_rtp: Fix regression when IPv6 is not available." into 13
Diffstat (limited to 'res')
-rw-r--r-- | res/res_pjsip_sdp_rtp.c | 7 | ||||
-rw-r--r-- | res/res_pjsip_t38.c | 7 |
2 files changed, 12 insertions, 2 deletions
diff --git a/res/res_pjsip_sdp_rtp.c b/res/res_pjsip_sdp_rtp.c index 66550a2fd..b27050ed8 100644 --- a/res/res_pjsip_sdp_rtp.c +++ b/res/res_pjsip_sdp_rtp.c @@ -51,6 +51,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/acl.h" #include "asterisk/sdp_srtp.h" #include "asterisk/dsp.h" +#include "asterisk/utils.h" #include "asterisk/res_pjsip.h" #include "asterisk/res_pjsip_session.h" @@ -1493,7 +1494,11 @@ static int load_module(void) { CHECK_PJSIP_SESSION_MODULE_LOADED(); - ast_sockaddr_parse(&address_rtp, "::", 0); + if (ast_check_ipv6()) { + ast_sockaddr_parse(&address_rtp, "::", 0); + } else { + ast_sockaddr_parse(&address_rtp, "0.0.0.0", 0); + } if (!(sched = ast_sched_context_create())) { ast_log(LOG_ERROR, "Unable to create scheduler context.\n"); diff --git a/res/res_pjsip_t38.c b/res/res_pjsip_t38.c index cf1211177..0787f0763 100644 --- a/res/res_pjsip_t38.c +++ b/res/res_pjsip_t38.c @@ -44,6 +44,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/netsock2.h" #include "asterisk/channel.h" #include "asterisk/acl.h" +#include "asterisk/utils.h" #include "asterisk/res_pjsip.h" #include "asterisk/res_pjsip_session.h" @@ -918,7 +919,11 @@ static int load_module(void) { CHECK_PJSIP_SESSION_MODULE_LOADED(); - ast_sockaddr_parse(&address, "::", 0); + if (ast_check_ipv6()) { + ast_sockaddr_parse(&address, "::", 0); + } else { + ast_sockaddr_parse(&address, "0.0.0.0", 0); + } if (ast_sip_session_register_supplement(&t38_supplement)) { ast_log(LOG_ERROR, "Unable to register T.38 session supplement\n"); |