[asterisk-commits] irroot: branch irroot/patches r334441 - /team/irroot/patches/distrotech-10.patch

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sun Sep 4 06:37:56 CDT 2011


Author: irroot
Date: Sun Sep  4 06:37:45 2011
New Revision: 334441

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=334441
Log:
Add deadlock fix for app_queue / round robin fix for misdn / remove discarded gwtimeout patch

Modified:
    team/irroot/patches/distrotech-10.patch

Modified: team/irroot/patches/distrotech-10.patch
URL: http://svnview.digium.com/svn/asterisk/team/irroot/patches/distrotech-10.patch?view=diff&rev=334441&r1=334440&r2=334441
==============================================================================
--- team/irroot/patches/distrotech-10.patch (original)
+++ team/irroot/patches/distrotech-10.patch Sun Sep  4 06:37:45 2011
@@ -1,7 +1,7 @@
 Index: channels/chan_sip.c
 ===================================================================
---- channels/chan_sip.c	(.../branches/10)	(revision 333507)
-+++ channels/chan_sip.c	(.../team/irroot/distrotech-customers-10)	(revision 333507)
+--- channels/chan_sip.c	(.../branches/10)	(revision 334439)
++++ channels/chan_sip.c	(.../team/irroot/distrotech-customers-10)	(revision 334439)
 @@ -5489,17 +5489,23 @@
  
  		if (p->rtp && !p->srtp && setup_srtp(&p->srtp) < 0) {
@@ -88,7 +88,7 @@
  	}
  
  	if (udptlportno == -1) {
-@@ -11096,14 +11118,25 @@
+@@ -11097,14 +11119,25 @@
  	}
  }
  
@@ -116,7 +116,7 @@
  			*a_crypto = sdp_crypto_attrib(srtp->crypto);
  		}
  
-@@ -11271,7 +11304,7 @@
+@@ -11272,7 +11305,7 @@
  		/* Ok, we need video. Let's add what we need for video and set codecs.
  		   Video is handled differently than audio since we can not transcode. */
  		if (needvideo) {
@@ -125,7 +125,7 @@
  			ast_str_append(&m_video, 0, "m=video %d RTP/%s", ast_sockaddr_port(&vdest),
  				v_a_crypto ? "SAVP" : "AVP");
  
-@@ -11288,7 +11321,7 @@
+@@ -11289,7 +11322,7 @@
  		if (needtext) {
  			if (sipdebug_text)
  				ast_verbose("Lets set up the text sdp\n");
@@ -134,7 +134,7 @@
  			ast_str_append(&m_text, 0, "m=text %d RTP/%s", ast_sockaddr_port(&tdest),
  				t_a_crypto ? "SAVP" : "AVP");
  			if (debug) {  /* XXX should I use tdest below ? */
-@@ -11301,7 +11334,7 @@
+@@ -11302,7 +11335,7 @@
  		/* We break with the "recommendation" and send our IP, in order that our
  		   peer doesn't have to ast_gethostbyname() us */
  
@@ -143,7 +143,7 @@
  		ast_str_append(&m_audio, 0, "m=audio %d RTP/%s", ast_sockaddr_port(&dest),
  			a_crypto ? "SAVP" : "AVP");
  
-@@ -22945,7 +22978,8 @@
+@@ -22965,7 +22998,8 @@
  				transmit_response_with_t38_sdp(p, "200 OK", req, (reinvite ? XMIT_RELIABLE : (req->ignore ?  XMIT_UNRELIABLE : XMIT_CRITICAL)));
  			} else if ((p->t38.state == T38_DISABLED) || (p->t38.state == T38_REJECTED)) {
  				/* If this is not a re-invite or something to ignore - it's critical */
@@ -153,7 +153,7 @@
  					ast_log(LOG_WARNING, "Target does not support required crypto\n");
  					transmit_response_reliable(p, "488 Not Acceptable Here (crypto)", req);
  				} else {
-@@ -27110,6 +27144,11 @@
+@@ -27130,6 +27164,11 @@
  		int duplicate = 0;
  		/* remove leading/trailing whitespace from mailbox string */
  		mbox = ast_strip(mbox);
@@ -165,7 +165,7 @@
  		strsep(&context, "@");
  
  		if (ast_strlen_zero(mbox)) {
-@@ -27582,7 +27621,15 @@
+@@ -27602,7 +27641,15 @@
  			} else if (!strcasecmp(v->name, "use_q850_reason")) {
  				ast_set2_flag(&peer->flags[1], ast_true(v->value), SIP_PAGE2_Q850_REASON);
  			} else if (!strcasecmp(v->name, "encryption")) {
@@ -182,7 +182,7 @@
  			} else if (!strcasecmp(v->name, "snom_aoc_enabled")) {
  				ast_set2_flag(&peer->flags[2], ast_true(v->value), SIP_PAGE3_SNOM_AOC);
  			}
-@@ -29520,7 +29567,7 @@
+@@ -29540,7 +29587,7 @@
  		return FALSE;
  	}
  
@@ -191,10 +191,125 @@
  		return FALSE;
  	}
  
+Index: channels/chan_misdn.c
+===================================================================
+--- channels/chan_misdn.c	(.../branches/10)	(revision 334439)
++++ channels/chan_misdn.c	(.../team/irroot/distrotech-customers-10)	(revision 334439)
+@@ -7873,64 +7873,63 @@
+ 		}
+ 
+ 		if (rr) {
+-			int robin_channel = rr->channel;
+ 			int port_start;
+-			int next_chan = 1;
++			int bchan_start;
++			int port_up;
++			int check;
++			int maxbchans;
+ 
+-			do {
+-				port_start = 0;
+-				for (port = misdn_cfg_get_next_port_spin(rr->port); port > 0 && port != port_start;
+-					 port = misdn_cfg_get_next_port_spin(port)) {
++			if (!rr->port) {
++				rr->port = misdn_cfg_get_next_port_spin(0);
++			}
+ 
+-					if (!port_start) {
+-						port_start = port;
+-					}
++			if (!rr->channel) {
++				rr->channel = 1;
++			}
+ 
+-					if (port >= port_start) {
+-						next_chan = 1;
+-					}
++			bchan_start = rr->channel;
++			port_start = rr->port;
++			do {
++				misdn_cfg_get(rr->port, MISDN_CFG_GROUPNAME, cfg_group, sizeof(cfg_group));
++				if (strcasecmp(cfg_group, group)) {
++					rr->port = misdn_cfg_get_next_port_spin(rr->port);
++					rr->channel = 1;
++					continue;
++				}
+ 
+-					if (port <= port_start && next_chan) {
+-						int maxbchans = misdn_lib_get_maxchans(port);
++				misdn_cfg_get(rr->port, MISDN_CFG_PMP_L1_CHECK, &check, sizeof(check));
++				port_up = misdn_lib_port_up(rr->port, check);
+ 
+-						if (++robin_channel >= maxbchans) {
+-							robin_channel = 1;
+-						}
+-						next_chan = 0;
+-					}
++				if (!port_up) {
++					chan_misdn_log(1, rr->port, "L1 is not Up on this Port\n");
++					rr->port = misdn_cfg_get_next_port_spin(rr->port);
++					rr->channel = 1;
++				} else if (port_up < 0) {
++					ast_log(LOG_WARNING, "This port (%d) is blocked\n", rr->port);
++					rr->port = misdn_cfg_get_next_port_spin(rr->port);
++					rr->channel = 1;
++				} else {
++					chan_misdn_log(4, rr->port, "portup\n");
++					maxbchans = misdn_lib_get_maxchans(rr->port);
+ 
+-					misdn_cfg_get(port, MISDN_CFG_GROUPNAME, cfg_group, sizeof(cfg_group));
++					for (;rr->channel <= maxbchans;rr->channel++) {
++						chan_misdn_log(4, rr->port, "Checking channel %d\n",  rr->channel);
+ 
+-					if (!strcasecmp(cfg_group, group)) {
+-						int port_up;
+-						int check;
+-
+-						misdn_cfg_get(port, MISDN_CFG_PMP_L1_CHECK, &check, sizeof(check));
+-						port_up = misdn_lib_port_up(port, check);
+-
+-						if (check && !port_up) {
+-							chan_misdn_log(1, port, "L1 is not Up on this Port\n");
++						if ((newbc = misdn_lib_get_free_bc(rr->port, rr->channel, 0, 0))) {
++							chan_misdn_log(4, rr->port, " Success! Found port:%d channel:%d\n", newbc->port, newbc->channel);
++							rr->channel++;
++							break;
+ 						}
+-
+-						if (check && port_up < 0) {
+-							ast_log(LOG_WARNING, "This port (%d) is blocked\n", port);
+-						}
+-
+-						if (port_up > 0)	{
+-							newbc = misdn_lib_get_free_bc(port, robin_channel, 0, 0);
+-							if (newbc) {
+-								chan_misdn_log(4, port, " Success! Found port:%d channel:%d\n", newbc->port, newbc->channel);
+-								if (port_up) {
+-									chan_misdn_log(4, port, "portup:%d\n",  port_up);
+-								}
+-								rr->port = newbc->port;
+-								rr->channel = newbc->channel;
+-								break;
+-							}
+-						}
+ 					}
++					if (!newbc || (rr->channel > maxbchans)) {
++						rr->port = misdn_cfg_get_next_port_spin(rr->port);
++						rr->channel = 1;
++					}
++
+ 				}
+-			} while (!newbc && robin_channel != rr->channel);
++			} while (!newbc && (rr->port > 0) &&
++				 ((rr->port != port_start) || ((rr->port == port_start) && (rr->channel < bchan_start))));
++
+ 		} else {
+ 			for (port = misdn_cfg_get_next_port(0); port > 0;
+ 				port = misdn_cfg_get_next_port(port)) {
 Index: channels/sip/include/sip.h
 ===================================================================
---- channels/sip/include/sip.h	(.../branches/10)	(revision 333507)
-+++ channels/sip/include/sip.h	(.../team/irroot/distrotech-customers-10)	(revision 333507)
+--- channels/sip/include/sip.h	(.../branches/10)	(revision 334439)
++++ channels/sip/include/sip.h	(.../team/irroot/distrotech-customers-10)	(revision 334439)
 @@ -353,9 +353,11 @@
  
  
@@ -210,8 +325,8 @@
  
 Index: channels/sip/include/sdp_crypto.h
 ===================================================================
---- channels/sip/include/sdp_crypto.h	(.../branches/10)	(revision 333507)
-+++ channels/sip/include/sdp_crypto.h	(.../team/irroot/distrotech-customers-10)	(revision 333507)
+--- channels/sip/include/sdp_crypto.h	(.../branches/10)	(revision 334439)
++++ channels/sip/include/sdp_crypto.h	(.../team/irroot/distrotech-customers-10)	(revision 334439)
 @@ -31,6 +31,7 @@
  #include <asterisk/rtp_engine.h>
  
@@ -245,8 +360,8 @@
  /*! \brief Return the a_crypto value of the sdp_crypto struct
 Index: channels/sip/include/srtp.h
 ===================================================================
---- channels/sip/include/srtp.h	(.../branches/10)	(revision 333507)
-+++ channels/sip/include/srtp.h	(.../team/irroot/distrotech-customers-10)	(revision 333507)
+--- channels/sip/include/srtp.h	(.../branches/10)	(revision 334439)
++++ channels/sip/include/srtp.h	(.../team/irroot/distrotech-customers-10)	(revision 334439)
 @@ -34,6 +34,8 @@
  #define SRTP_ENCR_OPTIONAL	(1 << 1)	/* SRTP encryption optional */
  #define SRTP_CRYPTO_ENABLE	(1 << 2)
@@ -258,8 +373,8 @@
  struct sip_srtp {
 Index: channels/sip/sdp_crypto.c
 ===================================================================
---- channels/sip/sdp_crypto.c	(.../branches/10)	(revision 333507)
-+++ channels/sip/sdp_crypto.c	(.../team/irroot/distrotech-customers-10)	(revision 333507)
+--- channels/sip/sdp_crypto.c	(.../branches/10)	(revision 334439)
++++ channels/sip/sdp_crypto.c	(.../team/irroot/distrotech-customers-10)	(revision 334439)
 @@ -32,6 +32,7 @@
  #include "asterisk/options.h"
  #include "asterisk/utils.h"
@@ -310,8 +425,8 @@
  
 Index: channels/chan_local.c
 ===================================================================
---- channels/chan_local.c	(.../branches/10)	(revision 333507)
-+++ channels/chan_local.c	(.../team/irroot/distrotech-customers-10)	(revision 333507)
+--- channels/chan_local.c	(.../branches/10)	(revision 334439)
++++ channels/chan_local.c	(.../team/irroot/distrotech-customers-10)	(revision 334439)
 @@ -587,6 +587,7 @@
  static int local_write(struct ast_channel *ast, struct ast_frame *f)
  {
@@ -343,8 +458,8 @@
  	if (!ast_test_flag(p, LOCAL_ALREADY_MASQED)) {
 Index: configure.ac
 ===================================================================
---- configure.ac	(.../branches/10)	(revision 333507)
-+++ configure.ac	(.../team/irroot/distrotech-customers-10)	(revision 333507)
+--- configure.ac	(.../branches/10)	(revision 334439)
++++ configure.ac	(.../team/irroot/distrotech-customers-10)	(revision 334439)
 @@ -1721,7 +1721,7 @@
     AST_EXT_LIB_CHECK([SUPPSERV], [suppserv], [encodeFac], [mISDNuser/suppserv.h])
     AST_C_DEFINE_CHECK([MISDN_FAC_RESULT], [Fac_RESULT], [mISDNuser/suppserv.h])
@@ -356,8 +471,8 @@
  
 Index: apps/app_readexten.c
 ===================================================================
---- apps/app_readexten.c	(.../branches/10)	(revision 333507)
-+++ apps/app_readexten.c	(.../team/irroot/distrotech-customers-10)	(revision 333507)
+--- apps/app_readexten.c	(.../branches/10)	(revision 334439)
++++ apps/app_readexten.c	(.../team/irroot/distrotech-customers-10)	(revision 334439)
 @@ -96,24 +96,6 @@
  			</variablelist>
  		</description>
@@ -443,8 +558,8 @@
  
 Index: apps/app_queue.c
 ===================================================================
---- apps/app_queue.c	(.../branches/10)	(revision 333507)
-+++ apps/app_queue.c	(.../team/irroot/distrotech-customers-10)	(revision 333507)
+--- apps/app_queue.c	(.../branches/10)	(revision 334439)
++++ apps/app_queue.c	(.../team/irroot/distrotech-customers-10)	(revision 334439)
 @@ -952,6 +952,9 @@
  /*! \brief queues.conf [general] option */
  static int negative_penalty_invalid = 0;
@@ -519,7 +634,36 @@
  			ao2_unlink(q->members, m);
  			q->membercount--;
  		}
-@@ -5082,8 +5100,26 @@
+@@ -4091,6 +4109,7 @@
+ 	struct ao2_iterator queue_iter;	
+ 	
+ 	if (shared_lastcall) {
++		ao2_lock(queues);
+ 		queue_iter = ao2_iterator_init(queues, 0);
+ 		while ((qtmp = ao2_t_iterator_next(&queue_iter, "Iterate through queues"))) {
+ 			ao2_lock(qtmp);
+@@ -4104,6 +4123,7 @@
+ 			queue_t_unref(qtmp, "Done with iterator");
+ 		}
+ 		ao2_iterator_destroy(&queue_iter);
++		ao2_unlock(queues);
+ 	} else {
+ 		ao2_lock(q);
+ 		time(&member->lastcall);
+@@ -4654,9 +4674,10 @@
+ 	orig = to;
+ 	++qe->pending;
+ 	ao2_unlock(qe->parent);
++	if (need_weight) {
++		ao2_unlock(queues);
++	}
+ 	ring_one(qe, outgoing, &numbusies);
+-	if (need_weight)
+-		ao2_unlock(queues);
+ 	lpeer = wait_for_answer(qe, outgoing, &to, &digit, numbusies, ast_test_flag(&(bridge_config.features_caller), AST_FEATURE_DISCONNECT), forwardsallowed, update_connectedline);
+ 	/* The ast_channel_datastore_remove() function could fail here if the
+ 	 * datastore was moved to another channel during a masquerade. If this is
+@@ -5082,8 +5103,26 @@
  		qe->handled++;
  		ast_queue_log(queuename, qe->chan->uniqueid, member->membername, "CONNECT", "%ld|%s|%ld", (long) time(NULL) - qe->start, peer->uniqueid,
  													(long)(orig - to > 0 ? (orig - to) / 1000 : 0));
@@ -548,7 +692,7 @@
  		if (qe->parent->eventwhencalled)
  			manager_event(EVENT_FLAG_AGENT, "AgentConnect",
  					"Queue: %s\r\n"
-@@ -5329,13 +5365,14 @@
+@@ -5329,13 +5368,14 @@
  				"Queue: %s\r\n"
  				"Location: %s\r\n"
  				"MemberName: %s\r\n"
@@ -564,7 +708,7 @@
  				"dynamic",
  				new_member->penalty, new_member->calls, (int) new_member->lastcall,
  				new_member->status, new_member->paused);
-@@ -5691,6 +5728,8 @@
+@@ -5691,6 +5731,8 @@
  {
  	int res=-1;
  	char *parse, *temppos = NULL;
@@ -573,7 +717,7 @@
  	AST_DECLARE_APP_ARGS(args,
  		AST_APP_ARG(queuename);
  		AST_APP_ARG(interface);
-@@ -5716,9 +5755,17 @@
+@@ -5716,9 +5758,17 @@
  
  	ast_debug(1, "queue: %s, member: %s\n", args.queuename, args.interface);
  
@@ -592,7 +736,7 @@
  		ast_log(LOG_NOTICE, "Removed interface '%s' from queue '%s'\n", args.interface, args.queuename);
  		pbx_builtin_setvar_helper(chan, "RQMSTATUS", "REMOVED");
  		res = 0;
-@@ -5783,7 +5830,11 @@
+@@ -5783,7 +5833,11 @@
  
  	switch (add_to_queue(args.queuename, args.interface, args.membername, penalty, 0, queue_persistent_members, args.state_interface)) {
  	case RES_OKAY:
@@ -605,7 +749,7 @@
  		ast_log(LOG_NOTICE, "Added interface '%s' to queue '%s'\n", args.interface, args.queuename);
  		pbx_builtin_setvar_helper(chan, "AQMSTATUS", "ADDED");
  		res = 0;
-@@ -5799,7 +5850,7 @@
+@@ -5799,7 +5853,7 @@
  		res = 0;
  		break;
  	case RES_OUTOFMEMORY:
@@ -614,7 +758,7 @@
  		break;
  	}
  
-@@ -6713,6 +6764,9 @@
+@@ -6713,6 +6767,9 @@
  	negative_penalty_invalid = 0;
  	if ((general_val = ast_variable_retrieve(cfg, "general", "negative_penalty_invalid")))
  		negative_penalty_invalid = ast_true(general_val);
@@ -624,7 +768,7 @@
  }
  
  /*! \brief reload information pertaining to a single member
-@@ -7160,7 +7214,11 @@
+@@ -7160,7 +7217,11 @@
  			while ((mem = ao2_iterator_next(&mem_iter))) {
  				ast_str_set(&out, 0, "      %s", mem->membername);
  				if (strcasecmp(mem->membername, mem->interface)) {
@@ -637,7 +781,7 @@
  				}
  				if (mem->penalty)
  					ast_str_append(&out, 0, " with penalty %d", mem->penalty);
-@@ -7428,6 +7486,7 @@
+@@ -7428,6 +7489,7 @@
  						"Queue: %s\r\n"
  						"Name: %s\r\n"
  						"Location: %s\r\n"
@@ -645,7 +789,7 @@
  						"Membership: %s\r\n"
  						"Penalty: %d\r\n"
  						"CallsTaken: %d\r\n"
-@@ -7436,7 +7495,7 @@
+@@ -7436,7 +7498,7 @@
  						"Paused: %d\r\n"
  						"%s"
  						"\r\n",
@@ -654,7 +798,7 @@
  						mem->penalty, mem->calls, (int)mem->lastcall, mem->status, mem->paused, idText);
  				}
  				ao2_ref(mem, -1);
-@@ -7512,7 +7571,11 @@
+@@ -7512,7 +7574,11 @@
  
  	switch (add_to_queue(queuename, interface, membername, penalty, paused, queue_persistent_members, state_interface)) {
  	case RES_OKAY:
@@ -667,7 +811,7 @@
  		astman_send_ack(s, m, "Added interface to queue");
  		break;
  	case RES_EXISTS:
-@@ -7532,6 +7595,7 @@
+@@ -7532,6 +7598,7 @@
  static int manager_remove_queue_member(struct mansession *s, const struct message *m)
  {
  	const char *queuename, *interface;
@@ -675,7 +819,7 @@
  
  	queuename = astman_get_header(m, "Queue");
  	interface = astman_get_header(m, "Interface");
-@@ -7541,9 +7605,17 @@
+@@ -7541,9 +7608,17 @@
  		return 0;
  	}
  
@@ -694,7 +838,7 @@
  		astman_send_ack(s, m, "Removed interface from queue");
  		break;
  	case RES_EXISTS:
-@@ -7765,7 +7837,11 @@
+@@ -7765,7 +7840,11 @@
  
  	switch (add_to_queue(queuename, interface, membername, penalty, 0, queue_persistent_members, state_interface)) {
  	case RES_OKAY:
@@ -707,7 +851,7 @@
  		ast_cli(a->fd, "Added interface '%s' to queue '%s'\n", interface, queuename);
  		return CLI_SUCCESS;
  	case RES_EXISTS:
-@@ -7833,11 +7909,12 @@
+@@ -7833,11 +7912,12 @@
  static char *handle_queue_remove_member(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
  {
  	const char *queuename, *interface;
@@ -721,7 +865,7 @@
  			"Usage: queue remove member <channel> from <queue>\n"
  			"       Remove a specific channel from a queue.\n";
  		return NULL;
-@@ -7854,10 +7931,18 @@
+@@ -7854,10 +7934,18 @@
  	queuename = a->argv[5];
  	interface = a->argv[3];
  
@@ -742,7 +886,7 @@
  		return CLI_SUCCESS;
  	case RES_EXISTS:
  		ast_cli(a->fd, "Unable to remove interface '%s' from queue '%s': Not there\n", interface, queuename);
-@@ -8580,6 +8665,26 @@
+@@ -8580,6 +8668,26 @@
  	return 0;
  }
  
@@ -771,9 +915,9 @@
  		.unload = unload_module,
 Index: CHANGES
 ===================================================================
---- CHANGES	(.../branches/10)	(revision 333507)
-+++ CHANGES	(.../team/irroot/distrotech-customers-10)	(revision 333507)
-@@ -179,6 +179,8 @@
+--- CHANGES	(.../branches/10)	(revision 334439)
++++ CHANGES	(.../team/irroot/distrotech-customers-10)	(revision 334439)
+@@ -183,6 +183,8 @@
  SIP Changes
  -----------
   * Add T38 support for REJECTED state where T.38 Negotiation is explicitly rejected.
@@ -784,8 +928,8 @@
  -------------
 Index: Makefile
 ===================================================================
---- Makefile	(.../branches/10)	(revision 333507)
-+++ Makefile	(.../team/irroot/distrotech-customers-10)	(revision 333507)
+--- Makefile	(.../branches/10)	(revision 334439)
++++ Makefile	(.../team/irroot/distrotech-customers-10)	(revision 334439)
 @@ -127,7 +127,7 @@
  # Asterisk.conf is located in ASTETCDIR or by using the -C flag
  # when starting Asterisk
@@ -797,8 +941,8 @@
  # If you use Apache, you may determine by a grep 'DocumentRoot' of your httpd.conf file
 Index: funcs/func_dialplan.c
 ===================================================================
---- funcs/func_dialplan.c	(.../branches/10)	(revision 333507)
-+++ funcs/func_dialplan.c	(.../team/irroot/distrotech-customers-10)	(revision 333507)
+--- funcs/func_dialplan.c	(.../branches/10)	(revision 334439)
++++ funcs/func_dialplan.c	(.../team/irroot/distrotech-customers-10)	(revision 334439)
 @@ -51,7 +51,24 @@
  			<para>This function returns <literal>1</literal> if the target exits. Otherwise, it returns <literal>0</literal>.</para>
  		</description>
@@ -895,9 +1039,9 @@
  AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Dialplan Context/Extension/Priority Checking Functions");
 Index: main/channel.c
 ===================================================================
---- main/channel.c	(.../branches/10)	(revision 333507)
-+++ main/channel.c	(.../team/irroot/distrotech-customers-10)	(revision 333507)
-@@ -4925,6 +4925,11 @@
+--- main/channel.c	(.../branches/10)	(revision 334439)
++++ main/channel.c	(.../team/irroot/distrotech-customers-10)	(revision 334439)
+@@ -4964,6 +4964,11 @@
  			apply_plc(chan, fr);
  		}
  
@@ -909,7 +1053,7 @@
  		/* If the frame is in the raw write format, then it's easy... just use the frame - otherwise we will have to translate */
  		if (ast_format_cmp(&fr->subclass.format, &chan->rawwriteformat) != AST_FORMAT_CMP_NOT_EQUAL)
  			f = fr;
-@@ -7346,6 +7351,8 @@
+@@ -7418,6 +7423,8 @@
  	long time_left_ms=0;
  	char caller_warning = 0;
  	char callee_warning = 0;
@@ -918,7 +1062,7 @@
  
  	*fo = NULL;
  
-@@ -7425,6 +7432,17 @@
+@@ -7497,6 +7504,17 @@
  	ast_indicate(c0, AST_CONTROL_SRCUPDATE);
  	ast_indicate(c1, AST_CONTROL_SRCUPDATE);
  
@@ -938,8 +1082,8 @@
  		int to;
 Index: configs/sip.conf.sample
 ===================================================================
---- configs/sip.conf.sample	(.../branches/10)	(revision 333507)
-+++ configs/sip.conf.sample	(.../team/irroot/distrotech-customers-10)	(revision 333507)
+--- configs/sip.conf.sample	(.../branches/10)	(revision 334439)
++++ configs/sip.conf.sample	(.../team/irroot/distrotech-customers-10)	(revision 334439)
 @@ -901,6 +901,9 @@
  ;encryption=no                  ; Whether to offer SRTP encrypted media (and only SRTP encrypted media)
                                  ; on outgoing calls to a peer. Calls will fail with HANGUPCAUSE=58 if
@@ -952,8 +1096,8 @@
  ; For additional information on ARA, the Asterisk Realtime Architecture,
 Index: configs/queues.conf.sample
 ===================================================================
---- configs/queues.conf.sample	(.../branches/10)	(revision 333507)
-+++ configs/queues.conf.sample	(.../team/irroot/distrotech-customers-10)	(revision 333507)
+--- configs/queues.conf.sample	(.../branches/10)	(revision 334439)
++++ configs/queues.conf.sample	(.../team/irroot/distrotech-customers-10)	(revision 334439)
 @@ -65,6 +65,12 @@
  ;
  ;negative_penalty_invalid = no
@@ -969,9 +1113,9 @@
  ; A sample call queue
 Index: res/res_fax.c
 ===================================================================
---- res/res_fax.c	(.../branches/10)	(revision 333507)
-+++ res/res_fax.c	(.../team/irroot/distrotech-customers-10)	(revision 333507)
-@@ -228,10 +228,33 @@
+--- res/res_fax.c	(.../branches/10)	(revision 334439)
++++ res/res_fax.c	(.../team/irroot/distrotech-customers-10)	(revision 334439)
+@@ -225,10 +225,33 @@
  			<ref type="application">SendFax</ref>
  		</see-also>
  	</function>
@@ -1005,69 +1149,7 @@
  
  struct debug_info_history {
  	unsigned int consec_frames;
-@@ -2423,7 +2446,7 @@
- 	ast_dsp_set_faxmode(gateway->peer_dsp, DSP_FAXMODE_DETECT_V21);
- 
- 	details->caps = AST_FAX_TECH_GATEWAY;
--	if (details->gateway_timeout && !(gateway->s = fax_session_reserve(details, &gateway->token))) {
-+	if (!(gateway->s = fax_session_reserve(details, &gateway->token))) {
- 		details->caps |= ~AST_FAX_TECH_GATEWAY;
- 		ast_log(LOG_ERROR, "Can't reserve a FAX session, gateway attempt failed.\n");
- 		ao2_ref(gateway, -1);
-@@ -2507,7 +2530,6 @@
- 
- 	gateway->t38_state = T38_STATE_NEGOTIATING;
- 	gateway->timeout_start = ast_tvnow();
--	details->gateway_timeout = FAX_GATEWAY_TIMEOUT;
- 
- 	ast_debug(1, "requesting T.38 for gateway session for %s\n", chan->name);
- 	return fp;
-@@ -2600,7 +2622,6 @@
- 			t38_parameters_ast_to_fax(&details->their_t38_parameters, control_params);
- 			gateway->t38_state = T38_STATE_UNKNOWN;
- 			gateway->timeout_start = ast_tvnow();
--			details->gateway_timeout = FAX_GATEWAY_TIMEOUT;
- 			ao2_ref(details, -1);
- 			return f;
- 		} else if (state == T38_STATE_UNAVAILABLE || state == T38_STATE_REJECTED) {
-@@ -2638,7 +2659,6 @@
- 			t38_parameters_ast_to_fax(&details->their_t38_parameters, control_params);
- 			gateway->t38_state = T38_STATE_UNKNOWN;
- 			gateway->timeout_start = ast_tvnow();
--			details->gateway_timeout = FAX_GATEWAY_TIMEOUT;
- 
- 			ast_debug(1, "%s is attempting to negotiate T.38 after we already sent a negotiation request based on v21 preamble detection\n", active->name);
- 			ao2_ref(details, -1);
-@@ -2882,9 +2902,7 @@
- 			return f;
- 		}
- 
--		if (details->gateway_timeout) {
--			gateway->timeout_start = ast_tvnow();
--		}
-+		gateway->timeout_start = ast_tvnow();
- 
- 		/* we are bridged, change r/w formats to SLIN for v21 preamble
- 		 * detection and T.30 */
-@@ -2904,14 +2922,14 @@
- 		gateway->bridged = 1;
- 	}
- 
--	if (gateway->bridged && !ast_tvzero(gateway->timeout_start)) {
-+	if (details->gateway_timeout && gateway->bridged && !ast_tvzero(gateway->timeout_start)) {
- 		if (ast_tvdiff_ms(ast_tvnow(), gateway->timeout_start) > details->gateway_timeout) {
--			ast_debug(1, "no fax activity between %s and %s after %d ms, disabling gateway\n", chan->name, peer->name, FAX_GATEWAY_TIMEOUT);
-+			ast_debug(1, "no fax activity between %s and %s after %d ms, disabling gateway\n", chan->name, peer->name, details->gateway_timeout);
- 			ast_framehook_detach(chan, gateway->framehook);
- 			details->gateway_id = -1;
- 
- 			ast_string_field_set(details, result, "FAILED");
--			ast_string_field_build(details, resultstr, "no fax activity after %d ms", FAX_GATEWAY_TIMEOUT);
-+			ast_string_field_build(details, resultstr, "no fax activity after %d ms", details->gateway_timeout);
- 			ast_string_field_set(details, error, "TIMEOUT");
- 			set_channel_variables(chan, details);
- 			ao2_ref(details, -1);
-@@ -3071,6 +3089,197 @@
+@@ -3068,6 +3091,197 @@
  	return gateway->framehook;
  }
  
@@ -1265,7 +1347,7 @@
  /*! \brief hash callback for ao2 */
  static int session_hash_cb(const void *obj, const int flags)
  {
-@@ -3631,6 +3840,10 @@
+@@ -3630,6 +3844,10 @@
  		ast_log(LOG_WARNING, "failed to unregister '%s'\n", app_receivefax);
  	}
  
@@ -1276,7 +1358,7 @@
  	if (fax_logger_level != -1) {
  		ast_logger_unregister_level("FAX");
  	}
-@@ -3671,8 +3884,12 @@
+@@ -3670,8 +3888,12 @@
  		return AST_MODULE_LOAD_DECLINE;
  	}
  
@@ -1292,8 +1374,8 @@
  	return res;
 Index: contrib/scripts/safe_asterisk
 ===================================================================
---- contrib/scripts/safe_asterisk	(.../branches/10)	(revision 333507)
-+++ contrib/scripts/safe_asterisk	(.../team/irroot/distrotech-customers-10)	(revision 333507)
+--- contrib/scripts/safe_asterisk	(.../branches/10)	(revision 334439)
++++ contrib/scripts/safe_asterisk	(.../team/irroot/distrotech-customers-10)	(revision 334439)
 @@ -6,14 +6,14 @@
  ASTVARLOGDIR=__ASTERISK_LOG_DIR__
  
@@ -1336,7 +1418,7 @@
 Added: automerge
    + *
 Added: svnmerge-integrated
-   + /branches/10:1-333477
+   + /branches/10:1-334438
 Added: automerge-email
    + gregory at distrotech.co.za
 




More information about the asterisk-commits mailing list