summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorTerry Wilson <twilson@digium.com>2011-02-24 03:49:07 +0000
committerTerry Wilson <twilson@digium.com>2011-02-24 03:49:07 +0000
commit5deb544d06acf821f54f61890ae1129697ff8591 (patch)
tree2d39258f583e759f424f842071576366321339b3 /channels
parent79e041f856941794b700c688cb319f616b0663a7 (diff)
Merged revisions 308679 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r308679 | twilson | 2011-02-23 21:41:34 -0600 (Wed, 23 Feb 2011) | 15 lines Merged revisions 308678 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ........ r308678 | twilson | 2011-02-23 21:38:22 -0600 (Wed, 23 Feb 2011) | 8 lines Use remotesecret to authenticate with a remote party The remotesecret option was only being used for outbound registration and not for placing calls. This patch uses remotesecret on outbound calls if it is set, otherwise secret is still used. Review: https://reviewboard.asterisk.org/r/1107/ ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@308680 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 4d9408f38..e9ef2d695 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -18529,7 +18529,9 @@ static int build_reply_digest(struct sip_pvt *p, int method, char* digest, int d
} else {
/* No authentication, use peer or register= config */
username = p->authname;
- secret = p->peersecret;
+ secret = p->relatedpeer
+ && !ast_strlen_zero(p->relatedpeer->remotesecret)
+ ? p->relatedpeer->remotesecret : p->peersecret;
md5secret = p->peermd5secret;
}
if (ast_strlen_zero(username)) /* We have no authentication */