[asterisk-commits] branch oej/disable-ol-and-sub r11772 - in /team/oej/disable-ol-and-sub: chann...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Sat Mar 4 02:13:52 MST 2006


Author: oej
Date: Sat Mar  4 03:13:47 2006
New Revision: 11772

URL: http://svn.digium.com/view/asterisk?rev=11772&view=rev
Log:
Adding peer flags

Modified:
    team/oej/disable-ol-and-sub/channels/chan_sip.c
    team/oej/disable-ol-and-sub/configs/sip.conf.sample

Modified: team/oej/disable-ol-and-sub/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/oej/disable-ol-and-sub/channels/chan_sip.c?rev=11772&r1=11771&r2=11772&view=diff
==============================================================================
--- team/oej/disable-ol-and-sub/channels/chan_sip.c (original)
+++ team/oej/disable-ol-and-sub/channels/chan_sip.c Sat Mar  4 03:13:47 2006
@@ -600,6 +600,8 @@
 #define SIP_PAGE2_DEBUG_CONSOLE 	(1 << 6)
 #define SIP_PAGE2_DYNAMIC		(1 << 7)	/*!< Dynamic Peers register with Asterisk */
 #define SIP_PAGE2_SELFDESTRUCT		(1 << 8)	/*!< Automatic peers need to destruct themselves */
+#define SIP_PAGE2_ALLOWSUBSCRIBE	(1 << 10)	/*!< Allow subscriptions from this peer? */
+#define SIP_PAGE2_ALLOWOVERLAP		(1 << 11)	/*!< Allow overlap dialing ? */
 
 /* SIP packet flags */
 #define SIP_PKT_DEBUG		(1 << 0)	/*!< Debug this packet */
@@ -12077,6 +12079,10 @@
 	peer->pickupgroup = 0;
 	peer->maxms = default_qualify;
 	peer->prefs = default_prefs;
+	if (global_allowoverlap)
+		ast_set_flag((&peer->flags_page2), SIP_PAGE2_ALLOWOVERLAP);
+	if (global_allowsubscribe)
+		ast_set_flag((&peer->flags_page2), SIP_PAGE2_ALLOWSUBSCRIBE);
 }
 
 /*! \brief Create temporary peer (used in autocreatepeer mode) */
@@ -12169,6 +12175,10 @@
 		else if (realtime && !strcasecmp(v->name, "fullcontact")) {
 			ast_copy_string(peer->fullcontact, v->value, sizeof(peer->fullcontact));
 			ast_set_flag((&peer->flags_page2), SIP_PAGE2_RT_FROMCONTACT);
+  		} else if (!strcasecmp(v->name, "allowsubscribe")) {
+			ast_set_flag((&peer->flags_page2), SIP_PAGE2_ALLOWSUBSCRIBE);
+  		} else if (!strcasecmp(v->name, "allowoverlap")) {
+			ast_set_flag((&peer->flags_page2), SIP_PAGE2_ALLOWOVERLAP);
 		} else if (!strcasecmp(v->name, "secret")) 
 			ast_copy_string(peer->secret, v->value, sizeof(peer->secret));
 		else if (!strcasecmp(v->name, "md5secret")) 

Modified: team/oej/disable-ol-and-sub/configs/sip.conf.sample
URL: http://svn.digium.com/view/asterisk/team/oej/disable-ol-and-sub/configs/sip.conf.sample?rev=11772&r1=11771&r2=11772&view=diff
==============================================================================
--- team/oej/disable-ol-and-sub/configs/sip.conf.sample (original)
+++ team/oej/disable-ol-and-sub/configs/sip.conf.sample Sat Mar  4 03:13:47 2006
@@ -26,7 +26,9 @@
 [general]
 context=default			; Default context for incoming calls
 ;allowguest=no			; Allow or reject guest calls (default is yes, this can also be set to 'osp'
-				; if asterisk was compiled with OSP support.
+				; if asterisk was compiled with OSP support.)
+;allowoverlap=no		; Disable overlap dialing support. Default is yes
+;allowsubscribe=no		; Disable support for subscriptions. Default is yes
 ;realm=mydomain.tld		; Realm for digest authentication
 				; defaults to "asterisk"
 				; Realms MUST be globally unique according to RFC 3261



More information about the asterisk-commits mailing list