diff options
author | mnicholson <mnicholson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-09-15 13:05:52 +0000 |
---|---|---|
committer | mnicholson <mnicholson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-09-15 13:05:52 +0000 |
commit | 0c954d80573e40e6f44c34ba921c265b9c785297 (patch) | |
tree | 2217898b26ce92c4626e5938106fb80b9c5ae706 /channels/chan_sip.c | |
parent | 3e7fc5a78d669cd00762aed6bb39abc7ff22c5ec (diff) |
Set tohost to the domain specified in the configuration file instead of the IP address of the host we are calling.
This fixes a regression introduced in r274783.
(closes issue #17960)
Reported by: adriavidal
Patches:
sip-tohost-fix1.diff uploaded by mnicholson (license 96)
Tested by: mich, mnicholson, adriavidal
(closes issue #17676)
Reported by: outcast
Patches:
sip-tohost-fix1.diff uploaded by mnicholson (license 96)
Tested by: mnicholson
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@286868 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r-- | channels/chan_sip.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 148fefbc2..f382fe2ff 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -26117,9 +26117,8 @@ static struct sip_peer *build_peer(const char *name, struct ast_variable *v, str return NULL; } - ast_string_field_set(peer, tohost, peer->dnsmgr ? srvlookup : - ast_sockaddr_stringify_host(&peer->addr)); - + ast_string_field_set(peer, tohost, srvlookup); + if (global_dynamic_exclude_static) { int err = 0; sip_cfg.contact_ha = ast_append_ha("deny", ast_sockaddr_stringify_addr(&peer->addr), |