summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorOlle Johansson <oej@edvina.net>2009-09-03 13:02:41 +0000
committerOlle Johansson <oej@edvina.net>2009-09-03 13:02:41 +0000
commit6d6ce303cbf2dbcacd4a84f4f6613a66fae56c48 (patch)
treec9c2c726714724fb8628a2e904d8e36d1f4fba2c /channels
parentb3e97dc95c7368a84462391ad7f2d2b2eb8e241e (diff)
Add known internal IP address when autodomain=yes
(closes issue #14573) Reported by: pj Patches: sip-internip-autodomain1.diff uploaded by mnicholson (license 96) modified by oej Tested by: pj git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@215891 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index d4ab64a7a..5bd05b0a1 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -25491,10 +25491,14 @@ static int reload_config(enum channelreloadreason reason)
char temp[MAXHOSTNAMELEN];
/* First our default IP address */
- if (bindaddr.sin_addr.s_addr)
+ if (bindaddr.sin_addr.s_addr) {
add_sip_domain(ast_inet_ntoa(bindaddr.sin_addr), SIP_DOMAIN_AUTO, NULL);
- else
+ } else if (internip.sin_addr.s_addr) {
+ /* Our internal IP address, if configured */
+ add_sip_domain(ast_inet_ntoa(internip.sin_addr), SIP_DOMAIN_AUTO, NULL);
+ } else {
ast_log(LOG_NOTICE, "Can't add wildcard IP address to domain list, please add IP address to domain manually.\n");
+ }
/* If TCP is running on a different IP than UDP, then add it too */
if (sip_tcp_desc.local_address.sin_addr.s_addr && !inaddrcmp(&bindaddr, &sip_tcp_desc.local_address))