[asterisk-commits] branch oej/subscribemwi r14414 - in /team/oej/subscribemwi: ./ agi/ apps/ bui...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Thu Mar 23 10:47:35 MST 2006


Author: oej
Date: Thu Mar 23 11:46:54 2006
New Revision: 14414

URL: http://svn.digium.com/view/asterisk?rev=14414&view=rev
Log:
Reset automerge, resolve conflicts

Added:
    team/oej/subscribemwi/agi/jukebox.agi
      - copied unchanged from r12610, trunk/agi/jukebox.agi
    team/oej/subscribemwi/contrib/scripts/meetme.sql
      - copied unchanged from r12610, trunk/contrib/scripts/meetme.sql
Modified:
    team/oej/subscribemwi/   (props changed)
    team/oej/subscribemwi/CREDITS
    team/oej/subscribemwi/Makefile
    team/oej/subscribemwi/README
    team/oej/subscribemwi/UPGRADE.txt
    team/oej/subscribemwi/agi/Makefile
    team/oej/subscribemwi/apps/app_externalivr.c
    team/oej/subscribemwi/apps/app_meetme.c
    team/oej/subscribemwi/apps/app_mixmonitor.c
    team/oej/subscribemwi/apps/app_queue.c
    team/oej/subscribemwi/apps/app_voicemail.c
    team/oej/subscribemwi/ast_expr2.fl
    team/oej/subscribemwi/ast_expr2f.c
    team/oej/subscribemwi/asterisk.c
    team/oej/subscribemwi/asterisk.sgml
    team/oej/subscribemwi/build_tools/make_build_h
    team/oej/subscribemwi/build_tools/make_svn_branch_name
    team/oej/subscribemwi/cdr.c
    team/oej/subscribemwi/cdr/cdr_csv.c
    team/oej/subscribemwi/cdr/cdr_manager.c
    team/oej/subscribemwi/cdr/cdr_odbc.c
    team/oej/subscribemwi/cdr/cdr_pgsql.c
    team/oej/subscribemwi/cdr/cdr_tds.c
    team/oej/subscribemwi/channel.c
    team/oej/subscribemwi/channels/chan_iax2.c
    team/oej/subscribemwi/channels/chan_misdn.c
    team/oej/subscribemwi/channels/chan_phone.c
    team/oej/subscribemwi/channels/chan_sip.c
    team/oej/subscribemwi/channels/chan_zap.c
    team/oej/subscribemwi/channels/misdn/chan_misdn_config.h
    team/oej/subscribemwi/channels/misdn/isdn_lib.c
    team/oej/subscribemwi/channels/misdn/isdn_lib.h
    team/oej/subscribemwi/channels/misdn/isdn_msg_parser.c
    team/oej/subscribemwi/channels/misdn_config.c
    team/oej/subscribemwi/codecs/gsm/Makefile
    team/oej/subscribemwi/config.c
    team/oej/subscribemwi/configs/cdr.conf.sample
    team/oej/subscribemwi/configs/cdr_tds.conf.sample
    team/oej/subscribemwi/configs/misdn.conf.sample
    team/oej/subscribemwi/configs/sip.conf.sample
    team/oej/subscribemwi/configs/zapata.conf.sample
    team/oej/subscribemwi/doc/asterisk-mib.txt
    team/oej/subscribemwi/doc/billing.txt
    team/oej/subscribemwi/doc/enum.txt
    team/oej/subscribemwi/doc/extconfig.txt
    team/oej/subscribemwi/doc/misdn.txt
    team/oej/subscribemwi/doc/realtime.txt
    team/oej/subscribemwi/editline/np/vis.c
    team/oej/subscribemwi/editline/readline.c
    team/oej/subscribemwi/funcs/Makefile
    team/oej/subscribemwi/funcs/func_enum.c
    team/oej/subscribemwi/include/asterisk/cdr.h
    team/oej/subscribemwi/include/asterisk/config.h
    team/oej/subscribemwi/include/asterisk/doxyref.h
    team/oej/subscribemwi/include/asterisk/sched.h
    team/oej/subscribemwi/pbx.c
    team/oej/subscribemwi/res/Makefile
    team/oej/subscribemwi/res/res_config_odbc.c
    team/oej/subscribemwi/res/res_features.c
    team/oej/subscribemwi/res/res_monitor.c
    team/oej/subscribemwi/sched.c
    team/oej/subscribemwi/utils.c

Propchange: team/oej/subscribemwi/
------------------------------------------------------------------------------
    automerge = http://edvina.net/training/

Propchange: team/oej/subscribemwi/
------------------------------------------------------------------------------
Binary property 'branch-1.2-blocked' - no diff available.

Propchange: team/oej/subscribemwi/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.

Propchange: team/oej/subscribemwi/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu Mar 23 11:46:54 2006
@@ -1,1 +1,1 @@
-/trunk:1-11450
+/trunk:1-12645

Modified: team/oej/subscribemwi/CREDITS
URL: http://svn.digium.com/view/asterisk/team/oej/subscribemwi/CREDITS?rev=14414&r1=14413&r2=14414&view=diff
==============================================================================
--- team/oej/subscribemwi/CREDITS (original)
+++ team/oej/subscribemwi/CREDITS Thu Mar 23 11:46:54 2006
@@ -59,8 +59,8 @@
 Jayson Vantuyl - Manager protocol changes, various other bugs.
 	jvantuyl at computingedge.net
 Thorsten Lockert - OpenBSD, FreeBSD ports, making MacOS X port run on 10.3,
-	dialplan include verification, route lookup on OpenBSD, various other
-	bugs. tholo at sigmasoft.com
+	dialplan include verification, route lookup on OpenBSD, SNMP agent
+	support (res_snmp), various other bugs. tholo at sigmasoft.com
 Brian West - ODBC support and Bug Marshaling  
 Josh Roberson - chan_zap reload support, Advanced Voicemail Features, other misc. patches,
 	and Bug Marshalling. - josh at asteriasgi.com, http://www.asteriasgi.com
@@ -83,6 +83,8 @@
 Michael Jerris - bug marshaling
 Leif Madsen, Jared Smith and Jim van Meggelen - the Asterisk book
 	available under a Creative Commons License at http://www.asteriskdocs.org
+Brian M. Clapper - poll.c emulation
+	This product includes software developed by Brian M. Clapper <bmc at clapper.org>
 
 === HOLD MUSIC ===
 Music provided by www.freeplaymusic.com

Modified: team/oej/subscribemwi/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/subscribemwi/Makefile?rev=14414&r1=14413&r2=14414&view=diff
==============================================================================
--- team/oej/subscribemwi/Makefile (original)
+++ team/oej/subscribemwi/Makefile Thu Mar 23 11:46:54 2006
@@ -225,10 +225,12 @@
 endif
 
 GREP=grep
+ID=id
 
 ifeq ($(OSARCH),SunOS)
   GREP=/usr/xpg4/bin/grep
   M4=/usr/local/bin/m4
+  ID=/usr/xpg4/bin/id
 endif
 
 INCLUDE+=-Iinclude -I../include
@@ -554,7 +556,7 @@
 	$(MAKE) -C stdtime clean
 
 datafiles: all
-	if [ x`whoami` = xroot ]; then sh build_tools/mkpkgconfig $(DESTDIR)/usr/lib/pkgconfig; fi
+	if [ x`$(ID) -un` = xroot ]; then sh build_tools/mkpkgconfig $(DESTDIR)/usr/lib/pkgconfig; fi
 	mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/sounds/digits
 	mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/sounds/priv-callerintros
 	for x in sounds/digits/*.gsm; do \

Modified: team/oej/subscribemwi/README
URL: http://svn.digium.com/view/asterisk/team/oej/subscribemwi/README?rev=14414&r1=14413&r2=14414&view=diff
==============================================================================
--- team/oej/subscribemwi/README (original)
+++ team/oej/subscribemwi/README Thu Mar 23 11:46:54 2006
@@ -51,13 +51,15 @@
 	* All Wildcard (tm) products from Digium (www.digium.com)
 	* QuickNet Internet PhoneJack and LineJack (http://www.quicknet.net)
 	* any full duplex sound card supported by ALSA or OSS
+	* any ISDN card supported by mISDN on Linux (BRI)
+	* The Xorcom AstriBank channel bank
         * VoiceTronix OpenLine products
 
 The are several drivers for ISDN BRI cards available from third party sources.
-Check the voip-info.org wiki for more information on chan_capi, chan_misdn and 
+Check the voip-info.org wiki for more information on chan_capi and 
 zaphfc.
 
-* UPGRADING FROM VERSION 1.0
+* UPGRADING FROM AN EARLIER VERSION
 
   If you are updating from a previous version of Asterisk, make sure you
 read the UPGRADE.txt file in the source directory. There are some files
@@ -67,7 +69,7 @@
   In order to discover new features to use, please check the configuration
 examples in the /configs directory of the source code distribution. 
 To discover the major new features of Asterisk 1.2, please visit 
-http://www.astricon.net/asterisk1-2/
+http://edvina.net/asterisk1-2/
 
 * NEW INSTALLATIONS
 

Modified: team/oej/subscribemwi/UPGRADE.txt
URL: http://svn.digium.com/view/asterisk/team/oej/subscribemwi/UPGRADE.txt?rev=14414&r1=14413&r2=14414&view=diff
==============================================================================
--- team/oej/subscribemwi/UPGRADE.txt (original)
+++ team/oej/subscribemwi/UPGRADE.txt Thu Mar 23 11:46:54 2006
@@ -37,6 +37,9 @@
   functions.  You are encouraged to move towards the associated dialplan
   function, as these variables will be removed in a future release.
 
+* The CDR-CSV variables uniqueid, userfield, and basing time on GMT are now 
+  adjustable from cdr.conf, instead of recompiling.
+
 Functions:
 
 * The function ${CHECK_MD5()} has been deprecated in favor of using an
@@ -56,7 +59,7 @@
 
 Installation:
 
-* On BSD systems, the installation directories have changed to more "FreeBSDish" directories. On startup, Asterisk will look for the main configuration in /usr7local/etc/asterisk/asterisk.conf
+* On BSD systems, the installation directories have changed to more "FreeBSDish" directories. On startup, Asterisk will look for the main configuration in /usr/local/etc/asterisk/asterisk.conf
 If you have an old installation, you might want to remove the binaries and move the configuration files to the new locations. The following directories are now default:
 	ASTLIBDIR	/usr/local/lib/asterisk
 	ASTVARLIBDIR	/usr/local/share/asterisk

Modified: team/oej/subscribemwi/agi/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/subscribemwi/agi/Makefile?rev=14414&r1=14413&r2=14414&view=diff
==============================================================================
--- team/oej/subscribemwi/agi/Makefile (original)
+++ team/oej/subscribemwi/agi/Makefile Thu Mar 23 11:46:54 2006
@@ -11,7 +11,7 @@
 # the GNU General Public License
 #
 
-AGIS=agi-test.agi eagi-test eagi-sphinx-test
+AGIS=agi-test.agi eagi-test eagi-sphinx-test jukebox.agi
 
 CFLAGS+=
 

Modified: team/oej/subscribemwi/apps/app_externalivr.c
URL: http://svn.digium.com/view/asterisk/team/oej/subscribemwi/apps/app_externalivr.c?rev=14414&r1=14413&r2=14414&view=diff
==============================================================================
--- team/oej/subscribemwi/apps/app_externalivr.c (original)
+++ team/oej/subscribemwi/apps/app_externalivr.c Thu Mar 23 11:46:54 2006
@@ -65,7 +65,7 @@
 "will receive all DTMF events received on the channel, and notification\n"
 "if the channel is hung up. The application will not be forcibly terminated\n"
 "when the channel is hung up.\n"
-"See doc/README.externalivr for a protocol specification.\n";
+"See doc/externalivr.txt for a protocol specification.\n";
 
 /* XXX the parser in gcc 2.95 gets confused if you don't put a space between 'name' and the comma */
 #define ast_chan_log(level, channel, format, ...) ast_log(level, "%s: " format, channel->name , ## __VA_ARGS__)

Modified: team/oej/subscribemwi/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/team/oej/subscribemwi/apps/app_meetme.c?rev=14414&r1=14413&r2=14414&view=diff
==============================================================================
--- team/oej/subscribemwi/apps/app_meetme.c (original)
+++ team/oej/subscribemwi/apps/app_meetme.c Thu Mar 23 11:46:54 2006
@@ -1,3 +1,4 @@
+
 /*
  * Asterisk -- An open source telephony toolkit.
  *
@@ -147,9 +148,9 @@
 	struct ast_conf_user *firstuser;	/* Pointer to the first user struct */
 	struct ast_conf_user *lastuser;		/* Pointer to the last user struct */
 	time_t start;				/* Start time (s) */
-	int recording;				/* recording status */
-	int isdynamic;				/* Created on the fly? */
-	int locked;				/* Is the conference locked? */
+	unsigned int recording:2;				/* recording status */
+	unsigned int isdynamic:1;				/* Created on the fly? */
+	unsigned int locked:1;				/* Is the conference locked? */
 	pthread_t recordthread;			/* thread for recording */
 	pthread_attr_t attr;			/* thread attribute */
 	const char *recordingfilename;		/* Filename to record the Conference into */
@@ -518,7 +519,7 @@
 			/* Fill the conference struct */
 			cnf->start = time(NULL);
 			cnf->zapconf = ztc.confno;
-			cnf->isdynamic = dynamic;
+			cnf->isdynamic = dynamic ? 1 : 0;
 			cnf->firstuser = NULL;
 			cnf->lastuser = NULL;
 			cnf->locked = 0;
@@ -851,6 +852,7 @@
 	char meetmesecs[30] = "";
 	char exitcontext[AST_MAX_CONTEXT] = "";
 	char recordingtmp[AST_MAX_EXTENSION] = "";
+	char members[10] = "";
 	int dtmf;
 	ZT_BUFFERINFO bi;
 	char __buf[CONF_SIZE + AST_FRIENDLY_OFFSET];
@@ -920,6 +922,10 @@
 	user->adminflags = 0;
 	user->talking = -1;
 	conf->users++;
+	/* Update table */
+	snprintf(members, sizeof(members), "%d", conf->users);
+	ast_update_realtime("meetme", "confno", conf->confno, "members", members , NULL);
+
 	ast_mutex_unlock(&conf->playlock);
 
 	if (confflags & CONFFLAG_EXIT_CONTEXT) {
@@ -1665,6 +1671,9 @@
 		          "<no name>", hr, min, sec);
 
 		conf->users--;
+		/* Update table */
+		snprintf(members, sizeof(members), "%d", conf->users);
+		ast_update_realtime("meetme", "confno", conf->confno, "members", members, NULL);
 		if (confflags & CONFFLAG_MARKEDUSER) 
 			conf->markedusers--;
 		if (!conf->users) {
@@ -1708,6 +1717,52 @@
 
 	return ret;
 }
+
+/*
+  This function looks for a conference via the RealTime module
+*/
+static struct ast_conference *find_conf_realtime(struct ast_channel *chan, char *confno, int make, int dynamic, char *dynamic_pin)
+{
+
+	struct ast_variable *var;
+	struct ast_conference *cnf;
+
+	/* Check first in the conference list */
+	AST_LIST_LOCK(&confs);
+	AST_LIST_TRAVERSE(&confs, cnf, list) {
+		if (!strcmp(confno, cnf->confno)) 
+			break;
+	}
+	AST_LIST_UNLOCK(&confs);
+
+	if (!cnf) {
+		char *pin = NULL, *pinadmin = NULL; /* For temp use */
+
+		cnf = ast_calloc(1, sizeof(struct ast_conference));
+		if (!cnf) {
+			ast_log(LOG_ERROR, "Out of memory\n");
+			return NULL;
+		}
+
+		var = ast_load_realtime("meetme", "confno", confno, NULL);
+		while (var) {
+			if (!strcasecmp(var->name, "confno")) {
+				ast_copy_string(cnf->confno, var->value, sizeof(cnf->confno));
+			} else if (!strcasecmp(var->name, "pin")) {
+				pin = ast_strdupa(var->value);
+			} else if (!strcasecmp(var->name, "adminpin")) {
+				pinadmin = ast_strdupa(var->value);
+			}
+			var = var->next;
+		}
+		ast_variables_destroy(var);
+
+		cnf = build_conf(confno, pin ? pin : "", pinadmin ? pinadmin : "", make, dynamic);
+	}
+
+	return cnf;
+}
+
 
 static struct ast_conference *find_conf(struct ast_channel *chan, char *confno, int make, int dynamic, char *dynamic_pin)
 {
@@ -2007,6 +2062,9 @@
 			/* Check the validity of the conference */
 			cnf = find_conf(chan, confno, 1, dynamic, the_pin);
 			if (!cnf) {
+				cnf = find_conf_realtime(chan, confno, 1, dynamic, the_pin);
+			}
+			if (!cnf) {
 				res = ast_streamfile(chan, "conf-invalid", chan->language);
 				if (!res)
 					ast_waitstream(chan, "");

Modified: team/oej/subscribemwi/apps/app_mixmonitor.c
URL: http://svn.digium.com/view/asterisk/team/oej/subscribemwi/apps/app_mixmonitor.c?rev=14414&r1=14413&r2=14414&view=diff
==============================================================================
--- team/oej/subscribemwi/apps/app_mixmonitor.c (original)
+++ team/oej/subscribemwi/apps/app_mixmonitor.c Thu Mar 23 11:46:54 2006
@@ -217,6 +217,17 @@
 	if (option_verbose > 1)
 		ast_verbose(VERBOSE_PREFIX_2 "Begin MixMonitor Recording %s\n", name);
 	
+	if (mixmonitor->post_process) {
+		char *p;
+
+		for (p = mixmonitor->post_process; *p ; p++) {
+			if (*p == '^' && *(p+1) == '{') {
+				*p = '$';
+			}
+		}
+		pbx_substitute_variables_helper(mixmonitor->chan, mixmonitor->post_process, post_process, sizeof(post_process) - 1);
+	}
+
 	while (1) {
 		struct ast_frame *next;
 		int write;
@@ -251,17 +262,6 @@
 		ast_mutex_unlock(&spy.lock);
 	}
 	
-	if (mixmonitor->post_process) {
-		char *p;
-
-		for (p = mixmonitor->post_process; *p ; p++) {
-			if (*p == '^' && *(p+1) == '{') {
-				*p = '$';
-			}
-		}
-		pbx_substitute_variables_helper(mixmonitor->chan, mixmonitor->post_process, post_process, sizeof(post_process) - 1);
-	}
-
 	stopmon(mixmonitor->chan, &spy);
 
 	if (option_verbose > 1)

Modified: team/oej/subscribemwi/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/team/oej/subscribemwi/apps/app_queue.c?rev=14414&r1=14413&r2=14414&view=diff
==============================================================================
--- team/oej/subscribemwi/apps/app_queue.c (original)
+++ team/oej/subscribemwi/apps/app_queue.c Thu Mar 23 11:46:54 2006
@@ -1624,6 +1624,14 @@
 static void record_abandoned(struct queue_ent *qe)
 {
 	ast_mutex_lock(&qe->parent->lock);
+	manager_event(EVENT_FLAG_AGENT, "QueueCallerAbandon",
+	              "Queue: %s\r\n"
+	              "Uniqueid: %s\r\n"
+	              "Position: %d\r\n"
+	              "OriginalPosition: %d\r\n"
+	              "HoldTime: %d\r\n",
+	              qe->parent->name, qe->chan->uniqueid, qe->pos, qe->opos, (int)(time(NULL) - qe->start));
+
 	qe->parent->callsabandoned++;
 	ast_mutex_unlock(&qe->parent->lock);
 }

Modified: team/oej/subscribemwi/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/team/oej/subscribemwi/apps/app_voicemail.c?rev=14414&r1=14413&r2=14414&view=diff
==============================================================================
--- team/oej/subscribemwi/apps/app_voicemail.c (original)
+++ team/oej/subscribemwi/apps/app_voicemail.c Thu Mar 23 11:46:54 2006
@@ -4499,6 +4499,79 @@
 	return res;
 }
 
+static int get_lastdigits(int num)
+{
+	num %= 100;
+	return (num < 20) ? num : num % 10;
+}
+
+static int vm_intro_ru(struct ast_channel *chan,struct vm_state *vms)
+{
+	int res;
+	int lastnum = 0;
+	int dcnum;
+
+	res = ast_play_and_wait(chan, "vm-youhave");
+	if (!res && vms->newmessages) {
+		lastnum = get_lastdigits(vms->newmessages);
+		dcnum = vms->newmessages - lastnum;
+		if (dcnum)
+			res = say_and_wait(chan, dcnum, chan->language);
+		if (!res && lastnum) {
+			if (lastnum == 1) 
+				res = ast_play_and_wait(chan, "digits/ru/odno");
+			else
+				res = say_and_wait(chan, lastnum, chan->language);
+		}
+
+		if (!res)
+			res = ast_play_and_wait(chan, (lastnum == 1) ? "vm-novoe" : "vm-novyh");
+
+		if (!res && vms->oldmessages)
+			res = ast_play_and_wait(chan, "vm-and");
+	}
+
+	if (!res && vms->oldmessages) {
+		lastnum = get_lastdigits(vms->oldmessages);
+		dcnum = vms->newmessages - lastnum;
+		if (dcnum)
+			res = say_and_wait(chan, dcnum, chan->language);
+		if (!res && lastnum) {
+			if (lastnum == 1) 
+				res = ast_play_and_wait(chan, "digits/ru/odno");
+			else
+				res = say_and_wait(chan, lastnum, chan->language);
+		}
+
+		if (!res)
+			res = ast_play_and_wait(chan, (lastnum == 1) ? "vm-staroe" : "vm-staryh");
+	}
+
+	if (!res && !vms->newmessages && !vms->oldmessages) {
+		lastnum = 0;
+		res = ast_play_and_wait(chan, "vm-no");
+	}
+
+	if (!res) {
+		switch(lastnum) {
+		case 1:
+			res = ast_play_and_wait(chan, "vm-soobshenie");
+			break;
+		case 2:
+		case 3:
+		case 4:
+			res = ast_play_and_wait(chan, "vm-soobsheniya");
+			break;
+		default:
+			res = ast_play_and_wait(chan, "vm-soobsheniy");
+			break;
+		}
+	}
+
+	return res;
+}
+
+
 static int vm_intro(struct ast_channel *chan,struct vm_state *vms)
 {
 	/* Play voicemail intro - syntax is different for different languages */
@@ -4522,6 +4595,8 @@
 		return vm_intro_se(chan, vms);
 	} else if (!strcasecmp(chan->language, "no")) {	/* NORWEGIAN syntax */
 		return vm_intro_no(chan, vms);
+	} else if (!strcasecmp(chan->language, "ru")) {   /* RUSSIAN syntax */
+		return vm_intro_ru(chan, vms);
 	} else {					/* Default to ENGLISH */
 		return vm_intro_en(chan, vms);
 	}

Modified: team/oej/subscribemwi/ast_expr2.fl
URL: http://svn.digium.com/view/asterisk/team/oej/subscribemwi/ast_expr2.fl?rev=14414&r1=14413&r2=14414&view=diff
==============================================================================
--- team/oej/subscribemwi/ast_expr2.fl (original)
+++ team/oej/subscribemwi/ast_expr2.fl Thu Mar 23 11:46:54 2006
@@ -201,7 +201,7 @@
 			s, parseio->string,spacebuf2);
 #endif
 #ifndef STANDALONE
-	ast_log(LOG_WARNING,"If you have questions, please refer to doc/README.variables in the asterisk source.\n");
+	ast_log(LOG_WARNING,"If you have questions, please refer to doc/channelvariables.txt in the asterisk source.\n");
 #endif
 	return(0);
 }

Modified: team/oej/subscribemwi/ast_expr2f.c
URL: http://svn.digium.com/view/asterisk/team/oej/subscribemwi/ast_expr2f.c?rev=14414&r1=14413&r2=14414&view=diff
==============================================================================
--- team/oej/subscribemwi/ast_expr2f.c (original)
+++ team/oej/subscribemwi/ast_expr2f.c Thu Mar 23 11:46:54 2006
@@ -2981,7 +2981,7 @@
 			s, parseio->string,spacebuf2);
 #endif
 #ifndef STANDALONE
-	ast_log(LOG_WARNING,"If you have questions, please refer to doc/README.variables in the asterisk source.\n");
+	ast_log(LOG_WARNING,"If you have questions, please refer to doc/channelvariables.txt in the asterisk source.\n");
 #endif
 	return(0);
 }

Modified: team/oej/subscribemwi/asterisk.c
URL: http://svn.digium.com/view/asterisk/team/oej/subscribemwi/asterisk.c?rev=14414&r1=14413&r2=14414&view=diff
==============================================================================
--- team/oej/subscribemwi/asterisk.c (original)
+++ team/oej/subscribemwi/asterisk.c Thu Mar 23 11:46:54 2006
@@ -82,6 +82,9 @@
 
 #if  defined(__FreeBSD__) || defined( __NetBSD__ ) || defined(SOLARIS)
 #include <netdb.h>
+#if defined(SOLARIS)
+extern int daemon(int, int);  /* defined in libresolv of all places */
+#endif
 #endif
 
 #include "asterisk.h"
@@ -2160,7 +2163,7 @@
 			exit(1);
 		}
 		if (setgid(gr->gr_gid)) {
-			ast_log(LOG_WARNING, "Unable to setgid to %d (%s)\n", gr->gr_gid, rungroup);
+			ast_log(LOG_WARNING, "Unable to setgid to %d (%s)\n", (int)gr->gr_gid, rungroup);
 			exit(1);
 		}
 		if (setgroups(0, NULL)) {
@@ -2180,7 +2183,7 @@
 		}
 		if (!rungroup) {
 			if (setgid(pw->pw_gid)) {
-				ast_log(LOG_WARNING, "Unable to setgid to %d!\n", pw->pw_gid);
+				ast_log(LOG_WARNING, "Unable to setgid to %d!\n", (int)pw->pw_gid);
 				exit(1);
 			}
 			if (initgroups(pw->pw_name, pw->pw_gid)) {
@@ -2189,7 +2192,7 @@
 			}
 		}
 		if (setuid(pw->pw_uid)) {
-			ast_log(LOG_WARNING, "Unable to setuid to %d (%s)\n", pw->pw_uid, runuser);
+			ast_log(LOG_WARNING, "Unable to setuid to %d (%s)\n", (int)pw->pw_uid, runuser);
 			exit(1);
 		}
 		setenv("ASTERISK_ALREADY_NONROOT","yes",1);
@@ -2254,7 +2257,7 @@
 	unlink(ast_config_AST_PID);
 	f = fopen(ast_config_AST_PID, "w");
 	if (f) {
-		fprintf(f, "%d\n", getpid());
+		fprintf(f, "%d\n", (int)getpid());
 		fclose(f);
 	} else
 		ast_log(LOG_WARNING, "Unable to open pid file '%s': %s\n", ast_config_AST_PID, strerror(errno));
@@ -2265,7 +2268,7 @@
 		unlink(ast_config_AST_PID);
 		f = fopen(ast_config_AST_PID, "w");
 		if (f) {
-			fprintf(f, "%d\n", getpid());
+			fprintf(f, "%d\n", (int)getpid());
 			fclose(f);
 		} else
 			ast_log(LOG_WARNING, "Unable to open pid file '%s': %s\n", ast_config_AST_PID, strerror(errno));

Modified: team/oej/subscribemwi/asterisk.sgml
URL: http://svn.digium.com/view/asterisk/team/oej/subscribemwi/asterisk.sgml?rev=14414&r1=14413&r2=14414&view=diff
==============================================================================
--- team/oej/subscribemwi/asterisk.sgml (original)
+++ team/oej/subscribemwi/asterisk.sgml Thu Mar 23 11:46:54 2006
@@ -27,6 +27,7 @@
 <arg><option>-G </option><replaceable class="parameter">group</replaceable></arg>
 <arg><option>-x </option><replaceable class="parameter">command</replaceable></arg>
 <arg><option>-M </option><replaceable class="parameter">value</replaceable></arg>
+<arg><option>-L </option><replaceable class="parameter">loadaverage</replaceable></arg>
 	</cmdsynopsis>
 	<cmdsynopsis>
 

Modified: team/oej/subscribemwi/build_tools/make_build_h
URL: http://svn.digium.com/view/asterisk/team/oej/subscribemwi/build_tools/make_build_h?rev=14414&r1=14413&r2=14414&view=diff
==============================================================================
--- team/oej/subscribemwi/build_tools/make_build_h (original)
+++ team/oej/subscribemwi/build_tools/make_build_h Thu Mar 23 11:46:54 2006
@@ -3,7 +3,11 @@
 KERNEL=`uname -r`
 MACHINE=`uname -m`
 OS=`uname -s`
-USER=`whoami`
+if [ `uname -s` = "SunOS" ]; then
+  USER=`/usr/xpg4/bin/id -un`
+else
+  USER=`id -un`
+fi
 DATE=`date -u "+%Y-%m-%d %H:%M:%S"`
 cat << END
 /*

Modified: team/oej/subscribemwi/build_tools/make_svn_branch_name
URL: http://svn.digium.com/view/asterisk/team/oej/subscribemwi/build_tools/make_svn_branch_name?rev=14414&r1=14413&r2=14414&view=diff
==============================================================================
--- team/oej/subscribemwi/build_tools/make_svn_branch_name (original)
+++ team/oej/subscribemwi/build_tools/make_svn_branch_name Thu Mar 23 11:46:54 2006
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-PARTS=`LANG=C svn info | grep URL | awk '{print $2;}' | sed -e s:^.*/svn/asterisk/:: | sed -e 's:/: :g'`
+PARTS=`LANG=C svn info | grep URL | awk '{print $2;}' | sed -e 's:^.*/svn/asterisk/::' | sed -e 's:/: :g'`
 BRANCH=0
 TEAM=0
 

Modified: team/oej/subscribemwi/cdr.c
URL: http://svn.digium.com/view/asterisk/team/oej/subscribemwi/cdr.c?rev=14414&r1=14413&r2=14414&view=diff
==============================================================================
--- team/oej/subscribemwi/cdr.c (original)
+++ team/oej/subscribemwi/cdr.c Thu Mar 23 11:46:54 2006
@@ -263,18 +263,18 @@
 			}
 		}
 	} else if (!strcasecmp(name, "duration"))
-		snprintf(workspace, workspacelen, "%d", cdr->duration);
+		snprintf(workspace, workspacelen, "%ld", cdr->duration);
 	else if (!strcasecmp(name, "billsec"))
-		snprintf(workspace, workspacelen, "%d", cdr->billsec);
+		snprintf(workspace, workspacelen, "%ld", cdr->billsec);
 	else if (!strcasecmp(name, "disposition")) {
 		if (raw) {
-			snprintf(workspace, workspacelen, "%d", cdr->disposition);
+			snprintf(workspace, workspacelen, "%ld", cdr->disposition);
 		} else {
 			ast_copy_string(workspace, ast_cdr_disp2str(cdr->disposition), workspacelen);
 		}
 	} else if (!strcasecmp(name, "amaflags")) {
 		if (raw) {
-			snprintf(workspace, workspacelen, "%d", cdr->amaflags);
+			snprintf(workspace, workspacelen, "%ld", cdr->amaflags);
 		} else {
 			ast_copy_string(workspace, ast_cdr_flags2str(cdr->amaflags), workspacelen);
 		}

Modified: team/oej/subscribemwi/cdr/cdr_csv.c
URL: http://svn.digium.com/view/asterisk/team/oej/subscribemwi/cdr/cdr_csv.c?rev=14414&r1=14413&r2=14414&view=diff
==============================================================================
--- team/oej/subscribemwi/cdr/cdr_csv.c (original)
+++ team/oej/subscribemwi/cdr/cdr_csv.c Thu Mar 23 11:46:54 2006
@@ -41,6 +41,7 @@
 
 ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 
+#include "asterisk/config.h"
 #include "asterisk/channel.h"
 #include "asterisk/cdr.h"
 #include "asterisk/module.h"
@@ -51,6 +52,11 @@
 #define CSV_MASTER  "/Master.csv"
 
 #define DATE_FORMAT "%Y-%m-%d %T"
+
+static int usegmtime = 0;
+static int loguniqueid = 0;
+static int loguserfield = 0;
+static char *config = "cdr.conf";
 
 /* #define CSV_LOGUNIQUEID 1 */
 /* #define CSV_LOGUSERFIELD 1 */
@@ -89,6 +95,58 @@
 
 static FILE *mf = NULL;
 
+
+static int load_config(void)
+{
+	struct ast_config *cfg;
+	struct ast_variable *var;
+	char *tmp;
+
+	usegmtime = 0;
+	loguniqueid = 0;
+	loguserfield = 0;
+	
+	cfg = ast_config_load(config);
+	
+	if (!cfg) {
+		ast_log(LOG_WARNING, "unable to load config: %s\n", config);
+		return -1;
+	} 
+	
+	var = ast_variable_browse(cfg, "csv");
+	if (!var) {
+		ast_config_destroy(cfg);
+		return -1;
+	}
+	
+	tmp = ast_variable_retrieve(cfg, "csv", "usegmtime");
+	if (tmp) {
+		usegmtime = ast_true(tmp);
+		if (usegmtime) {
+			ast_log(LOG_DEBUG, "logging time in GMT\n");
+		}
+	}
+
+	tmp = ast_variable_retrieve(cfg, "csv", "loguniqueid");
+	if (tmp) {
+		loguniqueid = ast_true(tmp);
+		if (loguniqueid) {
+			ast_log(LOG_DEBUG, "logging CDR field UNIQUEID\n");
+		}
+	}
+
+	tmp = ast_variable_retrieve(cfg, "csv", "loguserfield");
+	if (tmp) {
+		loguserfield = ast_true(tmp);
+		if (loguserfield) {
+			ast_log(LOG_DEBUG, "logging CDR user-defined field\n");
+		}
+	}
+
+	ast_config_destroy(cfg);
+	return 0;
+}
+
 static int append_string(char *buf, char *s, size_t bufsize)
 {
 	int pos = strlen(buf);
@@ -140,7 +198,11 @@
 		strncat(buf, ",", bufsize - strlen(buf) - 1);
 		return 0;
 	}
-	localtime_r(&t,&tm);
+	if (usegmtime) {
+		gmtime_r(&t,&tm);
+	} else {
+		localtime_r(&t,&tm);
+	}
 	strftime(tmp, sizeof(tmp), DATE_FORMAT, &tm);
 	return append_string(buf, tmp, bufsize);
 }
@@ -181,15 +243,12 @@
 	append_string(buf, ast_cdr_disp2str(cdr->disposition), bufsize);
 	/* AMA Flags */
 	append_string(buf, ast_cdr_flags2str(cdr->amaflags), bufsize);
-
-#ifdef CSV_LOGUNIQUEID
 	/* Unique ID */
-	append_string(buf, cdr->uniqueid, bufsize);
-#endif
-#ifdef CSV_LOGUSERFIELD
+	if (loguniqueid)
+		append_string(buf, cdr->uniqueid, bufsize);
 	/* append the user field */
-	append_string(buf, cdr->userfield,bufsize);	
-#endif
+	if(loguserfield)
+		append_string(buf, cdr->userfield,bufsize);	
 	/* If we hit the end of our buffer, log an error */
 	if (strlen(buf) < bufsize - 5) {
 		/* Trim off trailing comma */
@@ -268,6 +327,8 @@
 int load_module(void)
 {
 	int res;
+	
+	load_config();
 
 	res = ast_cdr_register(name, desc, csv_log);
 	if (res) {
@@ -280,6 +341,7 @@
 
 int reload(void)
 {
+	load_config();
 	return 0;
 }
 

Modified: team/oej/subscribemwi/cdr/cdr_manager.c
URL: http://svn.digium.com/view/asterisk/team/oej/subscribemwi/cdr/cdr_manager.c?rev=14414&r1=14413&r2=14414&view=diff
==============================================================================
--- team/oej/subscribemwi/cdr/cdr_manager.c (original)
+++ team/oej/subscribemwi/cdr/cdr_manager.c Thu Mar 23 11:46:54 2006
@@ -121,8 +121,8 @@
 	    "StartTime: %s\r\n"
 	    "AnswerTime: %s\r\n"
 	    "EndTime: %s\r\n"
-	    "Duration: %d\r\n"
-	    "BillableSeconds: %d\r\n"
+	    "Duration: %ld\r\n"
+	    "BillableSeconds: %ld\r\n"
 	    "Disposition: %s\r\n"
 	    "AMAFlags: %s\r\n"
 	    "UniqueID: %s\r\n"

Modified: team/oej/subscribemwi/cdr/cdr_odbc.c
URL: http://svn.digium.com/view/asterisk/team/oej/subscribemwi/cdr/cdr_odbc.c?rev=14414&r1=14413&r2=14414&view=diff
==============================================================================
--- team/oej/subscribemwi/cdr/cdr_odbc.c (original)
+++ team/oej/subscribemwi/cdr/cdr_odbc.c Thu Mar 23 11:46:54 2006
@@ -122,7 +122,7 @@
 	if ((ODBC_res != SQL_SUCCESS) && (ODBC_res != SQL_SUCCESS_WITH_INFO)) {
 		if (option_verbose > 10)
 			ast_verbose( VERBOSE_PREFIX_4 "cdr_odbc: Failure in AllocStatement %d\n", ODBC_res);
-		SQLGetDiagRec(SQL_HANDLE_DBC, ODBC_con, 1, ODBC_stat, &ODBC_err, ODBC_msg, 100, &ODBC_mlen);
+		SQLGetDiagRec(SQL_HANDLE_DBC, ODBC_con, 1, (unsigned char *)ODBC_stat, &ODBC_err, (unsigned char *)ODBC_msg, 100, &ODBC_mlen);
 		SQLFreeHandle(SQL_HANDLE_STMT, ODBC_stmt);	
 		connected = 0;
 		ast_mutex_unlock(&odbc_lock);
@@ -133,12 +133,12 @@
 	   strange reason if I don't it blows holes in memory like
 	   like a shotgun.  So we just do this so its safe. */
 
-	ODBC_res = SQLPrepare(ODBC_stmt, sqlcmd, SQL_NTS);
+	ODBC_res = SQLPrepare(ODBC_stmt, (unsigned char *)sqlcmd, SQL_NTS);
 	
 	if ((ODBC_res != SQL_SUCCESS) && (ODBC_res != SQL_SUCCESS_WITH_INFO)) {
 		if (option_verbose > 10)
 			ast_verbose( VERBOSE_PREFIX_4 "cdr_odbc: Error in PREPARE %d\n", ODBC_res);
-		SQLGetDiagRec(SQL_HANDLE_DBC, ODBC_con, 1, ODBC_stat, &ODBC_err, ODBC_msg, 100, &ODBC_mlen);
+		SQLGetDiagRec(SQL_HANDLE_DBC, ODBC_con, 1, (unsigned char *)ODBC_stat, &ODBC_err, (unsigned char *)ODBC_msg, 100, &ODBC_mlen);
 		SQLFreeHandle(SQL_HANDLE_STMT, ODBC_stmt);
 		connected = 0;
 		ast_mutex_unlock(&odbc_lock);
@@ -381,7 +381,7 @@
 	if ((ODBC_res != SQL_SUCCESS) && (ODBC_res != SQL_SUCCESS_WITH_INFO)) {
 		if (option_verbose > 10)
 			ast_verbose( VERBOSE_PREFIX_4 "cdr_odbc: Error in Query %d\n", ODBC_res);
-		SQLGetDiagRec(SQL_HANDLE_DBC, ODBC_con, 1, ODBC_stat, &ODBC_err, ODBC_msg, 100, &ODBC_mlen);
+		SQLGetDiagRec(SQL_HANDLE_DBC, ODBC_con, 1, (unsigned char *)ODBC_stat, &ODBC_err, (unsigned char *)ODBC_msg, 100, &ODBC_mlen);
 		SQLFreeHandle(SQL_HANDLE_STMT, ODBC_stmt);
 		connected = 0;
 		return -1;
@@ -438,7 +438,7 @@
 	if ((ODBC_res != SQL_SUCCESS) && (ODBC_res != SQL_SUCCESS_WITH_INFO)) {
 		if (option_verbose > 10)
 			ast_verbose( VERBOSE_PREFIX_4 "cdr_odbc: Error SQLConnect %d\n", ODBC_res);
-		SQLGetDiagRec(SQL_HANDLE_DBC, ODBC_con, 1, ODBC_stat, &ODBC_err, ODBC_msg, 100, &ODBC_mlen);
+		SQLGetDiagRec(SQL_HANDLE_DBC, ODBC_con, 1, (unsigned char *)ODBC_stat, &ODBC_err, (unsigned char *)ODBC_msg, 100, &ODBC_mlen);
 		SQLFreeHandle(SQL_HANDLE_ENV, ODBC_env);
 		connected = 0;
 		return -1;

Modified: team/oej/subscribemwi/cdr/cdr_pgsql.c
URL: http://svn.digium.com/view/asterisk/team/oej/subscribemwi/cdr/cdr_pgsql.c?rev=14414&r1=14413&r2=14414&view=diff
==============================================================================
--- team/oej/subscribemwi/cdr/cdr_pgsql.c (original)
+++ team/oej/subscribemwi/cdr/cdr_pgsql.c Thu Mar 23 11:46:54 2006
@@ -123,7 +123,7 @@
 
 		snprintf(sqlcmd,sizeof(sqlcmd),"INSERT INTO %s (calldate,clid,src,dst,dcontext,channel,dstchannel,"
 				 "lastapp,lastdata,duration,billsec,disposition,amaflags,accountcode,uniqueid,userfield) VALUES"
-				 " ('%s','%s','%s','%s','%s', '%s','%s','%s','%s',%d,%d,'%s',%d,'%s','%s','%s')",
+				 " ('%s','%s','%s','%s','%s', '%s','%s','%s','%s',%ld,%ld,'%s',%ld,'%s','%s','%s')",
 				 table,timestr,clid,cdr->src, cdr->dst, dcontext,channel, dstchannel, lastapp, lastdata,
 				 cdr->duration,cdr->billsec,ast_cdr_disp2str(cdr->disposition),cdr->amaflags, cdr->accountcode, uniqueid, userfield);
 		

Modified: team/oej/subscribemwi/cdr/cdr_tds.c
URL: http://svn.digium.com/view/asterisk/team/oej/subscribemwi/cdr/cdr_tds.c?rev=14414&r1=14413&r2=14414&view=diff
==============================================================================
--- team/oej/subscribemwi/cdr/cdr_tds.c (original)
+++ team/oej/subscribemwi/cdr/cdr_tds.c Thu Mar 23 11:46:54 2006
@@ -89,6 +89,7 @@
 static char *config = "cdr_tds.conf";
 
 static char *hostname = NULL, *dbname = NULL, *dbuser = NULL, *password = NULL, *charset = NULL, *language = NULL;
+static char *table = NULL;
 
 static int connected = 0;
 
@@ -135,7 +136,7 @@
 
 	sprintf(
 		sqlcmd,
-		"INSERT INTO cdr "
+		"INSERT INTO %s "
 		"("
 			"accountcode, "
 			"src, "
@@ -169,12 +170,13 @@
 			"%s, "		/* start */
 			"%s, "		/* answer */
 			"%s, "		/* end */
-			"%d, "		/* duration */
-			"%d, "		/* billsec */
+			"%ld, "		/* duration */
+			"%ld, "		/* billsec */
 			"'%s', "	/* disposition */
 			"'%s', "	/* amaflags */
 			"'%s'"		/* uniqueid */
 		")",
+		table,
 		accountcode,
 		src,
 		dst,
@@ -415,6 +417,7 @@
 	if (password) free(password);
 	if (charset) free(charset);
 	if (language) free(language);
+	if (table) free(table);
 
 	return 0;
 }
@@ -475,6 +478,13 @@
 	else
 		language = strdup("us_english");
 
+	ptr = ast_variable_retrieve(cfg,"global","table");
+	if (ptr == NULL) {
+		ast_log(LOG_DEBUG,"cdr_tds: table not specified.  Assuming cdr\n");
+		ptr = "cdr";
+	}
+	table = strdup(ptr);
+
 	ast_config_destroy(cfg);
 
 	mssql_connect();

Modified: team/oej/subscribemwi/channel.c
URL: http://svn.digium.com/view/asterisk/team/oej/subscribemwi/channel.c?rev=14414&r1=14413&r2=14414&view=diff
==============================================================================
--- team/oej/subscribemwi/channel.c (original)
+++ team/oej/subscribemwi/channel.c Thu Mar 23 11:46:54 2006
@@ -2122,7 +2122,7 @@
 		if (f->frametype == AST_FRAME_CONTROL && f->subclass == AST_CONTROL_HANGUP)
 			done = 1;	/* force a break */
 		else if (f->frametype == AST_FRAME_TEXT) {		/* what we want */
-			buf = strndup((char *) f->data, f->datalen);	/* dup and break */
+			buf = ast_strndup((char *) f->data, f->datalen);	/* dup and break */
 			done = 1;
 		}
 		ast_frfree(f);

Modified: team/oej/subscribemwi/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/team/oej/subscribemwi/channels/chan_iax2.c?rev=14414&r1=14413&r2=14414&view=diff
==============================================================================
--- team/oej/subscribemwi/channels/chan_iax2.c (original)
+++ team/oej/subscribemwi/channels/chan_iax2.c Thu Mar 23 11:46:54 2006
@@ -5759,8 +5759,6 @@
 	ast_log(LOG_DEBUG, "Expiring registration for peer '%s'\n", p->name);
 	/* Reset the address */
 	memset(&p->addr, 0, sizeof(p->addr));
-	/* Reset expire notice */
-	p->expire = -1;
 	/* Reset expiry value */
 	p->expiry = min_reg_expire;
 	if (!ast_test_flag(p, IAX_TEMPONLY))
@@ -5778,6 +5776,9 @@
 
 static int expire_registry(void *data)
 {
+	struct iax2_peer *p = data;
+	/* Reset expire notice */
+	p->expire = -1;
 #ifdef SCHED_MULTITHREADED
 	if (schedule_action(__expire_registry, data))
 #endif		

Modified: team/oej/subscribemwi/channels/chan_misdn.c
URL: http://svn.digium.com/view/asterisk/team/oej/subscribemwi/channels/chan_misdn.c?rev=14414&r1=14413&r2=14414&view=diff
==============================================================================
--- team/oej/subscribemwi/channels/chan_misdn.c (original)
+++ team/oej/subscribemwi/channels/chan_misdn.c Thu Mar 23 11:46:54 2006
@@ -130,6 +130,7 @@
 	MISDN_ALERTING, /*!<  when Alerting */
 	MISDN_BUSY, /*!<  when BUSY */
 	MISDN_CONNECTED, /*!<  when connected */
+	MISDN_DISCONNECTED, /*!<  when connected */
 	MISDN_BRIDGED, /*!<  when bridged */
 	MISDN_CLEANING, /*!< when hangup from * but we were connected before */
 	MISDN_HUNGUP_FROM_MISDN, /*!< when DISCONNECT/RELEASE/REL_COMP  cam from misdn */
@@ -515,6 +516,20 @@
 	return 0;
 }
 
+static int misdn_port_down (int fd, int argc, char *argv[])
+{
+	int port;
+	
+	if (argc != 4)
+		return RESULT_SHOWUSAGE;
+	
+	port = atoi(argv[3]);
+	
+	misdn_lib_get_port_down(port);
+  
+	return 0;
+}
+
 
 static int misdn_show_config (int fd, int argc, char *argv[])
 {
@@ -633,13 +648,14 @@
 {
 	struct ast_channel *ast=help->ast;
 	ast_cli(fd,
-		"* Pid:%d Prt:%d Ch:%d Mode:%s Org:%s dad:%s oad:%s ctx:%s state:%s\n",
+		"* Pid:%d Prt:%d Ch:%d Mode:%s Org:%s dad:%s oad:%s rad:%s ctx:%s state:%s\n",
 
 		bc->pid, bc->port, bc->channel,
 		bc->nt?"NT":"TE",
 		help->orginator == ORG_AST?"*":"I",
 		ast?ast->exten:NULL,
 		ast?AST_CID_P(ast):NULL,
+		bc->rad,
 		ast?ast->context:NULL,
 		misdn_get_ch_state(help)
 		);
@@ -1031,6 +1047,15 @@
   "Usage: misdn port up <port>\n"
 };
 
+static struct ast_cli_entry cli_port_down =
+{ {"misdn","port","down", NULL},
+  misdn_port_down,
+  "Tries to deacivate the L1 on the given port", 
+  "Usage: misdn port down <port>\n"
+};
+
+
+
 static struct ast_cli_entry cli_show_stacks =
 { {"misdn","show","stacks", NULL},
   misdn_show_stacks,
@@ -1316,26 +1341,47 @@
 			misdn_cfg_get( port, MISDN_CFG_LOCALDIALPLAN, &bc->onumplan, sizeof(int));
 			switch (bc->onumplan) {
 			case NUMPLAN_INTERNATIONAL:
-				chan_misdn_log(2, port, " --> TON: International\n");
+				chan_misdn_log(2, port, " --> LTON: International\n");
 				break;
 			case NUMPLAN_NATIONAL:
-				chan_misdn_log(2, port, " --> TON: National\n");
+				chan_misdn_log(2, port, " --> LTON: National\n");
 				break;
 			case NUMPLAN_SUBSCRIBER:
-				chan_misdn_log(2, port, " --> TON: Subscriber\n");
+				chan_misdn_log(2, port, " --> LTON: Subscriber\n");
 				break;
 			case NUMPLAN_UNKNOWN:
-				chan_misdn_log(2, port, " --> TON: Unknown\n");
+				chan_misdn_log(2, port, " --> LTON: Unknown\n");
 				break;
 				/* Maybe we should cut off the prefix if present ? */
 			default:
 					chan_misdn_log(0, port, " --> !!!! Wrong dialplan setting, please see the misdn.conf sample file\n ");
 					break;
 			}
-		}
-
-		
-				
+
+			misdn_cfg_get( port, MISDN_CFG_CPNDIALPLAN, &bc->cpnnumplan, sizeof(int));
+
+			switch (bc->cpnnumplan) {
+			case NUMPLAN_INTERNATIONAL:
+				chan_misdn_log(2, port, " --> CTON: International\n");
+				break;
+			case NUMPLAN_NATIONAL:
+				chan_misdn_log(2, port, " --> CTON: National\n");
+				break;
+			case NUMPLAN_SUBSCRIBER:
+				chan_misdn_log(2, port, " --> CTON: Subscriber\n");
+				break;
+			case NUMPLAN_UNKNOWN:

[... 2484 lines stripped ...]


More information about the asterisk-commits mailing list