Use tohost, not the name of the peer

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3423 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Spencer 2004-07-13 02:44:11 +00:00
parent 3ba284094e
commit 3fdbac912a
1 changed files with 2 additions and 2 deletions

View File

@ -3968,8 +3968,8 @@ static int transmit_register(struct sip_registry *r, char *cmd, char *auth, char
snprintf(from, sizeof(from), "<sip:%s>;tag=as%08x", r->username, p->tag);
snprintf(to, sizeof(to), "<sip:%s>", r->username);
} else {
snprintf(from, sizeof(from), "<sip:%s@%s>;tag=as%08x", r->username, r->hostname, p->tag);
snprintf(to, sizeof(to), "<sip:%s@%s>", r->username, r->hostname);
snprintf(from, sizeof(from), "<sip:%s@%s>;tag=as%08x", r->username, p->tohost, p->tag);
snprintf(to, sizeof(to), "<sip:%s@%s>", r->username, p->tohost);
}
snprintf(addr, sizeof(addr), "sip:%s", r->hostname);