Use hostname instead of IP for sip registration
authorMark Spencer <markster@digium.com>
Fri, 11 Apr 2003 14:03:28 +0000 (14:03 +0000)
committerMark Spencer <markster@digium.com>
Fri, 11 Apr 2003 14:03:28 +0000 (14:03 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@826 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index d8f4861..98cdb2b 100755 (executable)
@@ -2537,8 +2537,8 @@ static int transmit_register(struct sip_registry *r, char *cmd, char *auth)
                ast_log(LOG_DEBUG, "Scheduled a timeout # %d\n", r->timeout);
        }
 
-       snprintf(from, sizeof(from), "<sip:%s@%s>;tag=as%08x", r->username, inet_ntoa(r->addr.sin_addr) /* r->hostname */, p->tag);
-       snprintf(to, sizeof(to),     "<sip:%s@%s>;tag=as%08x", r->username, inet_ntoa(r->addr.sin_addr) /* r->hostname */, p->tag);
+       snprintf(from, sizeof(from), "<sip:%s@%s>;tag=as%08x", r->username, r->hostname, p->tag);
+       snprintf(to, sizeof(to),     "<sip:%s@%s>;tag=as%08x", r->username, r->hostname, p->tag);
        
        snprintf(addr, sizeof(addr), "sip:%s", inet_ntoa(r->addr.sin_addr));