[asterisk-commits] anthonyl: branch anthonyl/8267 r47473 - in /team/anthonyl/8267: channels/ con...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri Nov 10 14:34:14 MST 2006


Author: anthonyl
Date: Fri Nov 10 15:34:14 2006
New Revision: 47473

URL: http://svn.digium.com/view/asterisk?view=rev&rev=47473
Log:
patch in

Modified:
    team/anthonyl/8267/channels/chan_iax2.c
    team/anthonyl/8267/configs/iax.conf.sample

Modified: team/anthonyl/8267/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/team/anthonyl/8267/channels/chan_iax2.c?view=diff&rev=47473&r1=47472&r2=47473
==============================================================================
--- team/anthonyl/8267/channels/chan_iax2.c (original)
+++ team/anthonyl/8267/channels/chan_iax2.c Fri Nov 10 15:34:14 2006
@@ -164,6 +164,7 @@
 static int resyncthreshold=1000;
 static int maxjitterinterps=10;
 static int trunkfreq = 20;
+static int trunkrealloc = 0; 
 static int authdebug = 1;
 static int autokill = 0;
 static int iaxcompat = 0;
@@ -384,6 +385,7 @@
 	int trunkmaxmtu;
 	int trunkerror;
 	int calls;
+	int dynamicalloc;                     /*!< Dynamic */
 	AST_LIST_ENTRY(iax2_trunk_peer) list;
 };
 
@@ -3572,8 +3574,9 @@
 	tpeer = find_tpeer(&pvt->addr, pvt->sockfd);
 	if (tpeer) {
 		if (tpeer->trunkdatalen + f->datalen + 4 >= tpeer->trunkdataalloc) {
+							
 			/* Need to reallocate space */
-			if (tpeer->trunkdataalloc < MAX_TRUNKDATA) {
+			if (tpeer->trunkdataalloc < MAX_TRUNKDATA || trunkrealloc == 1) {
 				if (!(tmp = ast_realloc(tpeer->trunkdata, tpeer->trunkdataalloc + DEFAULT_TRUNKDATA + IAX2_TRUNK_PREFACE))) {
 					ast_mutex_unlock(&tpeer->lock);
 					return -1;
@@ -8992,6 +8995,8 @@
 			iax2_register(v->value, v->lineno);
 		} else if (!strcasecmp(v->name, "iaxcompat")) {
 			iaxcompat = ast_true(v->value);
+		} else if (!strcasecmp(v->name, "trunkrealloc")) {
+			trunkrealloc = ast_true(v->value);
 		} else if (!strcasecmp(v->name, "regcontext")) {
 			ast_copy_string(regcontext, v->value, sizeof(regcontext));
 			/* Create context if it doesn't exist already */

Modified: team/anthonyl/8267/configs/iax.conf.sample
URL: http://svn.digium.com/view/asterisk/team/anthonyl/8267/configs/iax.conf.sample?view=diff&rev=47473&r1=47472&r2=47473
==============================================================================
--- team/anthonyl/8267/configs/iax.conf.sample (original)
+++ team/anthonyl/8267/configs/iax.conf.sample Fri Nov 10 15:34:14 2006
@@ -27,6 +27,13 @@
 ; blocking while it waits for a response.
 ;
 ;iaxcompat=yes
+;
+; Set trunkrealloc to yes if you have a iax2 trunk which handles a LARGE
+; amount of messages. it allows the channel to increase the amount of
+; messages that can be stored inside of the outgoing trunk queue on
+; it's own not using a hard limit. 
+;
+;trunkrealloc=yes
 ;
 ; Disable UDP checksums (if nochecksums is set, then no checkums will
 ; be calculated/checked on systems supporting this feature)



More information about the asterisk-commits mailing list