]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Set tohost to the domain specified in the configuration file instead of the IP addres...
authorMatthew Nicholson <mnicholson@digium.com>
Wed, 15 Sep 2010 13:05:52 +0000 (13:05 +0000)
committerMatthew Nicholson <mnicholson@digium.com>
Wed, 15 Sep 2010 13:05:52 +0000 (13:05 +0000)
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: https://origsvn.digium.com/svn/asterisk/branches/1.8@286868 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 148fefbc21bdf7bb829062603faa49dabe6f0577..f382fe2ffda96ca299b89804966d1e61cc36dc2f 100644 (file)
@@ -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),