[svn-commits] kharwell: branch kharwell/pimp_sip_qualify r391887 - in /team/kharwell/pimp_s...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri Jun 14 15:35:45 CDT 2013


Author: kharwell
Date: Fri Jun 14 15:35:42 2013
New Revision: 391887

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=391887
Log:
Multiple revisions 391781,391834,391866,391886

........
  r391781 | root | 2013-06-14 11:18:09 -0500 (Fri, 14 Jun 2013) | 21 lines
  
  Multiple revisions 391776-391777
  
  ........
    r391776 | kmoore | 2013-06-14 11:08:55 -0500 (Fri, 14 Jun 2013) | 6 lines
    
    Publish bridge snapshots more often
    
    Bridge snapshot events were missing some important transitions that
    were noticed in subsequent snapshots. Snapshots will now be published
    on all bridge reconfigurations.
  ........
    r391777 | kmoore | 2013-06-14 11:12:44 -0500 (Fri, 14 Jun 2013) | 5 lines
    
    Fix a crash in CEL bridge snapshot handling
    
    Properly search for bridge association structures so that they are
    found when expected and handle cases where they don't exist.
  ........
  
  Merged revisions 391776-391777 from file:///srv/subversion/repos/asterisk/trunk
........
  r391834 | root | 2013-06-14 12:17:58 -0500 (Fri, 14 Jun 2013) | 17 lines
  
  app_mixmonitor: Fix crashes caused by unloading app_mixmonitor
  
  Unloading app_mixmonitor while active mixmonitors were running would
  cause a segfault. This patch fixes that by making it impossible to
  unload app_mixmonitor while mixmonitors are active.
  
  Review: https://reviewboard.asterisk.org/r/2624/
  ........
  
  Merged revisions 391778 from http://svn.asterisk.org/svn/asterisk/branches/1.8
  ........
  
  Merged revisions 391794 from http://svn.asterisk.org/svn/asterisk/branches/11
  ........
  
  Merged revisions 391828 from file:///srv/subversion/repos/asterisk/trunk
........
  r391866 | root | 2013-06-14 14:17:53 -0500 (Fri, 14 Jun 2013) | 17 lines
  
  Multiple revisions 391855-391856
  
  ........
    r391855 | kmoore | 2013-06-14 13:46:00 -0500 (Fri, 14 Jun 2013) | 5 lines
    
    Fix two more possible crashes in CEL
    
    These are locations that should return valid snapshots, but need to be
    handled if not.
  ........
    r391856 | kmoore | 2013-06-14 13:50:21 -0500 (Fri, 14 Jun 2013) | 1 line
    
    Revert parts of r391855 that were not ready to go in to trunk
  ........
  
  Merged revisions 391855-391856 from file:///srv/subversion/repos/asterisk/trunk
........
  r391886 | kharwell | 2013-06-14 15:26:23 -0500 (Fri, 14 Jun 2013) | 10 lines
  
  Added call pickup group configuration options
  
  Added the ability to configure pick up groups automatically on a channel
  created for a chan_gulp endpoint. This includes: callgroup, pickupgroup,
  namedcallgroup, namedpickupgroup.
  
  (closes issue ASTERISK-21505)
  Reported by: Matt Jordan
  Review: https://reviewboard.asterisk.org/r/2589/
........

Merged revisions 391781,391834,391866,391886 from http://svn.asterisk.org/svn/asterisk/team/group/pimp_my_sip

Modified:
    team/kharwell/pimp_sip_qualify/   (props changed)
    team/kharwell/pimp_sip_qualify/channels/chan_gulp.c
    team/kharwell/pimp_sip_qualify/include/asterisk/res_sip.h
    team/kharwell/pimp_sip_qualify/res/res_sip.c
    team/kharwell/pimp_sip_qualify/res/res_sip/sip_configuration.c

Propchange: team/kharwell/pimp_sip_qualify/
------------------------------------------------------------------------------
--- pimp_sip_qualify-integrated (original)
+++ pimp_sip_qualify-integrated Fri Jun 14 15:35:42 2013
@@ -1,1 +1,1 @@
-/team/group/pimp_my_sip:1-391869
+/team/group/pimp_my_sip:1-391886

Modified: team/kharwell/pimp_sip_qualify/channels/chan_gulp.c
URL: http://svnview.digium.com/svn/asterisk/team/kharwell/pimp_sip_qualify/channels/chan_gulp.c?view=diff&rev=391887&r1=391886&r2=391887
==============================================================================
--- team/kharwell/pimp_sip_qualify/channels/chan_gulp.c (original)
+++ team/kharwell/pimp_sip_qualify/channels/chan_gulp.c Fri Jun 14 15:35:42 2013
@@ -578,6 +578,12 @@
 	ast_channel_context_set(chan, session->endpoint->context);
 	ast_channel_exten_set(chan, S_OR(exten, "s"));
 	ast_channel_priority_set(chan, 1);
+
+	ast_channel_callgroup_set(chan, session->endpoint->callgroup);
+	ast_channel_pickupgroup_set(chan, session->endpoint->pickupgroup);
+
+	ast_channel_named_callgroups_set(chan, session->endpoint->named_callgroups);
+	ast_channel_named_pickupgroups_set(chan, session->endpoint->named_pickupgroups);
 
 	return chan;
 }

Modified: team/kharwell/pimp_sip_qualify/include/asterisk/res_sip.h
URL: http://svnview.digium.com/svn/asterisk/team/kharwell/pimp_sip_qualify/include/asterisk/res_sip.h?view=diff&rev=391887&r1=391886&r2=391887
==============================================================================
--- team/kharwell/pimp_sip_qualify/include/asterisk/res_sip.h (original)
+++ team/kharwell/pimp_sip_qualify/include/asterisk/res_sip.h Fri Jun 14 15:35:42 2013
@@ -392,6 +392,14 @@
 	unsigned int one_touch_recording;
 	/*! Boolean indicating if ringing should be sent as inband progress */
 	unsigned int inband_progress;
+	/*! Call group */
+	ast_group_t callgroup;
+	/*! Pickup group */
+	ast_group_t pickupgroup;
+	/*! Named call group */
+	struct ast_namedgroups *named_callgroups;
+	/*! Named pickup group */
+	struct ast_namedgroups *named_pickupgroups;
 };
 
 /*!

Modified: team/kharwell/pimp_sip_qualify/res/res_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/kharwell/pimp_sip_qualify/res/res_sip.c?view=diff&rev=391887&r1=391886&r2=391887
==============================================================================
--- team/kharwell/pimp_sip_qualify/res/res_sip.c (original)
+++ team/kharwell/pimp_sip_qualify/res/res_sip.c Fri Jun 14 15:35:42 2013
@@ -345,6 +345,34 @@
 						to indicate ringing and will NOT send it as audio.
 					</para></description>
 				</configOption>
+				<configOption name="callgroup">
+					<synopsis>The numeric pickup groups for a channel.</synopsis>
+					<description><para>
+						Can be set to a comma separated list of numbers or ranges between the values
+						of 0-63 (maximum of 64 groups).
+					</para></description>
+				</configOption>
+				<configOption name="pickupgroup">
+					<synopsis>The numeric pickup groups that a channel can pickup.</synopsis>
+					<description><para>
+						Can be set to a comma separated list of numbers or ranges between the values
+						of 0-63 (maximum of 64 groups).
+					</para></description>
+				</configOption>
+				<configOption name="namedcallgroup">
+					<synopsis>The named pickup groups for a channel.</synopsis>
+					<description><para>
+						Can be set to a comma separated list of case sensitive strings limited by
+						supported line length.
+					</para></description>
+				</configOption>
+				<configOption name="namedpickupgroup">
+					<synopsis>The named pickup groups that a channel can pickup.</synopsis>
+					<description><para>
+						Can be set to a comma separated list of case sensitive strings limited by
+						supported line length.
+					</para></description>
+				</configOption>
 			</configObject>
 			<configObject name="auth">
 				<synopsis>Authentication type</synopsis>

Modified: team/kharwell/pimp_sip_qualify/res/res_sip/sip_configuration.c
URL: http://svnview.digium.com/svn/asterisk/team/kharwell/pimp_sip_qualify/res/res_sip/sip_configuration.c?view=diff&rev=391887&r1=391886&r2=391887
==============================================================================
--- team/kharwell/pimp_sip_qualify/res/res_sip/sip_configuration.c (original)
+++ team/kharwell/pimp_sip_qualify/res/res_sip/sip_configuration.c Fri Jun 14 15:35:42 2013
@@ -387,6 +387,48 @@
 		endpoint->media_encryption = AST_SIP_MEDIA_ENCRYPT_SDES;
 	/*} else if (!strcasecmp("dtls", var->value)) {
 		endpoint->media_encryption = AST_SIP_MEDIA_ENCRYPT_DTLS;*/
+	} else {
+		return -1;
+	}
+
+	return 0;
+}
+
+static int group_handler(const struct aco_option *opt,
+			 struct ast_variable *var, void *obj)
+{
+	struct ast_sip_endpoint *endpoint = obj;
+
+	if (!strncmp(var->name, "callgroup", 9)) {
+		if (!(endpoint->callgroup = ast_get_group(var->value))) {
+			return -1;
+		}
+	} else if (!strncmp(var->name, "pickupgroup", 11)) {
+		if (!(endpoint->pickupgroup = ast_get_group(var->value))) {
+			return -1;
+		}
+	} else {
+		return -1;
+	}
+
+	return 0;
+}
+
+static int named_groups_handler(const struct aco_option *opt,
+				struct ast_variable *var, void *obj)
+{
+	struct ast_sip_endpoint *endpoint = obj;
+
+	if (!strncmp(var->name, "namedcallgroup", 14)) {
+		if (!(endpoint->named_callgroups =
+		      ast_get_namedgroups(var->value))) {
+			return -1;
+		}
+	} else if (!strncmp(var->name, "namedpickupgroup", 16)) {
+		if (!(endpoint->named_pickupgroups =
+		      ast_get_namedgroups(var->value))) {
+			return -1;
+		}
 	} else {
 		return -1;
 	}
@@ -474,6 +516,10 @@
 	ast_sorcery_object_field_register(sip_sorcery, "endpoint", "use_avpf", "no", OPT_BOOL_T, 1, FLDSET(struct ast_sip_endpoint, use_avpf));
 	ast_sorcery_object_field_register(sip_sorcery, "endpoint", "one_touch_recording", "no", OPT_BOOL_T, 1, FLDSET(struct ast_sip_endpoint, one_touch_recording));
 	ast_sorcery_object_field_register(sip_sorcery, "endpoint", "inband_progress", "no", OPT_BOOL_T, 1, FLDSET(struct ast_sip_endpoint, inband_progress));
+	ast_sorcery_object_field_register_custom(sip_sorcery, "endpoint", "callgroup", "", group_handler, NULL, 0, 0);
+	ast_sorcery_object_field_register_custom(sip_sorcery, "endpoint", "pickupgroup", "", group_handler, NULL, 0, 0);
+	ast_sorcery_object_field_register_custom(sip_sorcery, "endpoint", "namedcallgroup", "", named_groups_handler, NULL, 0, 0);
+	ast_sorcery_object_field_register_custom(sip_sorcery, "endpoint", "namedpickupgroup", "", named_groups_handler, NULL, 0, 0);
 
 	if (ast_sip_initialize_sorcery_transport(sip_sorcery)) {
 		ast_log(LOG_ERROR, "Failed to register SIP transport support with sorcery\n");
@@ -534,6 +580,9 @@
 	destroy_auths(endpoint->sip_inbound_auths, endpoint->num_inbound_auths);
 	destroy_auths(endpoint->sip_outbound_auths, endpoint->num_outbound_auths);
 	ast_party_id_free(&endpoint->id);
+
+	endpoint->named_callgroups = ast_unref_namedgroups(endpoint->named_callgroups);
+	endpoint->named_pickupgroups = ast_unref_namedgroups(endpoint->named_pickupgroups);
 }
 
 void *ast_sip_endpoint_alloc(const char *name)




More information about the svn-commits mailing list