]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fix a bug where a value used to create the channel name was bogus.
authorJoshua Colp <jcolp@digium.com>
Fri, 17 Apr 2009 14:41:25 +0000 (14:41 +0000)
committerJoshua Colp <jcolp@digium.com>
Fri, 17 Apr 2009 14:41:25 +0000 (14:41 +0000)
This commit fixes the scenario where an incoming call is authenticated
using a peer entry. Previously the channel name was created using either
the username setting from the sip.conf entry or the IP address that the
call came from. Now the channel name will be created using the peer name
itself. This commit will not change the way the channel name is generated
for users or friends.

(closes issue #14256)
Reported by: Nick_Lewis
Patches:
      chan_sip.c-chname.patch uploaded by Nick (license 657)
Tested by: Nick_Lewis, file

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@188946 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 0361bab96c58bbf0b05e002dfeb8e795bccf1490..395ecb7b4014634e4c0a20e897c5691c5a913270 100644 (file)
@@ -14715,7 +14715,7 @@ static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, int
 
                        make_our_tag(p->tag, sizeof(p->tag));
                        /* First invitation - create the channel */
-                       c = sip_new(p, AST_STATE_DOWN, S_OR(p->username, NULL));
+                       c = sip_new(p, AST_STATE_DOWN, S_OR(p->peername, NULL));
                        *recount = 1;
 
                        /* Save Record-Route for any later requests we make on this dialogue */