[asterisk-commits] branch oej/siptransfer r14415 - in /team/oej/siptransfer: ./ agi/ apps/ cdr/ ...

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


Author: oej
Date: Thu Mar 23 11:55:46 2006
New Revision: 14415

URL: http://svn.digium.com/view/asterisk?rev=14415&view=rev
Log:
Resolve conflicts, restart automerge.

Added:
    team/oej/siptransfer/res/res_convert.c
      - copied unchanged from r14382, trunk/res/res_convert.c
Modified:
    team/oej/siptransfer/   (props changed)
    team/oej/siptransfer/Makefile
    team/oej/siptransfer/UPGRADE.txt
    team/oej/siptransfer/agi/Makefile
    team/oej/siptransfer/apps/app_dial.c
    team/oej/siptransfer/apps/app_externalivr.c
    team/oej/siptransfer/apps/app_meetme.c
    team/oej/siptransfer/apps/app_queue.c
    team/oej/siptransfer/apps/app_rpt.c
    team/oej/siptransfer/apps/app_voicemail.c
    team/oej/siptransfer/ast_expr2.c
    team/oej/siptransfer/ast_expr2.h
    team/oej/siptransfer/ast_expr2.y
    team/oej/siptransfer/asterisk.c
    team/oej/siptransfer/astmm.c
    team/oej/siptransfer/cdr.c
    team/oej/siptransfer/cdr/Makefile
    team/oej/siptransfer/cdr/cdr_sqlite.c
    team/oej/siptransfer/channel.c
    team/oej/siptransfer/channels/chan_iax2.c
    team/oej/siptransfer/channels/chan_misdn.c
    team/oej/siptransfer/channels/chan_sip.c
    team/oej/siptransfer/channels/chan_skinny.c
    team/oej/siptransfer/channels/chan_zap.c
    team/oej/siptransfer/channels/misdn/chan_misdn_config.h
    team/oej/siptransfer/channels/misdn/isdn_lib.c
    team/oej/siptransfer/channels/misdn_config.c
    team/oej/siptransfer/codecs/Makefile
    team/oej/siptransfer/codecs/gsm/Makefile
    team/oej/siptransfer/codecs/gsm/libgsm.vcproj   (props changed)
    team/oej/siptransfer/codecs/ilbc/libilbc.vcproj   (props changed)
    team/oej/siptransfer/codecs/lpc10/liblpc10.vcproj   (props changed)
    team/oej/siptransfer/config.c
    team/oej/siptransfer/configs/cdr.conf.sample
    team/oej/siptransfer/configs/features.conf.sample
    team/oej/siptransfer/configs/iax.conf.sample
    team/oej/siptransfer/configs/indications.conf.sample
    team/oej/siptransfer/configs/misdn.conf.sample
    team/oej/siptransfer/configs/musiconhold.conf.sample
    team/oej/siptransfer/configs/sip.conf.sample
    team/oej/siptransfer/configs/zapata.conf.sample
    team/oej/siptransfer/contrib/utils/rawplayer.c
    team/oej/siptransfer/db.c
    team/oej/siptransfer/doc/billing.txt
    team/oej/siptransfer/doc/enum.txt
    team/oej/siptransfer/doc/extconfig.txt
    team/oej/siptransfer/doc/realtime.txt
    team/oej/siptransfer/editline/term.c
    team/oej/siptransfer/funcs/func_enum.c
    team/oej/siptransfer/image.c
    team/oej/siptransfer/include/asterisk/cdr.h
    team/oej/siptransfer/include/asterisk/channel.h
    team/oej/siptransfer/include/asterisk/compat.h
    team/oej/siptransfer/include/asterisk/module.h
    team/oej/siptransfer/include/asterisk/options.h
    team/oej/siptransfer/include/asterisk/pbx.h
    team/oej/siptransfer/include/asterisk/say.h
    team/oej/siptransfer/include/asterisk/utils.h
    team/oej/siptransfer/include/solaris-compat/compat.h
    team/oej/siptransfer/pbx.c
    team/oej/siptransfer/res/res_features.c
    team/oej/siptransfer/res/res_musiconhold.c
    team/oej/siptransfer/rtp.c
    team/oej/siptransfer/sample.call
    team/oej/siptransfer/say.c
    team/oej/siptransfer/sched.c
    team/oej/siptransfer/sounds.txt
    team/oej/siptransfer/strcompat.c

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

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

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

Propchange: team/oej/siptransfer/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu Mar 23 11:55:46 2006
@@ -1,1 +1,1 @@
-/trunk:1-12571
+/trunk:1-14413

Modified: team/oej/siptransfer/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/siptransfer/Makefile?rev=14415&r1=14414&r2=14415&view=diff
==============================================================================
--- team/oej/siptransfer/Makefile (original)
+++ team/oej/siptransfer/Makefile Thu Mar 23 11:55:46 2006
@@ -357,7 +357,7 @@
 SUBDIRS=res channels pbx apps codecs formats agi cdr funcs utils stdtime
 
 OBJS=io.o sched.o logger.o frame.o loader.o config.o channel.o \
-	translate.o file.o say.o pbx.o cli.o md5.o term.o \
+	translate.o file.o pbx.o cli.o md5.o term.o \
 	ulaw.o alaw.o callerid.o fskmodem.o image.o app.o \
 	cdr.o tdd.o acl.o rtp.o udptl.o manager.o asterisk.o \
 	dsp.o chanvars.o indications.o autoservice.o db.o privacy.o \
@@ -365,6 +365,15 @@
 	utils.o plc.o jitterbuf.o dnsmgr.o devicestate.o \
 	netsock.o slinfactory.o ast_expr2.o ast_expr2f.o \
 	cryptostub.o sha1.o
+
+# we need to link in the objects statically, not as a library, because
+# otherwise modules will not have them available if none of the static
+# objects use it.
+OBJS+= stdtime/localtime.o
+
+# At the moment say.o is an optional component which can be overridden
+# by a module.
+OBJS+= say.o
 
 ifeq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/sys/poll.h),)
   OBJS+= poll.o

Modified: team/oej/siptransfer/UPGRADE.txt
URL: http://svn.digium.com/view/asterisk/team/oej/siptransfer/UPGRADE.txt?rev=14415&r1=14414&r2=14415&view=diff
==============================================================================
--- team/oej/siptransfer/UPGRADE.txt (original)
+++ team/oej/siptransfer/UPGRADE.txt Thu Mar 23 11:55:46 2006
@@ -53,6 +53,15 @@
 * The ENUMLOOKUP() function with the 'c' option (for counting the number of records),
   but the lookup fails to match any records, the returned value will now be "0" instead of blank.
 
+The IAX2 channel:
+
+* The "mailboxdetail" option has been deprecated.  Previously, if this option
+  was not enabled, the 2 byte MSGCOUNT information element would be set to all
+  1's to indicate there there is some number of messages waiting.  With this
+  option enabled, the number of new messages were placed in one byte and the
+  number of old messages are placed in the other.  This is now the default
+  (and the only) behavior.
+
 The SIP channel:
 
 * The "incominglimit" setting is replaced by the "call-limit" setting in sip.conf.
@@ -66,3 +75,11 @@
 	ASTETCDIR	/usr/local/etc/asterisk
 	ASTBINDIR	/usr/local/bin/asterisk
 	ASTSBINDIR	/usr/local/sbin/asterisk
+
+Sounds:
+
+* The phonetic sounds directory has been removed from the asterisk-sounds package
+  because they are now included directly in Asterisk.  However, it is important to
+  note that the phonetic sounds that existed in asterisk-sounds used a different
+  naming convention than the sounds in Asterisk.  For example, instead of alpha.gsm
+  and bravo.gsm, Asterisk has a_p.gsm and b_p.gsm.

Modified: team/oej/siptransfer/agi/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/siptransfer/agi/Makefile?rev=14415&r1=14414&r2=14415&view=diff
==============================================================================
--- team/oej/siptransfer/agi/Makefile (original)
+++ team/oej/siptransfer/agi/Makefile Thu Mar 23 11:55:46 2006
@@ -13,15 +13,11 @@
 
 AGIS=agi-test.agi eagi-test eagi-sphinx-test jukebox.agi
 
-CFLAGS+=
+CFLAGS+=-DNO_AST_MM
 
 LIBS=
 ifeq ($(OSARCH),SunOS)
   LIBS=-lsocket -lnsl ../strcompat.o
-endif
-
-ifeq ($(findstring BSD,${OSARCH}),BSD)
-  CFLAGS+=-I$(CROSS_COMPILE_TARGET)/usr/local/include -L$(CROSS_COMPILE_TARGET)/usr/local/lib
 endif
 
 all: depend $(AGIS)

Modified: team/oej/siptransfer/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/team/oej/siptransfer/apps/app_dial.c?rev=14415&r1=14414&r2=14415&view=diff
==============================================================================
--- team/oej/siptransfer/apps/app_dial.c (original)
+++ team/oej/siptransfer/apps/app_dial.c Thu Mar 23 11:55:46 2006
@@ -112,9 +112,10 @@
 "           other than the number assigned to the caller.\n"
 "    g    - Proceed with dialplan execution at the current extension if the\n"
 "           destination channel hangs up.\n"
-"    G(context^exten^pri) - If the call is answered, transfer both parties to\n"
-"           the specified priority. Optionally, an extension, or extension and\n"
-"           context may be specified. Otherwise, the current extension is used.\n"
+"    G(context^exten^pri) - If the call is answered, transfer the calling party to\n"
+"           the specified priority and the called party to the specified priority+1.\n"
+"           Optionally, an extension, or extension and context may be specified. \n"
+"           Otherwise, the current extension is used.\n"
 "    h    - Allow the called party to hang up by sending the '*' DTMF digit.\n"
 "    H    - Allow the calling party to hang up by hitting the '*' DTMF digit.\n"
 "    j    - Jump to priority n+101 if all of the requested channels were busy.\n"

Modified: team/oej/siptransfer/apps/app_externalivr.c
URL: http://svn.digium.com/view/asterisk/team/oej/siptransfer/apps/app_externalivr.c?rev=14415&r1=14414&r2=14415&view=diff
==============================================================================
--- team/oej/siptransfer/apps/app_externalivr.c (original)
+++ team/oej/siptransfer/apps/app_externalivr.c Thu Mar 23 11:55:46 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/siptransfer/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/team/oej/siptransfer/apps/app_meetme.c?rev=14415&r1=14414&r2=14415&view=diff
==============================================================================
--- team/oej/siptransfer/apps/app_meetme.c (original)
+++ team/oej/siptransfer/apps/app_meetme.c Thu Mar 23 11:55:46 2006
@@ -71,18 +71,18 @@
 static const char *synopsis3 = "MeetMe conference Administration";
 
 static const char *descrip =
-"  MeetMe([confno][,[options][,pin]]): Enters the user into a specified MeetMe conference.\n"
-"If the conference number is omitted, the user will be prompted to enter\n"
-"one. \n"
-"User can exit the conference by hangup, or if the 'p' option is specified, by pressing '#'.\n"
+"  MeetMe([confno][,[options][,pin]]): Enters the user into a specified MeetMe\n"
+"conference.  If the conference number is omitted, the user will be prompted\n"
+"to enter one.  User can exit the conference by hangup, or if the 'p' option\n"
+"is specified, by pressing '#'.\n"
 "Please note: A ZAPTEL INTERFACE MUST BE INSTALLED FOR CONFERENCING TO WORK!\n\n"
 
 "The option string may contain zero or more of the following characters:\n"
 "      'a' -- set admin mode\n"
 "      'A' -- set marked mode\n"
 "      'b' -- run AGI script specified in ${MEETME_AGI_BACKGROUND}\n"
-"             Default: conf-background.agi\n"
-"             (Note: This does not work with non-Zap channels in the same conference)\n"
+"             Default: conf-background.agi  (Note: This does not work with\n"
+"             non-Zap channels in the same conference)\n"
 "      'c' -- announce user(s) count on joining a conference\n"
 "      'd' -- dynamically add conference\n"
 "      'D' -- dynamically add conference, prompting for a PIN\n"
@@ -91,31 +91,34 @@
 "      'i' -- announce user join/leave\n"
 "      'm' -- set monitor only mode (Listen only, no talking)\n"
 "      'M' -- enable music on hold when the conference has a single caller\n"
+"      'o' -- set talker optimization - treats talkers who aren't speaking as\n"
+"             being muted, meaning (a) No encode is done on transmission and\n"
+"             (b) Received audio that is not registered as talking is omitted\n"
+"             causing no buildup in background noise\n"
 "      'p' -- allow user to exit the conference by pressing '#'\n"
 "      'P' -- always prompt for the pin even if it is specified\n"
 "      'q' -- quiet mode (don't play enter/leave sounds)\n"
 "      'r' -- Record conference (records as ${MEETME_RECORDINGFILE}\n"
 "             using format ${MEETME_RECORDINGFORMAT}). Default filename is\n"
-"             meetme-conf-rec-${CONFNO}-${UNIQUEID} and the default format is wav.\n"
+"             meetme-conf-rec-${CONFNO}-${UNIQUEID} and the default format is\n"
+"             wav.\n"
 "      's' -- Present menu (user or admin) when '*' is received ('send' to menu)\n"
 "      't' -- set talk only mode. (Talk only, no listening)\n"
 "      'T' -- set talker detection (sent to manager interface and meetme list)\n"
-"      'o' -- set talker optimization - treats talkers who aren't speaking as\n"
-"             being muted, meaning (a) No encode is done on transmission and\n"
-"             (b) Received audio that is not registered as talking is omitted\n"
-"             causing no buildup in background noise\n"
 "      'v' -- video mode\n"
 "      'w' -- wait until the marked user enters the conference\n"
 "      'x' -- close the conference when last marked user exits\n"
 "      'X' -- allow user to exit the conference by entering a valid single\n"
 "             digit extension ${MEETME_EXIT_CONTEXT} or the current context\n"
-"             if that variable is not defined.\n";
+"             if that variable is not defined.\n"
+"      '1' -- do not play message when first person enters\n";
 
 static const char *descrip2 =
 "  MeetMeCount(confno[|var]): Plays back the number of users in the specified\n"
 "MeetMe conference. If var is specified, playback will be skipped and the value\n"
-"will be returned in the variable. Upon app completion, MeetMeCount will hangup the\n"
-"channel, unless priority n+1 exists, in which case priority progress will continue.\n"
+"will be returned in the variable. Upon app completion, MeetMeCount will hangup\n"
+"the channel, unless priority n+1 exists, in which case priority progress will\n"
+"continue.\n"
 "A ZAPTEL INTERFACE MUST BE INSTALLED FOR CONFERENCING FUNCTIONALITY.\n";
 
 static const char *descrip3 = 
@@ -148,6 +151,7 @@
 	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 refcount;				/* reference count of usage */
 	unsigned int recording:2;				/* recording status */
 	unsigned int isdynamic:1;				/* Created on the fly? */
 	unsigned int locked:1;				/* Is the conference locked? */
@@ -244,31 +248,33 @@
 #define CONFFLAG_ALWAYSPROMPT (1 << 21)
 #define CONFFLAG_ANNOUNCEUSERCOUNT (1 << 22)	/* If set, when user joins the conference, they will be told the number of users that are already in */
 #define CONFFLAG_OPTIMIZETALKER (1 << 23)	/* If set, treats talking users as muted users */
+#define CONFFLAG_NOONLYPERSON (1 << 24)		/* If set, won't speak the extra prompt when the first person enters the conference */
 
 
 AST_APP_OPTIONS(meetme_opts, {
+	AST_APP_OPTION('A', CONFFLAG_MARKEDUSER ),
 	AST_APP_OPTION('a', CONFFLAG_ADMIN ),
+	AST_APP_OPTION('b', CONFFLAG_AGI ),
 	AST_APP_OPTION('c', CONFFLAG_ANNOUNCEUSERCOUNT ),
+	AST_APP_OPTION('D', CONFFLAG_DYNAMICPIN ),
+	AST_APP_OPTION('d', CONFFLAG_DYNAMIC ),
+	AST_APP_OPTION('E', CONFFLAG_EMPTYNOPIN ),
+	AST_APP_OPTION('e', CONFFLAG_EMPTY ),
+	AST_APP_OPTION('i', CONFFLAG_INTROUSER ),
+	AST_APP_OPTION('M', CONFFLAG_MOH ),
+	AST_APP_OPTION('m', CONFFLAG_MONITOR ),
+	AST_APP_OPTION('o', CONFFLAG_OPTIMIZETALKER ),
+	AST_APP_OPTION('P', CONFFLAG_ALWAYSPROMPT ),
+	AST_APP_OPTION('p', CONFFLAG_POUNDEXIT ),
+	AST_APP_OPTION('q', CONFFLAG_QUIET ),
+	AST_APP_OPTION('r', CONFFLAG_RECORDCONF ),
+	AST_APP_OPTION('s', CONFFLAG_STARMENU ),
 	AST_APP_OPTION('T', CONFFLAG_MONITORTALKER ),
-	AST_APP_OPTION('o', CONFFLAG_OPTIMIZETALKER ),
-	AST_APP_OPTION('i', CONFFLAG_INTROUSER ),
-	AST_APP_OPTION('m', CONFFLAG_MONITOR ),
-	AST_APP_OPTION('p', CONFFLAG_POUNDEXIT ),
-	AST_APP_OPTION('s', CONFFLAG_STARMENU ),
 	AST_APP_OPTION('t', CONFFLAG_TALKER ),
-	AST_APP_OPTION('q', CONFFLAG_QUIET ),
-	AST_APP_OPTION('M', CONFFLAG_MOH ),
+	AST_APP_OPTION('w', CONFFLAG_WAITMARKED ),
+	AST_APP_OPTION('X', CONFFLAG_EXIT_CONTEXT ),
 	AST_APP_OPTION('x', CONFFLAG_MARKEDEXIT ),
-	AST_APP_OPTION('X', CONFFLAG_EXIT_CONTEXT ),
-	AST_APP_OPTION('A', CONFFLAG_MARKEDUSER ),
-	AST_APP_OPTION('b', CONFFLAG_AGI ),
-	AST_APP_OPTION('w', CONFFLAG_WAITMARKED ),
-	AST_APP_OPTION('r', CONFFLAG_RECORDCONF ),
-	AST_APP_OPTION('d', CONFFLAG_DYNAMIC ),
-	AST_APP_OPTION('D', CONFFLAG_DYNAMICPIN ),
-	AST_APP_OPTION('e', CONFFLAG_EMPTY ),
-	AST_APP_OPTION('E', CONFFLAG_EMPTYNOPIN ),
-	AST_APP_OPTION('P', CONFFLAG_ALWAYSPROMPT ),
+	AST_APP_OPTION('1', CONFFLAG_NOONLYPERSON ),
 });
 
 static char *istalking(int x)
@@ -453,7 +459,7 @@
 		ast_autoservice_stop(chan);
 }
 
-static struct ast_conference *build_conf(char *confno, char *pin, char *pinadmin, int make, int dynamic)
+static struct ast_conference *build_conf(char *confno, char *pin, char *pinadmin, int make, int dynamic, int refcount)
 {
 	struct ast_conference *cnf;
 	struct zt_confinfo ztc;
@@ -473,6 +479,7 @@
 			ast_copy_string(cnf->confno, confno, sizeof(cnf->confno));
 			ast_copy_string(cnf->pin, pin, sizeof(cnf->pin));
 			ast_copy_string(cnf->pinadmin, pinadmin, sizeof(cnf->pinadmin));
+			cnf->refcount = 0;
 			cnf->markedusers = 0;
 			cnf->chan = ast_request("zap", AST_FORMAT_SLINEAR, "pseudo", NULL);
 			if (cnf->chan) {
@@ -529,6 +536,9 @@
 		} 
 	}
  cnfout:
+	if (cnf){ 
+		cnf->refcount += refcount;
+	}
 	AST_LIST_UNLOCK(&confs);
 	return cnf;
 }
@@ -859,6 +869,12 @@
 	char *buf = __buf + AST_FRIENDLY_OFFSET;
 
 	if (!(user = ast_calloc(1, sizeof(*user)))) {
+		AST_LIST_LOCK(&confs);
+		conf->refcount--;
+		if (!conf->refcount){
+			conf_free(conf);
+		}
+		AST_LIST_UNLOCK(&confs);
 		return ret;
 	}
 
@@ -941,10 +957,12 @@
 		snprintf(user->namerecloc, sizeof(user->namerecloc),
 			 "%s/meetme/meetme-username-%s-%d", ast_config_AST_SPOOL_DIR,
 			 conf->confno, user->user_no);
-		ast_record_review(chan, "vm-rec-name", user->namerecloc, 10, "sln", &duration, NULL);
-	}
-
-	if (!(confflags & CONFFLAG_QUIET)) {
+		res = ast_record_review(chan, "vm-rec-name", user->namerecloc, 10, "sln", &duration, NULL);
+		if (res == -1)
+			goto outrun;
+	}
+
+	if ( !(confflags & (CONFFLAG_QUIET | CONFFLAG_NOONLYPERSON)) ) {
 		if (conf->users == 1 && !(confflags & CONFFLAG_WAITMARKED))
 			if (!ast_streamfile(chan, "conf-onlyperson", chan->language))
 				ast_waitstream(chan, "");
@@ -1671,14 +1689,17 @@
 		          "<no name>", hr, min, sec);
 
 		conf->users--;
+		conf->refcount--;
 		/* 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) {
-			/* No more users -- close this one out */
-			conf_free(conf);
+			/* close this one when no more users and no references*/
+			if (!conf->refcount){
+				conf_free(conf);
+			}
 		} else {
 			/* Remove the user struct */ 
 			if (user == conf->firstuser) {
@@ -1721,7 +1742,7 @@
 /*
   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)
+static struct ast_conference *find_conf_realtime(struct ast_channel *chan, char *confno, int make, int dynamic, char *dynamic_pin, int refcount)
 {
 
 	struct ast_variable *var;
@@ -1732,6 +1753,9 @@
 	AST_LIST_TRAVERSE(&confs, cnf, list) {
 		if (!strcmp(confno, cnf->confno)) 
 			break;
+	}
+	if (cnf){
+		cnf->refcount += refcount;
 	}
 	AST_LIST_UNLOCK(&confs);
 
@@ -1757,14 +1781,14 @@
 		}
 		ast_variables_destroy(var);
 
-		cnf = build_conf(confno, pin ? pin : "", pinadmin ? pinadmin : "", make, dynamic);
+		cnf = build_conf(confno, pin ? pin : "", pinadmin ? pinadmin : "", make, dynamic, refcount);
 	}
 
 	return cnf;
 }
 
 
-static struct ast_conference *find_conf(struct ast_channel *chan, char *confno, int make, int dynamic, char *dynamic_pin)
+static struct ast_conference *find_conf(struct ast_channel *chan, char *confno, int make, int dynamic, char *dynamic_pin, int refcount)
 {
 	struct ast_config *cfg;
 	struct ast_variable *var;
@@ -1782,6 +1806,9 @@
 		if (!strcmp(confno, cnf->confno)) 
 			break;
 	}
+	if (cnf){
+		cnf->refcount += refcount;
+	}
 	AST_LIST_UNLOCK(&confs);
 
 	if (!cnf) {
@@ -1794,9 +1821,9 @@
 					if (ast_app_getdata(chan, "conf-getpin", dynamic_pin, AST_MAX_EXTENSION - 1, 0) < 0)
 						return NULL;
 				}
-				cnf = build_conf(confno, dynamic_pin, "", make, dynamic);
+				cnf = build_conf(confno, dynamic_pin, "", make, dynamic, refcount);
 			} else {
-				cnf = build_conf(confno, "", "", make, dynamic);
+				cnf = build_conf(confno, "", "", make, dynamic, refcount);
 			}
 		} else {
 			/* Check the config */
@@ -1805,28 +1832,20 @@
 				ast_log(LOG_WARNING, "No %s file :(\n", CONFIG_FILE_NAME);
 				return NULL;
 			}
-			var = ast_variable_browse(cfg, "rooms");
-			for (; var; var = var->next) {
+			for (var = ast_variable_browse(cfg, "rooms"); var; var = var->next) {
 				if (strcasecmp(var->name, "conf"))
 					continue;
 				
 				if (!(parse = ast_strdupa(var->value)))
 					return NULL;
 				
-				AST_STANDARD_APP_ARGS(args, parse);
+				AST_NONSTANDARD_APP_ARGS(args, parse, ',');
 				if (!strcasecmp(args.confno, confno)) {
 					/* Bingo it's a valid conference */
-					if (args.pin) {
-						if (args.pinadmin)
-							cnf = build_conf(args.confno, args.pin, args.pinadmin, make, dynamic);
-						else
-							cnf = build_conf(args.confno, args.pin, "", make, dynamic);
-					} else {
-						if (args.pinadmin)
-							cnf = build_conf(args.confno, "", args.pinadmin, make, dynamic);
-						else
-							cnf = build_conf(args.confno, "", "", make, dynamic);
-					}
+					cnf = build_conf(args.confno,
+							ast_strlen_zero(args.pin) ? "" : args.pin,
+							ast_strlen_zero(args.pinadmin) ? "" : args.pinadmin,
+							make, dynamic, refcount);
 					break;
 				}
 			}
@@ -1874,7 +1893,7 @@
 
 	AST_STANDARD_APP_ARGS(args, localdata);
 	
-	conf = find_conf(chan, args.confno, 0, 0, NULL);
+	conf = find_conf(chan, args.confno, 0, 0, NULL, 0);
 	if (conf)
 		count = conf->users;
 	else
@@ -2001,7 +2020,7 @@
 									AST_LIST_UNLOCK(&confs);
 									if (!found) {
 										/* At this point, we have a confno_tmp (static conference) that is empty */
-										if ((empty_no_pin && ((!stringp) || (stringp && (stringp[0] == '\0')))) || (!empty_no_pin)) {
+										if ((empty_no_pin && ast_strlen_zero(stringp)) || (!empty_no_pin)) {
 											/* Case 1:  empty_no_pin and pin is nonexistent (NULL)
 											 * Case 2:  empty_no_pin and pin is blank (but not NULL)
 											 * Case 3:  not empty_no_pin
@@ -2060,9 +2079,9 @@
 		}
 		if (!ast_strlen_zero(confno)) {
 			/* Check the validity of the conference */
-			cnf = find_conf(chan, confno, 1, dynamic, the_pin);
+			cnf = find_conf(chan, confno, 1, dynamic, the_pin, 1);
 			if (!cnf) {
-				cnf = find_conf_realtime(chan, confno, 1, dynamic, the_pin);
+				cnf = find_conf_realtime(chan, confno, 1, dynamic, the_pin, 1);
 			}
 			if (!cnf) {
 				res = ast_streamfile(chan, "conf-invalid", chan->language);
@@ -2104,8 +2123,15 @@
 								res = ast_streamfile(chan, "conf-invalidpin", chan->language);
 								if (!res)
 									ast_waitstream(chan, AST_DIGIT_ANY);
-								if (res < 0)
+								if (res < 0) {
+									AST_LIST_LOCK(&confs);
+									cnf->refcount--;
+									if (!cnf->refcount){
+										conf_free(cnf);
+									}
+									AST_LIST_UNLOCK(&confs);
 									break;
+								}
 								pin[0] = res;
 								pin[1] = '\0';
 								res = -1;
@@ -2118,8 +2144,9 @@
 							allowretry = 0;
 							/* see if we need to get rid of the conference */
 							AST_LIST_LOCK(&confs);
-							if (!cnf->users) {
-								conf_free(cnf);	
+							cnf->refcount--;
+							if (!cnf->refcount) {
+								conf_free(cnf);
 							}
 							AST_LIST_UNLOCK(&confs);
 							break;

Modified: team/oej/siptransfer/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/team/oej/siptransfer/apps/app_queue.c?rev=14415&r1=14414&r2=14415&view=diff
==============================================================================
--- team/oej/siptransfer/apps/app_queue.c (original)
+++ team/oej/siptransfer/apps/app_queue.c Thu Mar 23 11:55:46 2006
@@ -952,7 +952,7 @@
 	}
 	AST_LIST_UNLOCK(&queues);
 
-	if (!q) {
+	if (!q || q->realtime) {
 		/*! \note Load from realtime before taking the global qlock, to avoid blocking all
 		   queue operations while waiting for the DB.
 

Modified: team/oej/siptransfer/apps/app_rpt.c
URL: http://svn.digium.com/view/asterisk/team/oej/siptransfer/apps/app_rpt.c?rev=14415&r1=14414&r2=14415&view=diff
==============================================================================
--- team/oej/siptransfer/apps/app_rpt.c (original)
+++ team/oej/siptransfer/apps/app_rpt.c Thu Mar 23 11:55:46 2006
@@ -2010,7 +2010,7 @@
 	strncpy(mychannel->exten, myrpt->exten, sizeof(mychannel->exten) - 1);
 	strncpy(mychannel->context, myrpt->ourcontext, sizeof(mychannel->context) - 1);
 	if (myrpt->acctcode)
-		strncpy(mychannel->accountcode, myrpt->acctcode, sizeof(mychannel->accountcode) - 1);
+		ast_string_field_set(mychannel, accountcode, myrpt->acctcode);
 	mychannel->priority = 1;
 	ast_channel_undefer_dtmf(mychannel);
 	if (ast_pbx_start(mychannel) < 0)

Modified: team/oej/siptransfer/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/team/oej/siptransfer/apps/app_voicemail.c?rev=14415&r1=14414&r2=14415&view=diff
==============================================================================
--- team/oej/siptransfer/apps/app_voicemail.c (original)
+++ team/oej/siptransfer/apps/app_voicemail.c Thu Mar 23 11:55:46 2006
@@ -2207,10 +2207,9 @@
 	DIR *dir;
 	struct dirent *de;
 	char fn[256];
-	char tmp[256]="";
-	char *mb, *cur;
+	char tmp[256];
 	char *context;
-	int ret;
+
 	if (newmsgs)
 		*newmsgs = 0;
 	if (oldmsgs)
@@ -2220,9 +2219,10 @@
 		return 0;
 	if (strchr(mailbox, ',')) {
 		int tmpnew, tmpold;
+		char *mb, *cur;
+
 		ast_copy_string(tmp, mailbox, sizeof(tmp));
 		mb = tmp;
-		ret = 0;
 		while((cur = strsep(&mb, ", "))) {
 			if (!ast_strlen_zero(cur)) {
 				if (messagecount(cur, newmsgs ? &tmpnew : NULL, oldmsgs ? &tmpold : NULL))
@@ -2364,7 +2364,7 @@
 
 static int leave_voicemail(struct ast_channel *chan, char *ext, struct leave_vm_options *options)
 {
-	char txtfile[256];
+	char tmptxtfile[256], txtfile[256];
 	char callerid[256];
 	FILE *txt;
 	int res = 0;
@@ -2561,7 +2561,8 @@
 				
 			/* Store information */
 			snprintf(txtfile, sizeof(txtfile), "%s.txt", fn);
-			txt = fopen(txtfile, "w+");
+			snprintf(tmptxtfile, sizeof(tmptxtfile), "%s.txt.tmp", fn);
+			txt = fopen(tmptxtfile, "w+");
 			if (txt) {
 				get_date(date, sizeof(date));
 				fprintf(txt, 
@@ -2601,6 +2602,7 @@
 			if (txt) {
 				fprintf(txt, "duration=%d\n", duration);
 				fclose(txt);
+				rename(tmptxtfile, txtfile);
 			}
 				
 			if (duration < vmminmessage) {
@@ -3695,13 +3697,15 @@
 				if (!ast_strlen_zero(prefile)) {
 				/* See if we can find a recorded name for this person instead of their extension number */
 					if (ast_fileexists(prefile, NULL, NULL) > 0) {
-						ast_verbose(VERBOSE_PREFIX_3 "Playing envelope info: CID number '%s' matches mailbox number, playing recorded name\n", callerid);
+						if (option_verbose > 2)
+							ast_verbose(VERBOSE_PREFIX_3 "Playing envelope info: CID number '%s' matches mailbox number, playing recorded name\n", callerid);
 						if (!callback)
 							res = wait_file2(chan, vms, "vm-from");
 						res = ast_streamfile(chan, prefile, chan->language) > -1;
 						res = ast_waitstream(chan, "");
 					} else {
-						ast_verbose(VERBOSE_PREFIX_3 "Playing envelope info: message from '%s'\n", callerid);
+						if (option_verbose > 2)
+							ast_verbose(VERBOSE_PREFIX_3 "Playing envelope info: message from '%s'\n", callerid);
 						/* BB: Say "from extension" as one saying to sound smoother */
 						if (!callback)
 							res = wait_file2(chan, vms, "vm-from-extension");
@@ -5354,7 +5358,8 @@
 					cmd = 't';
 					break;
 				case '2': /* Callback */
-					ast_verbose( VERBOSE_PREFIX_3 "Callback Requested\n");
+					if (option_verbose > 2)
+						ast_verbose( VERBOSE_PREFIX_3 "Callback Requested\n");
 					if (!ast_strlen_zero(vmu->callback) && vms.lastmsg > -1) {
 						cmd = advanced_options(chan, vmu, &vms, vms.curmsg, 2, record_gain);
 						if (cmd == 9) {
@@ -5948,6 +5953,8 @@
 	char *fmt;
 	char *astemail;
  	char *astmailcmd = SENDMAIL;
+	char *astforcename;
+	char *astforcegreet;
 	char *s,*q,*stringp;
 	char *dialoutcxt = NULL;
 	char *callbackcxt = NULL;	
@@ -6119,14 +6126,14 @@
 		}
 
 		/* Force new user to record name ? */
-		if (!(astattach = ast_variable_retrieve(cfg, "general", "forcename"))) 
-			astattach = "no";
-		ast_set2_flag((&globalflags), ast_true(astattach), VM_FORCENAME);
+		if (!(astforcename = ast_variable_retrieve(cfg, "general", "forcename"))) 
+			astforcename = "no";
+		ast_set2_flag((&globalflags), ast_true(astforcename), VM_FORCENAME);
 
 		/* Force new user to record greetings ? */
-		if (!(astattach = ast_variable_retrieve(cfg, "general", "forcegreetings"))) 
-			astattach = "no";
-		ast_set2_flag((&globalflags), ast_true(astattach), VM_FORCEGREET);
+		if (!(astforcegreet = ast_variable_retrieve(cfg, "general", "forcegreetings"))) 
+			astforcegreet = "no";
+		ast_set2_flag((&globalflags), ast_true(astforcegreet), VM_FORCEGREET);
 
 		if ((s = ast_variable_retrieve(cfg, "general", "cidinternalcontexts"))){
 			ast_log(LOG_DEBUG,"VM_CID Internal context string: %s\n",s);
@@ -6439,7 +6446,8 @@
 	int retries = 0;
 
 	if (!num) {
-		ast_verbose( VERBOSE_PREFIX_3 "Destination number will be entered manually\n");
+		if (option_verbose > 2)
+			ast_verbose( VERBOSE_PREFIX_3 "Destination number will be entered manually\n");
 		while (retries < 3 && cmd != 't') {
 			destination[1] = '\0';
 			destination[0] = cmd = ast_play_and_wait(chan,"vm-enter-num-to-call");
@@ -6459,7 +6467,8 @@
 				if (cmd < 0)
 					return 0;
 				if (cmd == '*') {
-					ast_verbose( VERBOSE_PREFIX_3 "User hit '*' to cancel outgoing call\n");
+					if (option_verbose > 2)
+						ast_verbose( VERBOSE_PREFIX_3 "User hit '*' to cancel outgoing call\n");
 					return 0;
 				}
 				if ((cmd = ast_readstring(chan,destination + strlen(destination),sizeof(destination)-1,6000,10000,"#")) < 0) 
@@ -6473,14 +6482,16 @@
 		}
 		
 	} else {
-		ast_verbose( VERBOSE_PREFIX_3 "Destination number is CID number '%s'\n", num);
+		if (option_verbose > 2)
+			ast_verbose( VERBOSE_PREFIX_3 "Destination number is CID number '%s'\n", num);
 		ast_copy_string(destination, num, sizeof(destination));
 	}
 
 	if (!ast_strlen_zero(destination)) {
 		if (destination[strlen(destination) -1 ] == '*')
 			return 0; 
-		ast_verbose( VERBOSE_PREFIX_3 "Placing outgoing call to extension '%s' in context '%s' from context '%s'\n", destination, outgoing_context, chan->context);
+		if (option_verbose > 2)
+			ast_verbose( VERBOSE_PREFIX_3 "Placing outgoing call to extension '%s' in context '%s' from context '%s'\n", destination, outgoing_context, chan->context);
 		ast_copy_string(chan->exten, destination, sizeof(chan->exten));
 		ast_copy_string(chan->context, outgoing_context, sizeof(chan->context));
 		chan->priority = 0;
@@ -6551,7 +6562,8 @@
 							if (res)
 								return 9;
 						} else {
-							ast_verbose( VERBOSE_PREFIX_3 "Caller can not specify callback number - no dialout context available\n");
+							if (option_verbose > 2)
+								ast_verbose( VERBOSE_PREFIX_3 "Caller can not specify callback number - no dialout context available\n");
 							res = ast_play_and_wait(chan, "vm-sorry");
 						}
 						return res;
@@ -6572,7 +6584,8 @@
 						break;
 					default:
 						if (num) {
-							ast_verbose( VERBOSE_PREFIX_3 "Confirm CID number '%s' is number to use for callback\n", num);
+							if (option_verbose > 2)
+								ast_verbose( VERBOSE_PREFIX_3 "Confirm CID number '%s' is number to use for callback\n", num);
 							res = ast_play_and_wait(chan, "vm-num-i-have");
 							if (!res)
 								res = play_message_callerid(chan, vms, num, vmu->context, 1);
@@ -6614,7 +6627,8 @@
 		if (!ast_strlen_zero(cid)) {
 			ast_callerid_parse(cid, &name, &num);
 			if (!num) {
-				ast_verbose(VERBOSE_PREFIX_3 "No CID number available, no reply sent\n");
+				if (option_verbose > 2)
+					ast_verbose(VERBOSE_PREFIX_3 "No CID number available, no reply sent\n");
 				if (!res)
 					res = ast_play_and_wait(chan, "vm-nonumber");
 				return res;
@@ -6622,7 +6636,8 @@
 				if (find_user(NULL, vmu->context, num)) {
 					struct leave_vm_options leave_options;
 
-					ast_verbose(VERBOSE_PREFIX_3 "Leaving voicemail for '%s' in context '%s'\n", num, vmu->context);
+					if (option_verbose > 2)
+						ast_verbose(VERBOSE_PREFIX_3 "Leaving voicemail for '%s' in context '%s'\n", num, vmu->context);
 					
 					memset(&leave_options, 0, sizeof(leave_options));
 					leave_options.record_gain = record_gain;
@@ -6632,7 +6647,8 @@
 					return res;
 				} else {
 					/* Sender has no mailbox, can't reply */
-					ast_verbose( VERBOSE_PREFIX_3 "No mailbox number '%s' in context '%s', no reply sent\n", num, vmu->context);
+					if (option_verbose > 2)
+						ast_verbose( VERBOSE_PREFIX_3 "No mailbox number '%s' in context '%s', no reply sent\n", num, vmu->context);
 					ast_play_and_wait(chan, "vm-nobox");
 					res = 't';
 					return res;
@@ -6683,7 +6699,8 @@
  				break;
  			} else {
  				/* Otherwise 1 is to save the existing message */
- 				ast_verbose(VERBOSE_PREFIX_3 "Saving message as is\n");
+ 				if (option_verbose > 2)
+					ast_verbose(VERBOSE_PREFIX_3 "Saving message as is\n");
  				ast_streamfile(chan, "vm-msgsaved", chan->language);
  				ast_waitstream(chan, "");
 				STORE(recordfile, vmu->mailbox, vmu->context, -1);
@@ -6693,17 +6710,21 @@
  			}
  		case '2':
  			/* Review */
- 			ast_verbose(VERBOSE_PREFIX_3 "Reviewing the message\n");
+ 			if (option_verbose > 2)
+				ast_verbose(VERBOSE_PREFIX_3 "Reviewing the message\n");
  			ast_streamfile(chan, recordfile, chan->language);
  			cmd = ast_waitstream(chan, AST_DIGIT_ANY);
  			break;
  		case '3':
  			message_exists = 0;
  			/* Record */
- 			if (recorded == 1)
-				ast_verbose(VERBOSE_PREFIX_3 "Re-recording the message\n");
- 			else	
-				ast_verbose(VERBOSE_PREFIX_3 "Recording the message\n");
+ 			if (recorded == 1) {
+				if (option_verbose > 2)
+					ast_verbose(VERBOSE_PREFIX_3 "Re-recording the message\n");
+ 			} else {	
+				if (option_verbose > 2)
+					ast_verbose(VERBOSE_PREFIX_3 "Recording the message\n");
+			}
 			if (recorded && outsidecaller) {
  				cmd = ast_play_and_wait(chan, INTRO);
  				cmd = ast_play_and_wait(chan, "beep");
@@ -6727,14 +6748,16 @@
 #if 0			
  			else if (vmu->review && (*duration < 5)) {
  				/* Message is too short */
- 				ast_verbose(VERBOSE_PREFIX_3 "Message too short\n");
+ 				if (option_verbose > 2)
+					ast_verbose(VERBOSE_PREFIX_3 "Message too short\n");
 				cmd = ast_play_and_wait(chan, "vm-tooshort");
  				cmd = vm_delete(recordfile);
  				break;
  			}
  			else if (vmu->review && (cmd == 2 && *duration < (maxsilence + 3))) {
  				/* Message is all silence */
- 				ast_verbose(VERBOSE_PREFIX_3 "Nothing recorded\n");
+ 				if (option_verbose > 2)
+					ast_verbose(VERBOSE_PREFIX_3 "Nothing recorded\n");
  				cmd = vm_delete(recordfile);
 				cmd = ast_play_and_wait(chan, "vm-nothingrecorded");
 				if (!cmd)

Modified: team/oej/siptransfer/ast_expr2.c
URL: http://svn.digium.com/view/asterisk/team/oej/siptransfer/ast_expr2.c?rev=14415&r1=14414&r2=14415&view=diff
==============================================================================
--- team/oej/siptransfer/ast_expr2.c (original)
+++ team/oej/siptransfer/ast_expr2.c Thu Mar 23 11:55:46 2006
@@ -1,7 +1,7 @@
-/* A Bison parser, made by GNU Bison 2.0.  */
+/* A Bison parser, made by GNU Bison 2.1.  */
 
 /* Skeleton parser for Yacc-like parsing with Bison,
-   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -15,8 +15,8 @@
 
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.  */
+   Foundation, Inc., 51 Franklin Street, Fifth Floor,
+   Boston, MA 02110-1301, USA.  */
 
 /* As a special exception, when this file is copied by Bison into a
    Bison output file, you may use that output file without restriction.
@@ -35,6 +35,9 @@
 
 /* Identify Bison output.  */
 #define YYBISON 1
+
+/* Bison version.  */
+#define YYBISON_VERSION "2.1"
 
 /* Skeleton name.  */
 #define YYSKELETON_NAME "yacc.c"
@@ -84,6 +87,7 @@
      TOKEN = 278
    };
 #endif
+/* Tokens.  */
 #define TOK_COLONCOLON 258
 #define TOK_COND 259
 #define TOK_OR 260
@@ -142,10 +146,10 @@
 #include <asterisk/ast_expr.h>
 #include <asterisk/logger.h>
 
-#ifdef LONG_LONG_MIN
+#if defined(LONG_LONG_MIN) && !defined(QUAD_MIN)
 #define QUAD_MIN LONG_LONG_MIN
 #endif
-#ifdef LONG_LONG_MAX
+#if defined(LONG_LONG_MAX) && !defined(QUAD_MAX)
 #define QUAD_MAX LONG_LONG_MAX
 #endif
 
@@ -258,13 +262,18 @@
 # define YYERROR_VERBOSE 0
 #endif
 
+/* Enabling the token table.  */
+#ifndef YYTOKEN_TABLE
+# define YYTOKEN_TABLE 0
+#endif
+
 #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
 #line 142 "ast_expr2.y"
 typedef union YYSTYPE {
 	struct val *val;
 } YYSTYPE;
-/* Line 190 of yacc.c.  */
-#line 268 "ast_expr2.c"
+/* Line 196 of yacc.c.  */
+#line 277 "ast_expr2.c"
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
 # define YYSTYPE_IS_DECLARED 1
 # define YYSTYPE_IS_TRIVIAL 1
@@ -290,17 +299,36 @@
 extern int		ast_yylex __P((YYSTYPE *, YYLTYPE *, yyscan_t));
 
 
-/* Line 213 of yacc.c.  */
-#line 295 "ast_expr2.c"
+/* Line 219 of yacc.c.  */
+#line 304 "ast_expr2.c"
+
+#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
+# define YYSIZE_T __SIZE_TYPE__
+#endif
+#if ! defined (YYSIZE_T) && defined (size_t)
+# define YYSIZE_T size_t
+#endif
+#if ! defined (YYSIZE_T) && (defined (__STDC__) || defined (__cplusplus))
+# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+# define YYSIZE_T size_t
+#endif
+#if ! defined (YYSIZE_T)
+# define YYSIZE_T unsigned int
+#endif
+
+#ifndef YY_
+# if YYENABLE_NLS
+#  if ENABLE_NLS
+#   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
+#   define YY_(msgid) dgettext ("bison-runtime", msgid)
+#  endif
+# endif
+# ifndef YY_
+#  define YY_(msgid) msgid
+# endif
+#endif
 
 #if ! defined (yyoverflow) || YYERROR_VERBOSE
-
-# ifndef YYFREE
-#  define YYFREE free
-# endif
-# ifndef YYMALLOC
-#  define YYMALLOC malloc
-# endif
 
 /* The parser invokes alloca or malloc; define the necessary symbols.  */
 
@@ -310,6 +338,10 @@
 #    define YYSTACK_ALLOC __builtin_alloca
 #   else
 #    define YYSTACK_ALLOC alloca
+#    if defined (__STDC__) || defined (__cplusplus)

[... 6796 lines stripped ...]


More information about the asterisk-commits mailing list