aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoroej <oej@f38db490-d61c-443f-a65b-d21fe96a405b>2009-09-03 14:21:27 +0000
committeroej <oej@f38db490-d61c-443f-a65b-d21fe96a405b>2009-09-03 14:21:27 +0000
commitb15e6188d96ecb23acbd80882143361b658fffe5 (patch)
tree3f8f155e80948f3a5c9c8256587a400f4e63e856
parent30eadb22c545c81ac35fad2e829de4a7ae5d1bb4 (diff)
Merged revisions 215891 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r215891 | oej | 2009-09-03 15:02:41 +0200 (Tor, 03 Sep 2009) | 10 lines 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: http://svn.digium.com/svn/asterisk/branches/1.6.2@215929 f38db490-d61c-443f-a65b-d21fe96a405b
-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 c5d08d4ad..7d6aaf29e 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -24413,10 +24413,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))