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/branches/1.6.2@308678
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
} 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 */
; Asterisk only matches on IP/port, not on names. This is mostly used for SIP
; trunks.
;
+; Use remotesecret for outbound authentication, and secret for authenticating
+; inbound requests. For historical reasons, if no remotesecret is supplied for an
+; outbound registration or call, the secret will be used.
+;
; For device names, we recommend using only a-z, numerics (0-9) and underscore
;
; For local phones, type=friend works most of the time