[asterisk-commits] twilson: trunk r308680 - in /trunk: ./ channels/ configs/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Feb 23 21:49:12 CST 2011


Author: twilson
Date: Wed Feb 23 21:49:07 2011
New Revision: 308680

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

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

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

Modified: trunk/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_sip.c?view=diff&rev=308680&r1=308679&r2=308680
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Wed Feb 23 21:49:07 2011
@@ -18529,7 +18529,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: trunk/configs/sip.conf.sample
URL: http://svnview.digium.com/svn/asterisk/trunk/configs/sip.conf.sample?view=diff&rev=308680&r1=308679&r2=308680
==============================================================================
--- trunk/configs/sip.conf.sample (original)
+++ trunk/configs/sip.conf.sample Wed Feb 23 21:49:07 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 asterisk-commits mailing list