aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_sip.c
diff options
context:
space:
mode:
authorpabelanger <pabelanger@f38db490-d61c-443f-a65b-d21fe96a405b>2010-10-14 15:15:12 +0000
committerpabelanger <pabelanger@f38db490-d61c-443f-a65b-d21fe96a405b>2010-10-14 15:15:12 +0000
commit1a629f8a54982fc50c01125690fe04b4aa2fa924 (patch)
treeb40da03943df7385877f89513794963cb6e8ea32 /channels/chan_sip.c
parent681aee87a208fe0efa5f325fcfa0a18f472d4c97 (diff)
Add the ability for ast_find_ourip to return IPv4, IPv6 or both.
While testing chan_gtalk I noticed jabber was using my IPv6 address and not IPv4. When using bindaddr=0.0.0.0 it is possible for ast_find_ourip() to return both IPv6 and IPv4 results. Adding a family parameter gives you the ablility to choose. Since jabber/gtalk/h323 do not support IPv6, we should only return IPv4 results. Review: https://reviewboard.asterisk.org/r/973/ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@291758 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r--channels/chan_sip.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 58e3f5c4f..302ca35a1 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -27086,7 +27086,7 @@ static int reload_config(enum channelreloadreason reason)
/* Set UDP address and open socket */
ast_sockaddr_copy(&internip, &bindaddr);
- if (ast_find_ourip(&internip, &bindaddr)) {
+ if (ast_find_ourip(&internip, &bindaddr, 0)) {
ast_log(LOG_WARNING, "Unable to get own IP address, SIP disabled\n");
ast_config_destroy(cfg);
return 0;