[svn-commits] twilson: branch 1.8 r308679 - in /branches/1.8: ./ channels/ configs/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Feb 23 21:41:47 CST 2011


Author: twilson
Date: Wed Feb 23 21:41:34 2011
New Revision: 308679

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=308679
Log:
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/
........

Modified:
    branches/1.8/   (props changed)
    branches/1.8/channels/chan_sip.c
    branches/1.8/configs/sip.conf.sample

Propchange: branches/1.8/
------------------------------------------------------------------------------
Binary property 'branch-1.6.2-merged' - no diff available.

Modified: branches/1.8/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/channels/chan_sip.c?view=diff&rev=308679&r1=308678&r2=308679
==============================================================================
--- branches/1.8/channels/chan_sip.c (original)
+++ branches/1.8/channels/chan_sip.c Wed Feb 23 21:41:34 2011
@@ -18225,7 +18225,9 @@
  	} 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 */

Modified: branches/1.8/configs/sip.conf.sample
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/configs/sip.conf.sample?view=diff&rev=308679&r1=308678&r2=308679
==============================================================================
--- branches/1.8/configs/sip.conf.sample (original)
+++ branches/1.8/configs/sip.conf.sample Wed Feb 23 21:41:34 2011
@@ -1013,6 +1013,10 @@
 ; * The type=peer also handles both incoming and outbound calls. On inbound calls,
 ;   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
 ;




More information about the svn-commits mailing list