]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Issue #7240, by mistake only committed to trunk (now 1.4), reported by
authorOlle Johansson <oej@edvina.net>
Thu, 26 Oct 2006 20:06:55 +0000 (20:06 +0000)
committerOlle Johansson <oej@edvina.net>
Thu, 26 Oct 2006 20:06:55 +0000 (20:06 +0000)
edgreenberg in Issue #7966. Thanks Ed!

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

channels/chan_sip.c

index c35eedcf93916c27e1d4954765a6802c1094672f..c2063bb8d958624dceb27a90c69fb1b3996702c9 100644 (file)
@@ -7261,7 +7261,8 @@ static int check_user_full(struct sip_pvt *p, struct sip_request *req, int sipme
                        p->amaflags = user->amaflags;
                        p->callgroup = user->callgroup;
                        p->pickupgroup = user->pickupgroup;
-                       p->callingpres = user->callingpres;
+                       if (user->callingpres)
+                               p->callingpres = user->callingpres;
                        p->capability = user->capability;
                        p->jointcapability = user->capability;
                        if (p->peercapability)
@@ -7324,7 +7325,8 @@ static int check_user_full(struct sip_pvt *p, struct sip_request *req, int sipme
                        ast_copy_string(p->subscribecontext, peer->subscribecontext, sizeof(p->subscribecontext));
                        ast_copy_string(p->peermd5secret, peer->md5secret, sizeof(p->peermd5secret));
                        p->peermd5secret[sizeof(p->peermd5secret)-1] = '\0';
-                       p->callingpres = peer->callingpres;
+                       if (peer->callingpres)
+                               p->callingpres = peer->callingpres;
                        if (peer->maxms && peer->lastms)
                                p->timer_t1 = peer->lastms;
                        if (ast_test_flag(peer, SIP_INSECURE_INVITE)) {