[asterisk-commits] kpfleming: branch group/new_loader_completion r40086 - in /team/group/new_loa...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed Aug 16 12:42:54 MST 2006


Author: kpfleming
Date: Wed Aug 16 14:42:53 2006
New Revision: 40086

URL: http://svn.digium.com/view/asterisk?rev=40086&view=rev
Log:
update to trunk
add configure script support for libsuppserv

Added:
    team/group/new_loader_completion/doc/macroexclusive.txt
      - copied unchanged from r40084, trunk/doc/macroexclusive.txt
Removed:
    team/group/new_loader_completion/channels/misdn/asn1.c
    team/group/new_loader_completion/channels/misdn/asn1.h
    team/group/new_loader_completion/channels/misdn/fac.c
    team/group/new_loader_completion/channels/misdn/fac.h
Modified:
    team/group/new_loader_completion/   (props changed)
    team/group/new_loader_completion/UPGRADE.txt
    team/group/new_loader_completion/app.c
    team/group/new_loader_completion/apps/app_forkcdr.c
    team/group/new_loader_completion/apps/app_macro.c
    team/group/new_loader_completion/apps/app_voicemail.c
    team/group/new_loader_completion/build_tools/menuselect-deps.in
    team/group/new_loader_completion/cdr.c
    team/group/new_loader_completion/channel.c
    team/group/new_loader_completion/channels/Makefile
    team/group/new_loader_completion/channels/chan_alsa.c
    team/group/new_loader_completion/channels/chan_h323.c
    team/group/new_loader_completion/channels/chan_jingle.c
    team/group/new_loader_completion/channels/chan_mgcp.c
    team/group/new_loader_completion/channels/chan_misdn.c
    team/group/new_loader_completion/channels/chan_oss.c
    team/group/new_loader_completion/channels/chan_sip.c
    team/group/new_loader_completion/channels/chan_skinny.c
    team/group/new_loader_completion/channels/misdn/Makefile
    team/group/new_loader_completion/channels/misdn/isdn_lib.c
    team/group/new_loader_completion/channels/misdn/isdn_lib.h
    team/group/new_loader_completion/channels/misdn/isdn_lib_intern.h
    team/group/new_loader_completion/channels/misdn/isdn_msg_parser.c
    team/group/new_loader_completion/codecs/Makefile
    team/group/new_loader_completion/configure
    team/group/new_loader_completion/configure.ac
    team/group/new_loader_completion/doc/odbcstorage.txt
    team/group/new_loader_completion/doc/smdi.txt
    team/group/new_loader_completion/frame.c
    team/group/new_loader_completion/include/asterisk/autoconfig.h.in
    team/group/new_loader_completion/include/asterisk/pbx.h
    team/group/new_loader_completion/makeopts.in
    team/group/new_loader_completion/pbx.c
    team/group/new_loader_completion/res/res_agi.c
    team/group/new_loader_completion/translate.c

Propchange: team/group/new_loader_completion/
------------------------------------------------------------------------------
    automerge = yes

Propchange: team/group/new_loader_completion/
------------------------------------------------------------------------------
Binary property 'branch-1.2-blocked' - no diff available.

Propchange: team/group/new_loader_completion/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.

Propchange: team/group/new_loader_completion/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed Aug 16 14:42:53 2006
@@ -1,1 +1,1 @@
-/trunk:1-39659
+/trunk:1-40085

Modified: team/group/new_loader_completion/UPGRADE.txt
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/UPGRADE.txt?rev=40086&r1=40085&r2=40086&view=diff
==============================================================================
--- team/group/new_loader_completion/UPGRADE.txt (original)
+++ team/group/new_loader_completion/UPGRADE.txt Wed Aug 16 14:42:53 2006
@@ -197,6 +197,10 @@
   exit code, the AGISTATUS variable will be set to "FAILURE" as opposed to
   "SUCCESS".
 
+* app_voicemail: The ODBC_STORAGE capability now requires the extended table format
+  previously used only by EXTENDED_ODBC_STORAGE. This means that you will need to update
+  your table format using the schema provided in doc/odbcstorage.txt
+
 Manager:
 
 * After executing the 'status' manager action, the "Status" manager events

Modified: team/group/new_loader_completion/app.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/app.c?rev=40086&r1=40085&r2=40086&view=diff
==============================================================================
--- team/group/new_loader_completion/app.c (original)
+++ team/group/new_loader_completion/app.c Wed Aug 16 14:42:53 2006
@@ -884,7 +884,7 @@
 			else if (*scan == ')') {
 				if (paren)
 					paren--;
-			} else if (*scan == '"') {
+			} else if (*scan == '"' && delim != '"') {
 				quote = quote ? 0 : 1;
 				/* Remove quote character from argument */
 				memmove(scan, scan + 1, strlen(scan));

Modified: team/group/new_loader_completion/apps/app_forkcdr.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/apps/app_forkcdr.c?rev=40086&r1=40085&r2=40086&view=diff
==============================================================================
--- team/group/new_loader_completion/apps/app_forkcdr.c (original)
+++ team/group/new_loader_completion/apps/app_forkcdr.c Wed Aug 16 14:42:53 2006
@@ -21,7 +21,7 @@
  *
  * \author Anthony Minessale anthmct at yahoo.com
  *
- * \note Development of this app Sponsered/Funded  by TAAN Softworks Corp
+ * \note Development of this app Sponsored/Funded by TAAN Softworks Corp
  * 
  * \ingroup applications
  */
@@ -48,8 +48,7 @@
 static char *descrip = 
 "  ForkCDR([options]):  Causes the Call Data Record to fork an additional\n"
 	"cdr record starting from the time of the fork call\n"
-"If the option 'v' is passed all cdr variables will be passed along also.\n"
-"";
+"If the option 'v' is passed all cdr variables will be passed along also.\n";
 
 
 static void ast_cdr_fork(struct ast_channel *chan) 

Modified: team/group/new_loader_completion/apps/app_macro.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/apps/app_macro.c?rev=40086&r1=40085&r2=40086&view=diff
==============================================================================
--- team/group/new_loader_completion/apps/app_macro.c (original)
+++ team/group/new_loader_completion/apps/app_macro.c Wed Aug 16 14:42:53 2006
@@ -68,6 +68,13 @@
 "(otherwise <macroname_b> if provided)\n"
 "Arguments and return values as in application macro()\n";
 
+static char *exclusive_descrip =
+"  MacroExclusive(macroname|arg1|arg2...):\n"
+"Executes macro defined in the context 'macro-macroname'\n"
+"Only one call at a time may run the macro.\n"
+"(we'll wait if another call is busy executing in the Macro)\n"
+"Arguments and return values as in application Macro()\n";
+
 static char *exit_descrip =
 "  MacroExit():\n"
 "Causes the currently running macro to exit as if it had\n"
@@ -77,14 +84,16 @@
 
 static char *app = "Macro";
 static char *if_app = "MacroIf";
+static char *exclusive_app = "MacroExclusive";
 static char *exit_app = "MacroExit";
 
 static char *synopsis = "Macro Implementation";
 static char *if_synopsis = "Conditional Macro Implementation";
+static char *exclusive_synopsis = "Exclusive Macro Implementation";
 static char *exit_synopsis = "Exit From Macro";
 
 
-static int macro_exec(struct ast_channel *chan, void *data)
+static int _macro_exec(struct ast_channel *chan, void *data, int exclusive)
 {
 	const char *s;
 
@@ -121,7 +130,7 @@
 	s = pbx_builtin_getvar_helper(chan, "MACRO_DEPTH");
 	if (s)
 		sscanf(s, "%d", &depth);
-	if (depth >= 7) {
+	if (depth >= 20) {
 		ast_log(LOG_ERROR, "Macro():  possible infinite loop detected.  Returning early.\n");
 		ast_module_user_remove(u);
 		return 0;
@@ -137,14 +146,29 @@
 		ast_module_user_remove(u);
 		return 0;
 	}
+
 	snprintf(fullmacro, sizeof(fullmacro), "macro-%s", macro);
 	if (!ast_exists_extension(chan, fullmacro, "s", 1, chan->cid.cid_num)) {
-  		if (!ast_context_find(fullmacro)) 
+		if (!ast_context_find(fullmacro)) 
 			ast_log(LOG_WARNING, "No such context '%s' for macro '%s'\n", fullmacro, macro);
 		else
-	  		ast_log(LOG_WARNING, "Context '%s' for macro '%s' lacks 's' extension, priority 1\n", fullmacro, macro);
+			ast_log(LOG_WARNING, "Context '%s' for macro '%s' lacks 's' extension, priority 1\n", fullmacro, macro);
 		ast_module_user_remove(u);
 		return 0;
+	}
+
+	/* If we are to run the macro exclusively, take the mutex */
+	if (exclusive) {
+		ast_log(LOG_DEBUG, "Locking macrolock for '%s'\n", fullmacro);
+		ast_autoservice_start(chan);
+		if (ast_context_lockmacro(fullmacro)) {
+			ast_log(LOG_WARNING, "Failed to lock macro '%s' as in-use\n", fullmacro);
+			ast_autoservice_stop(chan);
+			ast_module_user_remove(u);
+
+			return 0;
+		}
+		ast_autoservice_stop(chan);
 	}
 	
 	/* Save old info */
@@ -228,9 +252,9 @@
 			break;
 		}
 		/* don't stop executing extensions when we're in "h" */
-		if (chan->_softhangup && strcasecmp(oldexten,"h")) {
-			ast_log(LOG_DEBUG, "Extension %s, priority %d returned normally even though call was hung up\n",
-				chan->exten, chan->priority);
+		if (chan->_softhangup && strcasecmp(chan->macroexten,"h")) {
+			ast_log(LOG_DEBUG, "Extension %s, macroexten %s, priority %d returned normally even though call was hung up\n",
+				chan->exten, chan->macroexten, chan->priority);
 			goto out;
 		}
 		chan->priority++;
@@ -240,7 +264,6 @@
 	snprintf(depthc, sizeof(depthc), "%d", depth);
 	if (!dead) {
 		pbx_builtin_setvar_helper(chan, "MACRO_DEPTH", depthc);
-
 		ast_set2_flag(chan, autoloopflag, AST_FLAG_IN_AUTOLOOP);
 	}
 
@@ -299,8 +322,29 @@
 		pbx_builtin_setvar_helper(chan, "MACRO_OFFSET", save_macro_offset);
 	if (save_macro_offset)
 		free(save_macro_offset);
+
+	/* Unlock the macro */
+	if (exclusive) {
+		ast_log(LOG_DEBUG, "Unlocking macrolock for '%s'\n", fullmacro);
+		if (ast_context_unlockmacro(fullmacro)) {
+			ast_log(LOG_ERROR, "Failed to unlock macro '%s' - that isn't good\n", fullmacro);
+			res = 0;
+		}
+	}
+	
 	ast_module_user_remove(u);
+
 	return res;
+}
+
+static int macro_exec(struct ast_channel *chan, void *data)
+{
+	return _macro_exec(chan, data, 0);
+}
+
+static int macroexclusive_exec(struct ast_channel *chan, void *data)
+{
+	return _macro_exec(chan, data, 1);
 }
 
 static int macroif_exec(struct ast_channel *chan, void *data) 
@@ -347,6 +391,7 @@
 	res = ast_unregister_application(if_app);
 	res |= ast_unregister_application(exit_app);
 	res |= ast_unregister_application(app);
+	res |= ast_unregister_application(exclusive_app);
 
 	ast_module_user_hangup_all();
 
@@ -359,6 +404,7 @@
 
 	res = ast_register_application(exit_app, macro_exit_exec, exit_synopsis, exit_descrip);
 	res |= ast_register_application(if_app, macroif_exec, if_synopsis, if_descrip);
+	res |= ast_register_application(exclusive_app, macroexclusive_exec, exclusive_synopsis, exclusive_descrip);
 	res |= ast_register_application(app, macro_exec, synopsis, descrip);
 
 	return res;

Modified: team/group/new_loader_completion/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/apps/app_voicemail.c?rev=40086&r1=40085&r2=40086&view=diff
==============================================================================
--- team/group/new_loader_completion/apps/app_voicemail.c (original)
+++ team/group/new_loader_completion/apps/app_voicemail.c Wed Aug 16 14:42:53 2006
@@ -31,10 +31,6 @@
 /*** MAKEOPTS
 <category name="MENUSELECT_OPTS_app_voicemail" displayname="Voicemail Build Options" positive_output="yes" remove_on_change="apps/app_voicemail.o">
 	<member name="ODBC_STORAGE" displayname="Storage of Voicemail using ODBC">
-		<depend>unixodbc</depend>
-		<defaultenabled>no</defaultenabled>
-	</member>
-	<member name="EXTENDED_ODBC_STORAGE" displayname="Storage of Voicemail using ODBC (extended)">
 		<depend>unixodbc</depend>
 		<defaultenabled>no</defaultenabled>
 	</member>
@@ -1329,11 +1325,7 @@
 			odbc_release_obj(obj);
 			goto yuck;
 		}
-#ifdef EXTENDED_ODBC_STORAGE
 		snprintf(sql, sizeof(sql), "INSERT INTO %s (dir, msgnum, context, macrocontext, callerid, origtime, duration, recording, mailboxuser, mailboxcontext) SELECT ?,?,context,macrocontext,callerid,origtime,duration,recording,?,? FROM %s WHERE dir=? AND msgnum=?",odbc_table,odbc_table); 
-#else
-		snprintf(sql, sizeof(sql), "INSERT INTO %s (dir, msgnum, context, macrocontext, callerid, origtime, duration, recording) SELECT ?,?,context,macrocontext,callerid,origtime,duration,recording FROM %s WHERE dir=? AND msgnum=?",odbc_table,odbc_table); 
-#endif
 		res = SQLPrepare(stmt, sql, SQL_NTS);
 		if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
 			ast_log(LOG_WARNING, "SQL Prepare failed![%s]\n", sql);
@@ -1343,15 +1335,10 @@
 		}
 		SQLBindParameter(stmt, 1, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, strlen(ddir), 0, (void *)ddir, 0, NULL);
 		SQLBindParameter(stmt, 2, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, strlen(msgnumd), 0, (void *)msgnumd, 0, NULL);
-#ifdef EXTENDED_ODBC_STORAGE
 		SQLBindParameter(stmt, 3, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, strlen(dmailboxuser), 0, (void *)dmailboxuser, 0, NULL);
 		SQLBindParameter(stmt, 4, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, strlen(dmailboxcontext), 0, (void *)dmailboxcontext, 0, NULL);
 		SQLBindParameter(stmt, 5, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, strlen(sdir), 0, (void *)sdir, 0, NULL);
 		SQLBindParameter(stmt, 6, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, strlen(msgnums), 0, (void *)msgnums, 0, NULL);
-#else
-		SQLBindParameter(stmt, 3, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, strlen(sdir), 0, (void *)sdir, 0, NULL);
-		SQLBindParameter(stmt, 4, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, strlen(msgnums), 0, (void *)msgnums, 0, NULL);
-#endif
 		res = odbc_smart_execute(obj, stmt);
 		if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
 			ast_log(LOG_WARNING, "SQL Execute error!\n[%s] (You probably don't have MySQL 4.1 or later installed)\n\n", sql);
@@ -1440,17 +1427,9 @@
 			goto yuck;
 		}
 		if (!ast_strlen_zero(category)) 
-#ifdef EXTENDED_ODBC_STORAGE
 			snprintf(sql, sizeof(sql), "INSERT INTO %s (dir,msgnum,recording,context,macrocontext,callerid,origtime,duration,mailboxuser,mailboxcontext,category) VALUES (?,?,?,?,?,?,?,?,?,?,?)",odbc_table); 
-#else
-			snprintf(sql, sizeof(sql), "INSERT INTO %s (dir,msgnum,recording,context,macrocontext,callerid,origtime,duration,category) VALUES (?,?,?,?,?,?,?,?,?)",odbc_table);
-#endif
 		else
-#ifdef EXTENDED_ODBC_STORAGE
 			snprintf(sql, sizeof(sql), "INSERT INTO %s (dir,msgnum,recording,context,macrocontext,callerid,origtime,duration,mailboxuser,mailboxcontext) VALUES (?,?,?,?,?,?,?,?,?,?)",odbc_table);
-#else
-			snprintf(sql, sizeof(sql), "INSERT INTO %s (dir,msgnum,recording,context,macrocontext,callerid,origtime,duration) VALUES (?,?,?,?,?,?,?,?)",odbc_table);
-#endif
 		res = SQLPrepare(stmt, sql, SQL_NTS);
 		if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
 			ast_log(LOG_WARNING, "SQL Prepare failed![%s]\n", sql);
@@ -1467,15 +1446,10 @@
 		SQLBindParameter(stmt, 6, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, strlen(callerid), 0, (void *)callerid, 0, NULL);
 		SQLBindParameter(stmt, 7, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, strlen(origtime), 0, (void *)origtime, 0, NULL);
 		SQLBindParameter(stmt, 8, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, strlen(duration), 0, (void *)duration, 0, NULL);
-#ifdef EXTENDED_ODBC_STORAGE
 		SQLBindParameter(stmt, 9, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, strlen(mailboxuser), 0, (void *)mailboxuser, 0, NULL);
 		SQLBindParameter(stmt, 10, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, strlen(mailboxcontext), 0, (void *)mailboxcontext, 0, NULL);
 		if (!ast_strlen_zero(category))
 			SQLBindParameter(stmt, 11, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, strlen(category), 0, (void *)category, 0, NULL);
-#else
-		if (!ast_strlen_zero(category))
-			SQLBindParameter(stmt, 9, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, strlen(category), 0, (void *)category, 0, NULL);
-#endif
 		res = odbc_smart_execute(obj, stmt);
 		if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
 			ast_log(LOG_WARNING, "SQL Execute error!\n[%s]\n\n", sql);
@@ -1517,11 +1491,7 @@
 			odbc_release_obj(obj);
 			goto yuck;
 		}
-#ifdef EXTENDED_ODBC_STORAGE
 		snprintf(sql, sizeof(sql), "UPDATE %s SET dir=?, msgnum=?, mailboxuser=?, mailboxcontext=? WHERE dir=? AND msgnum=?",odbc_table);
-#else
-		snprintf(sql, sizeof(sql), "UPDATE %s SET dir=?, msgnum=? WHERE dir=? AND msgnum=?",odbc_table);
-#endif
 		res = SQLPrepare(stmt, sql, SQL_NTS);
 		if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
 			ast_log(LOG_WARNING, "SQL Prepare failed![%s]\n", sql);
@@ -1531,15 +1501,10 @@
 		}
 		SQLBindParameter(stmt, 1, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, strlen(ddir), 0, (void *)ddir, 0, NULL);
 		SQLBindParameter(stmt, 2, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, strlen(msgnumd), 0, (void *)msgnumd, 0, NULL);
-#ifdef EXTENDED_ODBC_STORAGE
 		SQLBindParameter(stmt, 3, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, strlen(mailboxuser), 0, (void *)mailboxuser, 0, NULL);
 		SQLBindParameter(stmt, 4, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, strlen(mailboxcontext), 0, (void *)mailboxcontext, 0, NULL);
 		SQLBindParameter(stmt, 5, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, strlen(sdir), 0, (void *)sdir, 0, NULL);
 		SQLBindParameter(stmt, 6, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, strlen(msgnums), 0, (void *)msgnums, 0, NULL);
-#else
-		SQLBindParameter(stmt, 3, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, strlen(sdir), 0, (void *)sdir, 0, NULL);
-		SQLBindParameter(stmt, 4, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, strlen(msgnums), 0, (void *)msgnums, 0, NULL);
-#endif
 		res = odbc_smart_execute(obj, stmt);
 		if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
 			ast_log(LOG_WARNING, "SQL Execute error!\n[%s]\n\n", sql);
@@ -7406,13 +7371,6 @@
 
 	ast_install_vm_functions(has_voicemail, inboxcount, messagecount);
 
-#if defined(ODBC_STORAGE) && !defined(EXTENDED_ODBC_STORAGE)
-	ast_log(LOG_WARNING, "The current ODBC storage table format will be changed soon."
-				"Please update your tables as per the README and edit the apps/Makefile "
-				"and uncomment the line containing EXTENDED_ODBC_STORAGE to enable the "
-				"new table format.\n");
-#endif
-
 	return res;
 }
 

Modified: team/group/new_loader_completion/build_tools/menuselect-deps.in
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/build_tools/menuselect-deps.in?rev=40086&r1=40085&r2=40086&view=diff
==============================================================================
--- team/group/new_loader_completion/build_tools/menuselect-deps.in (original)
+++ team/group/new_loader_completion/build_tools/menuselect-deps.in Wed Aug 16 14:42:53 2006
@@ -31,3 +31,4 @@
 ZLIB=@PBX_ZLIB@
 ISDNNET=@PBX_ISDNNET@
 MISDN=@PBX_MISDN@
+SUPPSERV=@PBX_SUPPSERV@

Modified: team/group/new_loader_completion/cdr.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/cdr.c?rev=40086&r1=40085&r2=40086&view=diff
==============================================================================
--- team/group/new_loader_completion/cdr.c (original)
+++ team/group/new_loader_completion/cdr.c Wed Aug 16 14:42:53 2006
@@ -267,6 +267,8 @@
 		ast_copy_string(workspace, cdr->userfield, workspacelen);
 	else if ((varbuf = ast_cdr_getvar_internal(cdr, name, recur)))
 		ast_copy_string(workspace, varbuf, workspacelen);
+	else
+		workspace[0] = '\0';
 
 	if (!ast_strlen_zero(workspace))
 		*ret = workspace;

Modified: team/group/new_loader_completion/channel.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/channel.c?rev=40086&r1=40085&r2=40086&view=diff
==============================================================================
--- team/group/new_loader_completion/channel.c (original)
+++ team/group/new_loader_completion/channel.c Wed Aug 16 14:42:53 2006
@@ -3807,12 +3807,18 @@
 };
 
 struct tonepair_state {
-	float freq1;
-	float freq2;
-	float vol;
+	int fac1;
+	int fac2;
+	int v1_1;
+	int v2_1;
+	int v3_1;
+	int v1_2;
+	int v2_2;
+	int v3_2;
+	int origwfmt;
+	int pos;
 	int duration;
-	int pos;
-	int origwfmt;
+	int modulate;
 	struct ast_frame f;
 	unsigned char offset[AST_FRIENDLY_OFFSET];
 	short data[4000];
@@ -3840,10 +3846,16 @@
 		tonepair_release(NULL, ts);
 		ts = NULL;
 	} else {
-		ts->freq1 = td->freq1;
-		ts->freq2 = td->freq2;
+		ts->fac1 = 2.0 * cos(2.0 * M_PI * (td->freq1 / 8000.0)) * 32768.0;
+		ts->v1_1 = 0;
+		ts->v2_1 = sin(-4.0 * M_PI * (td->freq1 / 8000.0)) * td->vol;
+		ts->v3_1 = sin(-2.0 * M_PI * (td->freq1 / 8000.0)) * td->vol;
+		ts->v2_1 = 0;
+		ts->fac2 = 2.0 * cos(2.0 * M_PI * (td->freq2 / 8000.0)) * 32768.0;
+		ts->v2_2 = sin(-4.0 * M_PI * (td->freq2 / 8000.0)) * td->vol;
+		ts->v3_2 = sin(-2.0 * M_PI * (td->freq2 / 8000.0)) * td->vol;
 		ts->duration = td->duration;
-		ts->vol = td->vol;
+		ts->modulate = 0;
 	}
 	/* Let interrupts interrupt :) */
 	ast_set_flag(chan, AST_FLAG_WRITE_INT);
@@ -3865,12 +3877,23 @@
 		return -1;
 	}
 	memset(&ts->f, 0, sizeof(ts->f));
-	for (x = 0; x < (len / 2); x++) {
-		ts->data[x] = ts->vol * (
-				sin((ts->freq1 * 2.0 * M_PI / 8000.0) * (ts->pos + x)) +
-				sin((ts->freq2 * 2.0 * M_PI / 8000.0) * (ts->pos + x))
-			);
-	}
+ 	for (x=0;x<len/2;x++) {
+ 		ts->v1_1 = ts->v2_1;
+ 		ts->v2_1 = ts->v3_1;
+ 		ts->v3_1 = (ts->fac1 * ts->v2_1 >> 15) - ts->v1_1;
+ 		
+ 		ts->v1_2 = ts->v2_2;
+ 		ts->v2_2 = ts->v3_2;
+ 		ts->v3_2 = (ts->fac2 * ts->v2_2 >> 15) - ts->v1_2;
+ 		if (ts->modulate) {
+ 			int p;
+ 			p = ts->v3_2 - 32768;
+ 			if (p < 0) p = -p;
+ 			p = ((p * 9) / 10) + 1;
+ 			ts->data[x] = (ts->v3_1 * p) >> 15;
+ 		} else
+ 			ts->data[x] = ts->v3_1 + ts->v3_2; 
+ 	}
 	ts->f.frametype = AST_FRAME_VOICE;
 	ts->f.subclass = AST_FORMAT_SLINEAR;
 	ts->f.datalen = len;

Modified: team/group/new_loader_completion/channels/Makefile
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/channels/Makefile?rev=40086&r1=40085&r2=40086&view=diff
==============================================================================
--- team/group/new_loader_completion/channels/Makefile (original)
+++ team/group/new_loader_completion/channels/Makefile Wed Aug 16 14:42:53 2006
@@ -41,11 +41,6 @@
 
 ifeq ($(wildcard h323/libchanh323.a),)
   CC_MODS:=$(filter-out chan_h323,$(CC_MODS))
-endif
-
-ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/lib/libbnec.so),)
-  EC_CFLAGS=-DWITH_BEROEC
-  EC_LIBS=-lbnec
 endif
 
 ifndef OPENH323DIR
@@ -101,9 +96,8 @@
 misdn/chan_misdn_lib.a:
 	make -C misdn
 
-chan_misdn.o: CFLAGS+=-Imisdn -DCHAN_MISDN_VERSION=\"0.3.0\" $(EC_CFLAGS)
+chan_misdn.o: CFLAGS+=-Imisdn -DCHAN_MISDN_VERSION=\"0.3.0\" 
 
-misdn_config.o: CFLAGS+=-Imisdn -DCHAN_MISDN_VERSION=\"0.3.0\" $(EC_CFLAGS)
+misdn_config.o: CFLAGS+=-Imisdn -DCHAN_MISDN_VERSION=\"0.3.0\" 
 
 $(chan_misdn): chan_misdn.o misdn_config.o misdn/chan_misdn_lib.a
-$(chan_misdn): $(EC_LIBS)

Modified: team/group/new_loader_completion/channels/chan_alsa.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/channels/chan_alsa.c?rev=40086&r1=40085&r2=40086&view=diff
==============================================================================
--- team/group/new_loader_completion/channels/chan_alsa.c (original)
+++ team/group/new_loader_completion/channels/chan_alsa.c Wed Aug 16 14:42:53 2006
@@ -828,6 +828,7 @@
 		usecnt++;
 		ast_mutex_unlock(&usecnt_lock);
 		ast_update_use_count();
+		ast_jb_configure(tmp, &global_jbconf);
 		if (state != AST_STATE_DOWN) {
 			if (ast_pbx_start(tmp)) {
 				ast_log(LOG_WARNING, "Unable to start PBX on %s\n", tmp->name);
@@ -835,8 +836,6 @@
 				tmp = NULL;
 			}
 		}
-		if (tmp)
-			ast_jb_configure(tmp, &global_jbconf);
 	}
 	return tmp;
 }

Modified: team/group/new_loader_completion/channels/chan_h323.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/channels/chan_h323.c?rev=40086&r1=40085&r2=40086&view=diff
==============================================================================
--- team/group/new_loader_completion/channels/chan_h323.c (original)
+++ team/group/new_loader_completion/channels/chan_h323.c Wed Aug 16 14:42:53 2006
@@ -176,6 +176,7 @@
 	int hangupcause;					/* Hangup cause from OpenH323 layer */
 	int newstate;						/* Pending state change */
 	int newcontrol;						/* Pending control to send */
+	int newdigit;						/* Pending DTMF digit to send */
 	struct oh323_pvt *next;				/* Next channel in list */
 } *iflist = NULL;
 
@@ -265,7 +266,7 @@
 		c->hangupcause = pvt->hangupcause;
 		ast_queue_hangup(c);
 		pvt->needhangup = 0;
-		pvt->newstate = pvt->newcontrol = -1;
+		pvt->newstate = pvt->newcontrol = pvt->newdigit = -1;
 	}
 	if (pvt->newstate >= 0) {
 		ast_setstate(c, pvt->newstate);
@@ -274,6 +275,17 @@
 	if (pvt->newcontrol >= 0) {
 		ast_queue_control(c, pvt->newcontrol);
 		pvt->newcontrol = -1;
+	}
+	if (pvt->newdigit >= 0) {
+		struct ast_frame f = {
+			.frametype = AST_FRAME_DTMF,
+			.subclass = pvt->newdigit,
+			.samples = 800,
+			.src = "UPDATE_INFO",
+		};
+
+		ast_queue_frame(c, &f);
+		pvt->newdigit = -1;
 	}
 }
 
@@ -389,18 +401,19 @@
 			ast_log(LOG_DEBUG, "Sending out-of-band digit %c on %s\n", digit, c->name);
 		}
 		ast_rtp_senddigit(pvt->rtp, digit);
+		ast_mutex_unlock(&pvt->lock);
 	} else {
 		/* in-band DTMF */
 		if (h323debug) {
 			ast_log(LOG_DEBUG, "Sending inband digit %c on %s\n", digit, c->name);
 		}
 		token = pvt->cd.call_token ? strdup(pvt->cd.call_token) : NULL;
+		ast_mutex_unlock(&pvt->lock);
 		h323_send_tone(token, digit);
 		if (token) {
 			free(token);
 		}
 	}
-	ast_mutex_unlock(&pvt->lock);
 	oh323_update_info(c);
 	return 0;
 }
@@ -812,6 +825,8 @@
 			ch->cid.cid_dnid = strdup(pvt->exten);
 		}
 		ast_setstate(ch, state);
+		if (pvt->rtp)
+			ast_jb_configure(ch, &global_jbconf);
 		if (state != AST_STATE_DOWN) {
 			if (ast_pbx_start(ch)) {
 				ast_log(LOG_WARNING, "Unable to start PBX on %s\n", ch->name);
@@ -819,10 +834,6 @@
 				ch = NULL;
 			}
 		}
-
-		/* Configure the new channel jb */
-		if (ch && pvt && pvt->rtp)
-			ast_jb_configure(ch, &global_jbconf);
 	} else  {
 		ast_log(LOG_WARNING, "Unable to allocate channel structure\n");
 	}
@@ -864,7 +875,7 @@
 		pvt->nonCodecCapability &= ~AST_RTP_DTMF;
 	}
 	strncpy(pvt->context, default_context, sizeof(pvt->context) - 1);
-	pvt->newstate = pvt->newcontrol = -1;
+	pvt->newstate = pvt->newcontrol = pvt->newdigit = -1;
 	/* Add to interface list */
 	ast_mutex_lock(&iflock);
 	pvt->next = iflist;
@@ -1138,7 +1149,6 @@
 int send_digit(unsigned call_reference, char digit, const char *token)
 {
 	struct oh323_pvt *pvt;
-	struct ast_frame f;
 	int res;
 
 	ast_log(LOG_DEBUG, "Received Digit: %c\n", digit);
@@ -1147,16 +1157,20 @@
 		ast_log(LOG_ERROR, "Private structure not found in send_digit.\n");
 		return -1;
 	}
-	memset(&f, 0, sizeof(f));
-	f.frametype = AST_FRAME_DTMF;
-	f.subclass = digit;
-	f.datalen = 0;
-	f.samples = 800;
-	f.offset = 0;
-	f.data = NULL;
-	f.mallocd = 0;
-	f.src = "SEND_DIGIT";	
-	res = ast_queue_frame(pvt->owner, &f);
+	if (pvt->owner && !ast_mutex_trylock(&pvt->owner->lock)) {
+		struct ast_frame f = {
+			.frametype = AST_FRAME_DTMF,
+			.subclass = digit,
+			.samples = 800,
+			.src = "SEND_DIGIT",
+		};
+
+		res = ast_queue_frame(pvt->owner, &f);
+		ast_mutex_unlock(&pvt->owner->lock);
+	} else {
+		pvt->newdigit = digit;
+		res = 0;
+	}
 	ast_mutex_unlock(&pvt->lock);
 	return res;
 }

Modified: team/group/new_loader_completion/channels/chan_jingle.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/channels/chan_jingle.c?rev=40086&r1=40085&r2=40086&view=diff
==============================================================================
--- team/group/new_loader_completion/channels/chan_jingle.c (original)
+++ team/group/new_loader_completion/channels/chan_jingle.c Wed Aug 16 14:42:53 2006
@@ -812,16 +812,14 @@
 		tmp->cid.cid_dnid = ast_strdup(i->exten);
 	tmp->priority = 1;
 	ast_setstate(tmp, state);
+	if (i->rtp)
+		ast_jb_configure(tmp, &global_jbconf);
 	if (state != AST_STATE_DOWN && ast_pbx_start(tmp)) {
 		ast_log(LOG_WARNING, "Unable to start PBX on %s\n", tmp->name);
 		tmp->hangupcause = AST_CAUSE_SWITCH_CONGESTION;
 		ast_hangup(tmp);
 		tmp = NULL;
 	}
-
-	/* Configure the new channel jb */
-	if (tmp && i && i->rtp)
-		ast_jb_configure(tmp, &global_jbconf);
 
 	return tmp;
 }

Modified: team/group/new_loader_completion/channels/chan_mgcp.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/channels/chan_mgcp.c?rev=40086&r1=40085&r2=40086&view=diff
==============================================================================
--- team/group/new_loader_completion/channels/chan_mgcp.c (original)
+++ team/group/new_loader_completion/channels/chan_mgcp.c Wed Aug 16 14:42:53 2006
@@ -1421,6 +1421,8 @@
 		if (!i->adsi)
 			tmp->adsicpe = AST_ADSI_UNAVAILABLE;
 		tmp->priority = 1;
+		if (sub->rtp)
+			ast_jb_configure(tmp, &global_jbconf);
 		if (state != AST_STATE_DOWN) {
 			if (ast_pbx_start(tmp)) {
 				ast_log(LOG_WARNING, "Unable to start PBX on %s\n", tmp->name);
@@ -1433,10 +1435,6 @@
 			ast_verbose(VERBOSE_PREFIX_3 "MGCP mgcp_new(%s) created in state: %s\n",
 				tmp->name, ast_state2str(state));
 		}
-
-		/* Configure the new channel jb */
-		if (tmp && sub && sub->rtp)
-			ast_jb_configure(tmp, &global_jbconf);
 	} else {
 		ast_log(LOG_WARNING, "Unable to allocate channel structure\n");
 	}
@@ -2458,12 +2456,14 @@
 						if (strncasecmp(v, p->sub->cxident, len) &&
 						    strncasecmp(v, p->sub->next->cxident, len)) {
 							/* connection id not found. delete it */
-							char cxident[80];
-							memcpy(cxident, v, len);
-							cxident[len] = '\0';
+							char cxident[80] = "";
+
+							if (len > (sizeof(cxident) - 1))
+								len = sizeof(cxident) - 1;
+							ast_copy_string(cxident, v, len);
 							if (option_verbose > 2) {
 								ast_verbose(VERBOSE_PREFIX_3 "Non existing connection id %s on %s@%s \n", 
-									cxident, p->name, gw->name);
+									    cxident, p->name, gw->name);
 							}
 							transmit_connection_del_w_params(p, NULL, cxident);
 						}

Modified: team/group/new_loader_completion/channels/chan_misdn.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/channels/chan_misdn.c?rev=40086&r1=40085&r2=40086&view=diff
==============================================================================
--- team/group/new_loader_completion/channels/chan_misdn.c (original)
+++ team/group/new_loader_completion/channels/chan_misdn.c Wed Aug 16 14:42:53 2006
@@ -29,6 +29,7 @@
 /*** MODULEINFO
 	<depend>isdnnet</depend>
 	<depend>misdn</depend>
+	<depend>suppserv</depend>
  ***/
 #include "asterisk.h"
 
@@ -416,20 +417,41 @@
 }
 
 
-static void print_facility( struct misdn_bchannel *bc)
-{
-	switch (bc->fac_type) {
-	case FACILITY_CALLDEFLECT:
-		chan_misdn_log(0,bc->port," --> calldeflect: %s\n",
-			       bc->fac.calldeflect_nr);
+static void print_facility(struct FacParm *fac, struct misdn_bchannel *bc)
+{
+	switch (fac->Function) {
+	case Fac_CD:
+		chan_misdn_log(0,bc->port," --> calldeflect to: %s, screened: %s\n", fac->u.CDeflection.DeflectedToNumber,
+					   fac->u.CDeflection.PresentationAllowed ? "yes" : "no");
 		break;
-	case FACILITY_CENTREX:
-		chan_misdn_log(0,bc->port," --> centrex: %s\n",
-			       bc->fac.cnip);
+	case Fac_AOCDCurrency:
+		if (fac->u.AOCDcur.chargeNotAvailable)
+			chan_misdn_log(0,bc->port," --> AOCD currency: charge not available\n");
+		else if (fac->u.AOCDcur.freeOfCharge)
+			chan_misdn_log(0,bc->port," --> AOCD currency: free of charge\n");
+		else if (fac->u.AOCDchu.billingId >= 0)
+			chan_misdn_log(0,bc->port," --> AOCD currency: currency:%s amount:%d multiplier:%d typeOfChargingInfo:%d billingId:%d\n",
+						   fac->u.AOCDcur.currency, fac->u.AOCDcur.currencyAmount, fac->u.AOCDcur.multiplier,
+						   (fac->u.AOCDcur.typeOfChargingInfo == 0) ? "subTotal" : "total", fac->u.AOCDcur.billingId);
+		else
+			chan_misdn_log(0,bc->port," --> AOCD currency: currency:%s amount:%d multiplier:%d typeOfChargingInfo:%d\n",
+						   fac->u.AOCDcur.currency, fac->u.AOCDcur.currencyAmount, fac->u.AOCDcur.multiplier,
+						   (fac->u.AOCDcur.typeOfChargingInfo == 0) ? "subTotal" : "total");
+		break;
+	case Fac_AOCDChargingUnit:
+		if (fac->u.AOCDchu.chargeNotAvailable)
+			chan_misdn_log(0,bc->port," --> AOCD charging unit: charge not available\n");
+		else if (fac->u.AOCDchu.freeOfCharge)
+			chan_misdn_log(0,bc->port," --> AOCD charging unit: free of charge\n");
+		else if (fac->u.AOCDchu.billingId >= 0)
+			chan_misdn_log(0,bc->port," --> AOCD charging unit: recordedUnits:%d typeOfChargingInfo:%s billingId:%d\n",
+						   fac->u.AOCDchu.recordedUnits, (fac->u.AOCDchu.typeOfChargingInfo == 0) ? "subTotal" : "total", fac->u.AOCDchu.billingId);
+		else
+			chan_misdn_log(0,bc->port," --> AOCD charging unit: recordedUnits:%d typeOfChargingInfo:%s\n",
+						   fac->u.AOCDchu.recordedUnits, (fac->u.AOCDchu.typeOfChargingInfo == 0) ? "subTotal" : "total");
 		break;
 	default:
 		chan_misdn_log(0,bc->port," --> unknown\n");
-		
 	}
 }
 
@@ -965,13 +987,6 @@
 			"  --> state: %s\n"
 			"  --> capability: %s\n"
 			"  --> echo_cancel: %d\n"
-#ifdef WITH_BEROEC
-			"  --> bnec_tail: %d\n"
-			"  --> bnec_nlp: %d\n"
-			"  --> bnec_ah: %d\n"
-			"  --> bnec_td: %d\n"
-			"  --> bnec_zerocoeff: %d\n"
-#endif
 			"  --> notone : rx %d tx:%d\n"
 			"  --> bc_hold: %d holded_bc :%d\n",
 			help->ast->name,
@@ -986,13 +1001,6 @@
 			bearer2str(bc->capability),
 			bc->ec_enable,
 
-#ifdef WITH_BEROEC
-			bc->bnec_tail,
-			bc->bnec_nlp,
-			bc->bnec_ah,
-			bc->bnec_td,
-			bc->bnec_zero,
-#endif
 			help->norxtone,help->notxtone,
 			bc->holded, help->holded_bc?1:0
 			);
@@ -1122,18 +1130,23 @@
   
 	channame = argv[3];
 	nr = argv[4];
-	
+
 	ast_cli(fd, "Sending Calldeflection (%s) to %s\n",nr, channame);
 	
 	{
 		struct chan_list *tmp=get_chan_by_ast_name(channame);
 		
 		if (!tmp) {
-			ast_cli(fd, "Sending CD with nr %s to %s failed Channel does not exist\n",nr, channame);
+			ast_cli(fd, "Sending CD with nr %s to %s failed: Channel does not exist.\n",nr, channame);
 			return 0; 
 		} else {
-			
-			misdn_lib_send_facility(tmp->bc, FACILITY_CALLDEFLECT, nr);
+			if (strlen(nr) >= 15) {
+				ast_cli(fd, "Sending CD with nr %s to %s failed: Number too long (up to 15 digits are allowed).\n",nr, channame);
+				return 0; 
+			}
+			tmp->bc->fac_out.Function = Fac_CD;
+			strncpy((char *)tmp->bc->fac_out.u.CDeflection.DeflectedToNumber, nr, sizeof(tmp->bc->fac_out.u.CDeflection.DeflectedToNumber));
+			misdn_lib_send_event(tmp->bc, EVENT_FACILITY);
 		}
 	}
   
@@ -1332,155 +1345,51 @@
 	return NULL;
 }
 
-static struct ast_cli_entry cli_send_cd =
-{ {"misdn","send","calldeflect", NULL},
-  misdn_send_cd,
-  "Sends CallDeflection to mISDN Channel", 
-  "Usage: misdn send calldeflect <channel> \"<nr>\" \n",
-  complete_ch
+static struct ast_cli_entry chan_misdn_clis[] = {
+	{ {"misdn","send","calldeflect", NULL}, misdn_send_cd, "Sends CallDeflection to mISDN Channel",
+		"Usage: misdn send calldeflect <channel> \"<nr>\" \n", complete_ch },
+	{ {"misdn","send","digit", NULL}, misdn_send_digit,	"Sends DTMF Digit to mISDN Channel",
+		"Usage: misdn send digit <channel> \"<msg>\" \n"
+		"       Send <digit> to <channel> as DTMF Tone\n"
+		"       when channel is a mISDN channel\n", complete_ch },
+	{ {"misdn","toggle","echocancel", NULL}, misdn_toggle_echocancel, "Toggles EchoCancel on mISDN Channel",
+		"Usage: misdn toggle echocancel <channel>\n", complete_ch },
+	{ {"misdn","send","display", NULL}, misdn_send_display, "Sends Text to mISDN Channel", 
+		"Usage: misdn send display <channel> \"<msg>\" \n"
+		"       Send <msg> to <channel> as Display Message\n"
+		"       when channel is a mISDN channel\n", complete_ch },
+	{ {"misdn","show","config", NULL}, misdn_show_config, "Shows internal mISDN config, read from cfg-file",
+		"Usage: misdn show config [<port> | description <config element> | descriptions [general|ports]]\n"
+		"       Use 0 for <port> to only print the general config.\n", complete_show_config },
+	{ {"misdn","reload", NULL}, misdn_reload, "Reloads internal mISDN config, read from cfg-file",
+		"Usage: misdn reload\n" },
+	{ {"misdn","set","tics", NULL}, misdn_set_tics, "", 
+		"\n" },
+	{ {"misdn","show","channels", NULL}, misdn_show_cls, "Shows internal mISDN chan_list",
+		"Usage: misdn show channels\n" },
+	{ {"misdn","show","channel", NULL}, misdn_show_cl, "Shows internal mISDN chan_list",
+		"Usage: misdn show channels\n", complete_ch },
+	{ {"misdn","port","block", NULL}, misdn_port_block, "Blocks the given port",
+		"Usage: misdn port block\n" },
+	{ {"misdn","port","unblock", NULL}, misdn_port_unblock, "Unblocks the given port",
+		"Usage: misdn port unblock\n" },
+	{ {"misdn","restart","port", NULL}, misdn_restart_port, "Restarts the given port",
+		"Usage: misdn restart port\n" },
+	{ {"misdn","port","up", NULL}, misdn_port_up, "Tries to establish L1 on the given port",
+		"Usage: misdn port up <port>\n" },
+	{ {"misdn","port","down", NULL}, misdn_port_down, "Tries to deacivate the L1 on the given port",
+		"Usage: misdn port down <port>\n" },
+	{ {"misdn","show","stacks", NULL}, misdn_show_stacks, "Shows internal mISDN stack_list",
+		"Usage: misdn show stacks\n" },
+	{ {"misdn","show","ports","stats", NULL}, misdn_show_ports_stats, "Shows chan_misdns call statistics per port",
+		"Usage: misdn show port stats\n" },
+	{ {"misdn","show","port", NULL}, misdn_show_port, "Shows detailed information for given port",
+		"Usage: misdn show port <port>\n" },
+	{ {"misdn","set","debug", NULL}, misdn_set_debug, "Sets Debuglevel of chan_misdn",
+		"Usage: misdn set debug <level> [only] | [port <port> [only]]\n", complete_debug_port },
+	{ {"misdn","set","crypt","debug", NULL}, misdn_set_crypt_debug, "Sets CryptDebuglevel of chan_misdn, at the moment, level={1,2}",
+		"Usage: misdn set crypt debug <level>\n" }
 };
-
-static struct ast_cli_entry cli_send_digit =
-{ {"misdn","send","digit", NULL},
-  misdn_send_digit,
-  "Sends DTMF Digit to mISDN Channel", 
-  "Usage: misdn send digit <channel> \"<msg>\" \n"
-  "       Send <digit> to <channel> as DTMF Tone\n"
-  "       when channel is a mISDN channel\n",
-  complete_ch
-};
-
-static struct ast_cli_entry cli_toggle_echocancel =
-{ {"misdn","toggle","echocancel", NULL},
-  misdn_toggle_echocancel,
-  "Toggles EchoCancel on mISDN Channel", 
-  "Usage: misdn toggle echocancel <channel>\n", 
-  complete_ch
-};
-
-static struct ast_cli_entry cli_send_display =
-{ {"misdn","send","display", NULL},
-  misdn_send_display,
-  "Sends Text to mISDN Channel", 
-  "Usage: misdn send display <channel> \"<msg>\" \n"
-  "       Send <msg> to <channel> as Display Message\n"
-  "       when channel is a mISDN channel\n",
-  complete_ch
-};
-
-static struct ast_cli_entry cli_show_config =
-{ {"misdn","show","config", NULL},
-  misdn_show_config,
-  "Shows internal mISDN config, read from cfg-file", 
-  "Usage: misdn show config [<port> | description <config element> | descriptions [general|ports]]\n"
-  "       Use 0 for <port> to only print the general config.\n",
-  complete_show_config
-};
- 
-static struct ast_cli_entry cli_reload =
-{ {"misdn","reload", NULL},
-  misdn_reload,
-  "Reloads internal mISDN config, read from cfg-file", 
-  "Usage: misdn reload\n"
-};
-
-static struct ast_cli_entry cli_set_tics =
-{ {"misdn","set","tics", NULL},
-  misdn_set_tics,
-  "", 
-  "\n"
-};
-
-static struct ast_cli_entry cli_show_cls =
-{ {"misdn","show","channels", NULL},
-  misdn_show_cls,
-  "Shows internal mISDN chan_list", 
-  "Usage: misdn show channels\n"
-};
-
-static struct ast_cli_entry cli_show_cl =
-{ {"misdn","show","channel", NULL},
-  misdn_show_cl,
-  "Shows internal mISDN chan_list", 
-  "Usage: misdn show channels\n",
-  complete_ch
-};
-
-static struct ast_cli_entry cli_port_block=

[... 1878 lines stripped ...]


More information about the asterisk-commits mailing list