[asterisk-commits] oej: branch oej/videocaps r101148 - in /team/oej/videocaps: ./ apps/ build_to...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jan 30 02:40:55 CST 2008


Author: oej
Date: Wed Jan 30 02:40:51 2008
New Revision: 101148

URL: http://svn.digium.com/view/asterisk?view=rev&rev=101148
Log:
Reset resolve go

Added:
    team/oej/videocaps/channels/chan_vpb.cc
      - copied unchanged from r101126, trunk/channels/chan_vpb.cc
    team/oej/videocaps/configs/vpb.conf.sample
      - copied unchanged from r101126, trunk/configs/vpb.conf.sample
Modified:
    team/oej/videocaps/   (props changed)
    team/oej/videocaps/CHANGES
    team/oej/videocaps/Makefile
    team/oej/videocaps/apps/app_queue.c
    team/oej/videocaps/apps/app_speech_utils.c
    team/oej/videocaps/apps/app_voicemail.c
    team/oej/videocaps/build_tools/make_version
    team/oej/videocaps/build_tools/menuselect-deps.in
    team/oej/videocaps/channels/Makefile
    team/oej/videocaps/channels/chan_misdn.c
    team/oej/videocaps/channels/chan_sip.c
    team/oej/videocaps/channels/chan_zap.c
    team/oej/videocaps/channels/misdn_config.c
    team/oej/videocaps/configure
    team/oej/videocaps/configure.ac
    team/oej/videocaps/doc/tex/channelvariables.tex
    team/oej/videocaps/include/asterisk/autoconfig.h.in
    team/oej/videocaps/main/Makefile
    team/oej/videocaps/main/pbx.c
    team/oej/videocaps/makeopts.in
    team/oej/videocaps/res/res_config_curl.c

Propchange: team/oej/videocaps/
------------------------------------------------------------------------------
    automerge = http://www.codename-pineapple.org/

Propchange: team/oej/videocaps/
------------------------------------------------------------------------------
Binary property 'branch-1.4-blocked' - no diff available.

Propchange: team/oej/videocaps/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Propchange: team/oej/videocaps/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed Jan 30 02:40:51 2008
@@ -1,1 +1,1 @@
-/trunk:1-100660
+/trunk:1-101147

Modified: team/oej/videocaps/CHANGES
URL: http://svn.digium.com/view/asterisk/team/oej/videocaps/CHANGES?view=diff&rev=101148&r1=101147&r2=101148
==============================================================================
--- team/oej/videocaps/CHANGES (original)
+++ team/oej/videocaps/CHANGES Wed Jan 30 02:40:51 2008
@@ -467,6 +467,8 @@
      backend functionality.
   * Added a new module, res_config_ldap, which permits the use of an LDAP
      server for realtime data access.
+  * Added support for writing and running your dialplan in lua using the pbx_lua
+     module.  See configs/extensions.lua.sample for examples of how to do this.
 
 Miscellaneous 
 -------------
@@ -486,8 +488,6 @@
      will now be available in the failed extension using the REASON dialplan variable.
   * Added support for reading the TOUCH_MONITOR_PREFIX channel variable.
      It allows you to configure a prefix for auto-monitor recordings.
-  * Added support for writing and running your dialplan in lua.  See
-     configs/extensions.lua.sample for examples of how to do this.
   * A new extension pattern matching algorithm, based on a trie, is introduced
      here, that could noticeably speed up mid-sized to large dialplans.
      It is NOT used by default, as duplicating the behaviour of the old pattern
@@ -502,3 +502,5 @@
   * Added logging to 'make update' command.  See update.log
   * Added strictrtp option to rtp.conf. If enabled this will drop RTP packets that
      do not come from the remote party.
+  * Added the 'n' option to the SpeechBackground application to tell it to not
+     answer the channel if it has not already been answered.

Modified: team/oej/videocaps/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/videocaps/Makefile?view=diff&rev=101148&r1=101147&r2=101148
==============================================================================
--- team/oej/videocaps/Makefile (original)
+++ team/oej/videocaps/Makefile Wed Jan 30 02:40:51 2008
@@ -108,7 +108,9 @@
 #Uncomment this to see all build commands instead of 'quiet' output
 #NOISY_BUILD=yes
 
-ASTTOPDIR:=$(CURDIR)
+empty:=
+space:=$(empty) $(empty)
+ASTTOPDIR:=$(subst $(space),\$(space),$(CURDIR))
 
 # Overwite config files on "make samples"
 OVERWRITE=y

Modified: team/oej/videocaps/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/team/oej/videocaps/apps/app_queue.c?view=diff&rev=101148&r1=101147&r2=101148
==============================================================================
--- team/oej/videocaps/apps/app_queue.c (original)
+++ team/oej/videocaps/apps/app_queue.c Wed Jan 30 02:40:51 2008
@@ -1555,8 +1555,7 @@
 	char *interface = NULL;
 	struct ao2_iterator mem_iter;
 
-	member_config = ast_load_realtime_multientry("queue_members", "interface LIKE", "%", "queue_name", q->name , NULL);
-	if (!member_config) {
+	if (!(member_config = ast_load_realtime_multientry("queue_members", "interface LIKE", "%", "queue_name", q->name , NULL))) {
 		/*This queue doesn't have realtime members*/
 		ast_debug(3, "Queue %s has no realtime members defined. No need for update\n", q->name);
 		return;
@@ -1591,6 +1590,7 @@
 		ao2_ref(m, -1);
 	}
 	ao2_unlock(q);
+	ast_config_destroy(member_config);
 }
 
 static int join_queue(char *queuename, struct queue_ent *qe, enum queue_result *reason)
@@ -4007,7 +4007,7 @@
 	if (set_member_paused(args.queuename, args.interface, args.reason, 1)) {
 		ast_log(LOG_WARNING, "Attempt to pause interface %s, not found\n", args.interface);
 		pbx_builtin_setvar_helper(chan, "PQMSTATUS", "NOTFOUND");
-		return -1;
+		return 0;
 	}
 
 	pbx_builtin_setvar_helper(chan, "PQMSTATUS", "PAUSED");
@@ -4042,7 +4042,7 @@
 	if (set_member_paused(args.queuename, args.interface, args.reason, 0)) {
 		ast_log(LOG_WARNING, "Attempt to unpause interface %s, not found\n", args.interface);
 		pbx_builtin_setvar_helper(chan, "UPQMSTATUS", "NOTFOUND");
-		return -1;
+		return 0;
 	}
 
 	pbx_builtin_setvar_helper(chan, "UPQMSTATUS", "UNPAUSED");

Modified: team/oej/videocaps/apps/app_speech_utils.c
URL: http://svn.digium.com/view/asterisk/team/oej/videocaps/apps/app_speech_utils.c?view=diff&rev=101148&r1=101147&r2=101148
==============================================================================
--- team/oej/videocaps/apps/app_speech_utils.c (original)
+++ team/oej/videocaps/apps/app_speech_utils.c Wed Jan 30 02:40:51 2008
@@ -56,15 +56,17 @@
 "fed to it. This has no arguments.\n";
 
 static char *speechbackground_descrip =
-"  SpeechBackground(Sound File,Timeout):\n"
+"  SpeechBackground(<Sound File>[,Timeout[,options]]):\n"
 "This application plays a sound file and waits for the person to speak. Once they start speaking playback\n"
 "of the file stops, and silence is heard. Once they stop talking the processing sound is played to indicate\n"
 "the speech recognition engine is working. Once results are available the application returns and results \n"
 "(score and text) are available using dialplan functions.\n"
-"The first text and score are ${SPEECH_TEXT(0)} AND ${SPEECH_SCORE(0)} while the second are ${SPEECH_TEXT(1)}\n"
+"  The first text and score are ${SPEECH_TEXT(0)} AND ${SPEECH_SCORE(0)} while the second are ${SPEECH_TEXT(1)}\n"
 "and ${SPEECH_SCORE(1)}.\n"
-"The first argument is the sound file and the second is the timeout integer in seconds. Note the timeout will\n"
-"only start once the sound file has stopped playing.\n";
+"  The first argument is the sound file and the second is the timeout integer in seconds. Note the timeout will\n"
+"only start once the sound file has stopped playing. The third argument specifies options:\n"
+"  Valid Options:\n"
+"    n - Don't answer the channel if it has not already been answered.\n";
 
 static char *speechdeactivategrammar_descrip =
 "  SpeechDeactivateGrammar(Grammar Name):\n"
@@ -487,6 +489,14 @@
 	return 0;
 }
 
+enum {
+	SB_OPT_NOANSWER = (1 << 0),
+};
+
+AST_APP_OPTIONS(speech_background_options, BEGIN_OPTIONS
+	AST_APP_OPTION('n', SB_OPT_NOANSWER),
+END_OPTIONS );
+
 /*! \brief SpeechBackground(Sound File,Timeout) Dialplan Application */
 static int speech_background(struct ast_channel *chan, void *data)
 {
@@ -500,9 +510,11 @@
 	struct ast_datastore *datastore = NULL;
 	char *parse, *filename_tmp = NULL, *filename = NULL, tmp[2] = "", dtmf_terminator = '#';
 	const char *tmp2 = NULL;
+	struct ast_flags options = { 0 };
 	AST_DECLARE_APP_ARGS(args,
 		AST_APP_ARG(soundfile);
 		AST_APP_ARG(timeout);
+		AST_APP_ARG(options);
 	);
 
 	parse = ast_strdupa(data);
@@ -511,9 +523,16 @@
 	if (speech == NULL)
 		return -1;
 
+	if (!ast_strlen_zero(args.options)) {
+		char *options_buf = ast_strdupa(args.options);
+		ast_app_parse_options(speech_background_options, &options, NULL, options_buf);
+	}
+
 	/* If channel is not already answered, then answer it */
-	if (chan->_state != AST_STATE_UP && ast_answer(chan))
-		return -1;
+	if (chan->_state != AST_STATE_UP && !ast_test_flag(&options, SB_OPT_NOANSWER)
+		&& ast_answer(chan)) {
+			return -1;
+	}
 
 	/* Record old read format */
 	oldreadformat = chan->readformat;

Modified: team/oej/videocaps/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/team/oej/videocaps/apps/app_voicemail.c?view=diff&rev=101148&r1=101147&r2=101148
==============================================================================
--- team/oej/videocaps/apps/app_voicemail.c (original)
+++ team/oej/videocaps/apps/app_voicemail.c Wed Jan 30 02:40:51 2008
@@ -2244,36 +2244,55 @@
 	return ast_strftime(s, len, "%a %b %e %r UTC %Y", &tm);
 }
 
-static int invent_message(struct ast_channel *chan, char *context, char *ext, int busy, char *ecodes)
+static int play_greeting(struct ast_channel *chan, struct ast_vm_user *vmu, char *filename, char *ecodes)
+{
+	int res = -2;
+	
+#ifdef ODBC_STORAGE
+	int success = 
+#endif
+	RETRIEVE(filename, -1, vmu->mailbox, vmu->context);
+	if (ast_fileexists(filename, NULL, NULL) > 0) {
+		res = ast_streamfile(chan, filename, chan->language);
+		if (res > -1) 
+			res = ast_waitstream(chan, ecodes);
+#ifdef ODBC_STORAGE
+		if (success == -1) {
+			/* We couldn't retrieve the file from the database, but we found it on the file system. Let's put it in the database. */
+			ast_debug(1, "Greeting not retrieved from database, but found in file storage. Inserting into database\n");
+			store_file(filename, vmu->mailbox, vmu->context, -1);
+		}
+#endif
+	}
+	DISPOSE(filename, -1);
+
+	return res;
+}
+
+static int invent_message(struct ast_channel *chan, struct ast_vm_user *vmu, char *ext, int busy, char *ecodes)
 {
 	int res;
 	char fn[PATH_MAX];
 	char dest[PATH_MAX];
 
-	snprintf(fn, sizeof(fn), "%s%s/%s/greet", VM_SPOOL_DIR, context, ext);
-
-	if ((res = create_dirpath(dest, sizeof(dest), context, ext, ""))) {
+	snprintf(fn, sizeof(fn), "%s%s/%s/greet", VM_SPOOL_DIR, vmu->context, ext);
+
+	if ((res = create_dirpath(dest, sizeof(dest), vmu->context, ext, ""))) {
 		ast_log(LOG_WARNING, "Failed to make directory(%s)\n", fn);
 		return -1;
 	}
 
-	RETRIEVE(fn, -1, ext, context);
-	if (ast_fileexists(fn, NULL, NULL) > 0) {
-		res = ast_stream_and_wait(chan, fn, ecodes);
-		if (res) {
-			DISPOSE(fn, -1);
-			return res;
-		}
-	} else {
-		/* Dispose just in case */
-		DISPOSE(fn, -1);
+	res = play_greeting(chan, vmu, fn, ecodes);
+	if (res == -2) {
+		/* File did not exist */
 		res = ast_stream_and_wait(chan, "vm-theperson", ecodes);
 		if (res)
 			return res;
 		res = ast_say_digit_str(chan, ext, ecodes, chan->language);
-		if (res)
-			return res;
-	}
+	}
+	if (res)
+		return res;
+
 	res = ast_stream_and_wait(chan, busy ? "vm-isonphone" : "vm-isunavail", ecodes);
 	return res;
 }
@@ -3100,25 +3119,12 @@
 
 	/* Play the beginning intro if desired */
 	if (!ast_strlen_zero(prefile)) {
-#ifdef ODBC_STORAGE
-		int success = 
-#endif
-			RETRIEVE(prefile, -1, ext, context);
-		if (ast_fileexists(prefile, NULL, NULL) > 0) {
-			if (ast_streamfile(chan, prefile, chan->language) > -1) 
-				res = ast_waitstream(chan, ecodes);
-#ifdef ODBC_STORAGE
-			if (success == -1) {
-				/* We couldn't retrieve the file from the database, but we found it on the file system. Let's put it in the database. */
-				ast_debug(1, "Greeting not retrieved from database, but found in file storage. Inserting into database\n");
-				store_file(prefile, vmu->mailbox, vmu->context, -1);
-			}
-#endif
-		} else {
+		res = play_greeting(chan, vmu, prefile, ecodes);
+		if (res == -2) {
+			/* The file did not exist */
 			ast_debug(1, "%s doesn't exist, doing what we can\n", prefile);
-			res = invent_message(chan, vmu->context, ext, ast_test_flag(options, OPT_BUSY_GREETING), ecodes);
-		}
-		DISPOSE(prefile, -1);
+			res = invent_message(chan, vmu, ext, ast_test_flag(options, OPT_BUSY_GREETING), ecodes);
+		}
 		if (res < 0) {
 			ast_debug(1, "Hang up during prefile playback\n");
 			free_user(vmu);

Modified: team/oej/videocaps/build_tools/make_version
URL: http://svn.digium.com/view/asterisk/team/oej/videocaps/build_tools/make_version?view=diff&rev=101148&r1=101147&r2=101148
==============================================================================
--- team/oej/videocaps/build_tools/make_version (original)
+++ team/oej/videocaps/build_tools/make_version Wed Jan 30 02:40:51 2008
@@ -19,6 +19,12 @@
 
     for PART in $PARTS ; do
       if [ ${TAG} != 0 ] ; then
+	  if [ "${PART}" = "autotag_for_be" ] ; then
+	      continue
+	  fi
+	  if [ "${PART}" = "autotag_for_sx00i" ] ; then
+	      continue
+	  fi
 	  RESULT="${PART}"
 	  break
       fi

Modified: team/oej/videocaps/build_tools/menuselect-deps.in
URL: http://svn.digium.com/view/asterisk/team/oej/videocaps/build_tools/menuselect-deps.in?view=diff&rev=101148&r1=101147&r2=101148
==============================================================================
--- team/oej/videocaps/build_tools/menuselect-deps.in (original)
+++ team/oej/videocaps/build_tools/menuselect-deps.in Wed Jan 30 02:40:51 2008
@@ -40,6 +40,7 @@
 UNIXODBC=@PBX_UNIXODBC@
 USB=@PBX_USB@
 VORBIS=@PBX_VORBIS@
+VPBAPI=@PBX_VPB@
 WINARCH=@WINARCH@
 ZAPTEL=@PBX_ZAPTEL@
 ZAPTEL_TRANSCODE=@PBX_ZAPTEL_TRANSCODE@

Modified: team/oej/videocaps/channels/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/videocaps/channels/Makefile?view=diff&rev=101148&r1=101147&r2=101148
==============================================================================
--- team/oej/videocaps/channels/Makefile (original)
+++ team/oej/videocaps/channels/Makefile Wed Jan 30 02:40:51 2008
@@ -100,4 +100,6 @@
 
 $(if $(filter chan_misdn,$(EMBEDDED_MODS)),modules.link,chan_misdn.so): misdn_config.o misdn/isdn_lib.o misdn/isdn_msg_parser.o
 
+chan_vpb.oo: ASTCFLAGS:=$(filter-out -Wdeclaration-after-statement,$(ASTCFLAGS))
+
 $(if $(filter chan_oss,$(EMBEDDED_MODS)),modules.link,chan_oss.so): console_video.o vgrabbers.o console_board.o

Modified: team/oej/videocaps/channels/chan_misdn.c
URL: http://svn.digium.com/view/asterisk/team/oej/videocaps/channels/chan_misdn.c?view=diff&rev=101148&r1=101147&r2=101148
==============================================================================
--- team/oej/videocaps/channels/chan_misdn.c (original)
+++ team/oej/videocaps/channels/chan_misdn.c Wed Jan 30 02:40:51 2008
@@ -1251,10 +1251,19 @@
 	help = cl_te;
   
 	ast_cli(a->fd, "Channel List: %p\n", cl_te); 
-  
+
 	for (; help; help = help->next) {
 		struct misdn_bchannel *bc = help->bc;   
 		struct ast_channel *ast = help->ast;
+		if (!ast) {
+			if (!bc) {
+				ast_cli(a->fd, "chan_list obj. with l3id:%x has no bc and no ast Leg\n", help->l3id);
+				continue;
+			}
+			ast_cli(a->fd, "bc with pid:%d has no Ast Leg\n", bc->pid);
+			continue;
+		}
+
 		if (misdn_debug[0] > 2)
 			ast_cli(a->fd, "Bc:%p Ast:%p\n", bc, ast);
 		if (bc) {
@@ -4163,6 +4172,7 @@
 			/*  sending INFOS as DTMF-Frames :) */
 			struct ast_frame fr;
 			int digits;
+			memset(&fr, 0, sizeof(fr));
 			fr.frametype = AST_FRAME_DTMF;
 			fr.subclass = bc->info_dad[0] ;
 			fr.src = NULL;

Modified: team/oej/videocaps/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/oej/videocaps/channels/chan_sip.c?view=diff&rev=101148&r1=101147&r2=101148
==============================================================================
--- team/oej/videocaps/channels/chan_sip.c (original)
+++ team/oej/videocaps/channels/chan_sip.c Wed Jan 30 02:40:51 2008
@@ -978,6 +978,7 @@
 #define SIP_PAGE2_RTCACHEFRIENDS	(1 << 0)	/*!< GP: Should we keep RT objects in memory for extended time? */
 #define SIP_PAGE2_RTAUTOCLEAR		(1 << 2)	/*!< GP: Should we clean memory from peers after expiry? */
 /* Space for addition of other realtime flags in the future */
+#define SIP_PAGE2_STATECHANGEQUEUE	(1 << 9)	/*!< D: Unsent state pending change exists */
 
 #define SIP_PAGE2_VIDEOSUPPORT		(1 << 14)	/*!< DP: Video supported if offered? */
 #define SIP_PAGE2_TEXTSUPPORT		(1 << 15)	/*!< GDP: Global text enable */
@@ -1285,7 +1286,7 @@
 	int noncecount;				/*!< Nonce-count */
 	char lastmsg[256];			/*!< Last Message sent/received */
 	int amaflags;				/*!< AMA Flags */
-	int pendinginvite;			/*!< Any pending invite ? (seqno of this) */
+	int pendinginvite;			/*!< Any pending INVITE or state NOTIFY (in subscribe pvt's) ? (seqno of this) */
 	struct sip_request initreq;		/*!< Latest request that opened a new transaction
 							within this dialog.
 							NOT the request that opened the dialog
@@ -1687,6 +1688,12 @@
 		(head) = (element)->next;	\
 	} while (0)
 
+enum t38_action_flag {
+	SDP_T38_NONE = 0, /*!< Do not modify T38 information at all */
+	SDP_T38_INITIATE, /*!< Remote side has requested T38 with us */
+	SDP_T38_ACCEPT,   /*!< Remote side accepted our T38 request */
+};
+
 /*---------------------------- Forward declarations of functions in chan_sip.c */
 /*! \note This is added to help splitting up chan_sip.c into several files
 	in coming releases */
@@ -1781,7 +1788,7 @@
 static int find_sdp(struct sip_request *req);
 static int process_h2613_fmtp(const char *fmtstr, struct ast_h2613_video_cap *vidcap, unsigned int framerate);
 static int process_h264_fmtp(const char *fmtstr, struct ast_h264_video_cap *vidcap, int framerate);
-static int process_sdp(struct sip_pvt *p, struct sip_request *req);
+static int process_sdp(struct sip_pvt *p, struct sip_request *req, int t38action);
 static void ast_build_h2613_fmtp(struct ast_str **buf, int rtp_code, struct ast_h2613_video_cap *video_cap);
 static void ast_build_h264_fmtp(struct ast_str **buf, int rtp_code, struct ast_h264_video_cap *video_cap);
 static void add_codec_to_sdp(const struct sip_pvt *p, int codec, int sample_rate,
@@ -6376,7 +6383,7 @@
  	Return 0 on success, a negative value on errors.
 	Must be called after find_sdp().
 */
-static int process_sdp(struct sip_pvt *p, struct sip_request *req)
+static int process_sdp(struct sip_pvt *p, struct sip_request *req, int t38action)
 {
 	const char *m;		/* SDP media offer */
 	const char *c;
@@ -6621,14 +6628,6 @@
 				ast_verbose("Got T.38 offer in SDP in dialog %s\n", p->callid);
 			udptlportno = x;
 			numberofmediastreams++;
-			
-			if (p->owner && p->lastinvite) {
-				p->t38.state = T38_PEER_REINVITE; /* T38 Offered in re-invite from remote party */
-				ast_debug(2, "T38 state changed to %d on channel %s\n", p->t38.state, p->owner ? p->owner->name : "<none>" );
-			} else {
-				p->t38.state = T38_PEER_DIRECT; /* T38 Offered directly from peer in first invite */
-				ast_debug(2, "T38 state changed to %d on channel %s\n", p->t38.state, p->owner ? p->owner->name : "<none>");
-			}
 		} else 
 			ast_log(LOG_WARNING, "Unsupported SDP media type in offer: %s\n", m);
 		if (numberofports > 1)
@@ -6992,10 +6991,24 @@
 				p->t38.capability,
 				p->t38.peercapability,
 				p->t38.jointcapability);
+
+
+		/* Remote party offers T38, we need to update state */
+		if (t38action == SDP_T38_ACCEPT) {
+			if (p->t38.state == T38_LOCAL_DIRECT || p->t38.state == T38_LOCAL_REINVITE)
+				p->t38.state = T38_ENABLED;
+		} else if (t38action == SDP_T38_INITIATE) {
+			if (p->owner && p->lastinvite) {
+				p->t38.state = T38_PEER_REINVITE; /* T38 Offered in re-invite from remote party */
+			} else {
+				p->t38.state = T38_PEER_DIRECT; /* T38 Offered directly from peer in first invite */
+			}
+		}
+		ast_debug(3, "T38 state changed to %d on channel %s\n", p->t38.state, p->owner ? p->owner->name : "<none>");
 	} else {
 		p->t38.state = T38_DISABLED;
-		ast_debug(3, "T38 state changed to %d on channel %s\n", p->t38.state, p->owner ? p->owner->name : "<none>");
-	}
+	}
+
 
   	if(sipdebug_caps) {	
 		ast_verbose("SIP PROCESS SDP: Peercaps: \n");	
@@ -7039,6 +7052,7 @@
 			ast_verbose("\n");
 		}
 	}
+
 
 	/* Now gather all of the codecs that we are asked for: */
 	ast_rtp_get_current_formats(newaudiortp, &peercapability, &peernoncodeccapability);
@@ -9257,6 +9271,8 @@
 	add_header_contentLength(&req, tmp->used);
 	add_line(&req, tmp->str);
 
+	p->pendinginvite = p->ocseq;	/* Remember that we have a pending NOTIFY in order not to confuse the NOTIFY subsystem */
+
 	return send_request(p, &req, XMIT_RELIABLE, p->ocseq);
 }
 
@@ -10497,10 +10513,17 @@
 		p->laststate = state;
 		break;
 	}
-	if (p->subscribed != NONE)	/* Only send state NOTIFY if we know the format */
-		transmit_state_notify(p, state, 1, FALSE);
-
-	ast_verb(2, "Extension Changed %s new state %s for Notify User %s\n", exten, ast_extension_state2str(state), p->username);
+	if (p->subscribed != NONE) {	/* Only send state NOTIFY if we know the format */
+		if (!p->pendinginvite) {
+			transmit_state_notify(p, state, 1, FALSE);
+		} else {
+			/* We already have a NOTIFY sent that is not answered. Queue the state up.
+			   if many state changes happen meanwhile, we will only send a notification of the last one */
+			ast_set_flag(&p->flags[1], SIP_PAGE2_STATECHANGEQUEUE);
+		}
+	}
+	ast_verb(2, "Extension Changed %s[%s] new state %s for Notify User %s %s\n", exten, context, ast_extension_state2str(state), p->username,
+			ast_test_flag(&p->flags[1], SIP_PAGE2_STATECHANGEQUEUE) ? "(queued)" : "");
 
 	sip_pvt_unlock(p);
 
@@ -14819,7 +14842,7 @@
 		if (find_sdp(req)) {
 			if (p->invitestate != INV_CANCELLED)
 				p->invitestate = INV_EARLY_MEDIA;
-			res = process_sdp(p, req);
+			res = process_sdp(p, req, SDP_T38_NONE);
 			if (!req->ignore && p->owner) {
 				/* Queue a progress frame only if we have SDP in 180 or 182 */
 				ast_queue_control(p->owner, AST_CONTROL_PROGRESS);
@@ -14835,7 +14858,7 @@
 		if (find_sdp(req)) {
 			if (p->invitestate != INV_CANCELLED)
 				p->invitestate = INV_EARLY_MEDIA;
-			res = process_sdp(p, req);
+			res = process_sdp(p, req, SDP_T38_NONE);
 			if (!req->ignore && p->owner) {
 				/* Queue a progress frame */
 				ast_queue_control(p->owner, AST_CONTROL_PROGRESS);
@@ -14849,7 +14872,7 @@
 			ast_log(LOG_WARNING, "Unable to cancel SIP destruction.  Expect bad things.\n");
 		p->authtries = 0;
 		if (find_sdp(req)) {
-			if ((res = process_sdp(p, req)) && !req->ignore)
+			if ((res = process_sdp(p, req, SDP_T38_ACCEPT)) && !req->ignore)
 				if (!reinvite)
 					/* This 200 OK's SDP is not acceptable, so we need to ack, then hangup */
 					/* For re-invites, we try to recover */
@@ -14929,10 +14952,6 @@
 					manager_event(EVENT_FLAG_SYSTEM, "ChannelUpdate",
 						"Channel: %s\r\nChanneltype: %s\r\nUniqueid: %s\r\nSIPcallid: %s\r\nSIPfullcontact: %s\r\nPeername: %s\r\n",
 						p->owner->name, p->owner->uniqueid, "SIP", p->callid, p->fullcontact, p->peername);
-				/* Set bridged channel variable */
-				bridgepeer = ast_bridged_channel(p->owner);
-				if (bridgepeer)
-					pbx_builtin_setvar_helper(bridgepeer, "SIP_BRIDGED_CALLID", p->callid);
 			} else {	/* RE-invite */
 				ast_queue_frame(p->owner, &ast_null_frame);
 			}
@@ -15405,6 +15424,10 @@
 		__sip_semi_ack(p, seqno, 0, sipmethod);
 	else
 		__sip_ack(p, seqno, 0, sipmethod);
+
+	/* If this is a NOTIFY for a subscription clear the flag that indicates that we have a NOTIFY pending */
+	if (!p->owner && sipmethod == SIP_NOTIFY && p->pendinginvite) 
+		p->pendinginvite = 0;
 
 	/* Get their tag if we haven't already */
 	if (ast_strlen_zero(p->theirtag) || (resp >= 200)) {
@@ -15464,6 +15487,11 @@
 				} else {
 					if (p->subscribed == NONE) 
 						p->needdestroy = 1;
+					if (ast_test_flag(&p->flags[1], SIP_PAGE2_STATECHANGEQUEUE)) {
+						/* Ready to send the next state we have on queue */
+						ast_clear_flag(&p->flags[1], SIP_PAGE2_STATECHANGEQUEUE);
+						cb_extensionstate((char *)p->context, (char *)p->exten, p->laststate, (void *) p);
+					}
 				}
 			} else if (sipmethod == SIP_REGISTER) 
 				res = handle_response_register(p, resp, rest, req, seqno);
@@ -15655,7 +15683,7 @@
 					if (!req->ignore && sip_cancel_destroy(p))
 						ast_log(LOG_WARNING, "Unable to cancel SIP destruction.  Expect bad things.\n");
 					if (find_sdp(req))
-						process_sdp(p, req);
+						process_sdp(p, req, SDP_T38_NONE);
 					if (p->owner) {
 						/* Queue a progress frame */
 						ast_queue_control(p->owner, AST_CONTROL_PROGRESS);
@@ -16586,7 +16614,7 @@
 			ast_clear_flag(&p->flags[0], SIP_OUTGOING);	/* This is now an inbound dialog */
 			/* Handle SDP here if we already have an owner */
 			if (find_sdp(req)) {
-				if (process_sdp(p, req)) {
+				if (process_sdp(p, req, SDP_T38_INITIATE)) {
 					transmit_response(p, "488 Not acceptable here", req);
 					if (!p->lastinvite)
 						sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT);
@@ -16646,7 +16674,7 @@
 
 		/* We have a succesful authentication, process the SDP portion if there is one */
 		if (find_sdp(req)) {
-			if (process_sdp(p, req)) {
+			if (process_sdp(p, req, SDP_T38_INITIATE)) {
 				/* Unacceptable codecs */
 				transmit_response_reliable(p, "488 Not acceptable here", req);
 				p->invitestate = INV_COMPLETED;	
@@ -18277,7 +18305,7 @@
 			p->pendinginvite = 0;
 			__sip_ack(p, seqno, 1 /* response */, 0);
 			if (find_sdp(req)) {
-				if (process_sdp(p, req))
+				if (process_sdp(p, req, SDP_T38_NONE))
 					return -1;
 			} 
 			check_pendings(p);
@@ -20477,7 +20505,6 @@
 	ourport_tcp = STANDARD_SIP_PORT;
 	ourport_tls = STANDARD_TLS_PORT;
 	bindaddr.sin_port = htons(STANDARD_SIP_PORT);
-	externip.sin_port = htons(STANDARD_SIP_PORT);
 	global_srvlookup = DEFAULT_SRVLOOKUP;
 	global_tos_sip = DEFAULT_TOS_SIP;
 	global_tos_audio = DEFAULT_TOS_AUDIO;
@@ -20775,6 +20802,9 @@
 			if (ast_parse_arg(v->value, PARSE_INADDR, &externip))
 				ast_log(LOG_WARNING, "Invalid address for externip keyword: %s\n", v->value);
 			externexpire = 0;
+			/* If no port was specified use the value of bindport */
+			if (!externip.sin_port)
+				externip.sin_port = bindaddr.sin_port;
 		} else if (!strcasecmp(v->name, "externhost")) {
 			ast_copy_string(externhost, v->value, sizeof(externhost));
 			if (ast_parse_arg(externhost, PARSE_INADDR, &externip))

Modified: team/oej/videocaps/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/team/oej/videocaps/channels/chan_zap.c?view=diff&rev=101148&r1=101147&r2=101148
==============================================================================
--- team/oej/videocaps/channels/chan_zap.c (original)
+++ team/oej/videocaps/channels/chan_zap.c Wed Jan 30 02:40:51 2008
@@ -8533,7 +8533,7 @@
 	return tmp;
 }
 
-static inline int available(struct zt_pvt *p, int channelmatch, int groupmatch, int *busy, int *channelmatched, int *groupmatched)
+static inline int available(struct zt_pvt *p, int channelmatch, ast_group_t groupmatch, int *busy, int *channelmatched, int *groupmatched)
 {
 	int res;
 	ZT_PARAMS par;
@@ -8713,7 +8713,7 @@
 
 static struct ast_channel *zt_request(const char *type, int format, void *data, int *cause)
 {
-	int groupmatch = 0;
+	ast_group_t groupmatch = 0;
 	int channelmatch = -1;
 	int roundrobin = 0;
 	int callwait = 0;
@@ -8756,7 +8756,7 @@
 			ast_log(LOG_WARNING, "Unable to determine group for data %s\n", (char *)data);
 			return NULL;
 		}
-		groupmatch = 1 << x;
+		groupmatch = ((ast_group_t) 1 << x);
 		if (toupper(dest[0]) == 'G') {
 			if (dest[0] == 'G') {
 				backwards = 1;

Modified: team/oej/videocaps/channels/misdn_config.c
URL: http://svn.digium.com/view/asterisk/team/oej/videocaps/channels/misdn_config.c?view=diff&rev=101148&r1=101147&r2=101148
==============================================================================
--- team/oej/videocaps/channels/misdn_config.c (original)
+++ team/oej/videocaps/channels/misdn_config.c Wed Jan 30 02:40:51 2008
@@ -537,7 +537,8 @@
 						ast_copy_string(buf, port_cfg[port][place].str, bufsize);
 					} else if (port_cfg[0][place].str) {
 						ast_copy_string(buf, port_cfg[0][place].str, bufsize);
-					}
+					} else
+						memset(buf, 0, bufsize);
 					break;
 				default:
 					if (port_cfg[port][place].any)

Modified: team/oej/videocaps/configure.ac
URL: http://svn.digium.com/view/asterisk/team/oej/videocaps/configure.ac?view=diff&rev=101148&r1=101147&r2=101148
==============================================================================
--- team/oej/videocaps/configure.ac (original)
+++ team/oej/videocaps/configure.ac Wed Jan 30 02:40:51 2008
@@ -248,6 +248,7 @@
 AST_EXT_LIB_SETUP([TONEZONE], [tonezone], [tonezone])
 AST_EXT_LIB_SETUP([USB], [usb], [usb])
 AST_EXT_LIB_SETUP([VORBIS], [Vorbis], [vorbis])
+AST_EXT_LIB_SETUP([VPB], [Voicetronix API], [vpb])
 AST_EXT_LIB_SETUP([X11], [X11 support], [x11])
 AST_EXT_LIB_SETUP([ZLIB], [zlib], [z])
 AST_EXT_LIB_SETUP([ZAPTEL], [Zaptel], [zaptel])
@@ -1004,6 +1005,50 @@
 
 AST_EXT_LIB_CHECK([VORBIS], [vorbis], [vorbis_info_init], [vorbis/codec.h], [-lm -lvorbisenc])
 
+AC_LANG_PUSH(C++)
+
+if test "${USE_VPB}" != "no"; then
+   AC_MSG_CHECKING(for vpb_open in -lvpb)
+   saved_libs="${LIBS}"
+   saved_cppflags="${CPPFLAGS}"
+   if test "x${VPB_DIR}" != "x"; then
+      if test -d ${VPB_DIR}/lib; then
+         vpblibdir=${VPB_DIR}/lib
+      else
+         vpblibdir=${VPB_DIR}
+      fi
+      LIBS="${LIBS} -L${vpblibdir}"
+      CPPFLAGS="${CPPFLAGS} -I${VPB_DIR}/include"
+   fi
+   LIBS="${LIBS} -lvpb -lpthread"
+   AC_LINK_IFELSE(
+	[
+	AC_LANG_PROGRAM(
+	[#include <vpbapi.h>],
+	[int q = vpb_open(0,0);])
+	],
+	[	AC_MSG_RESULT(yes) 
+		ac_cv_lib_vpb_vpb_open="yes" 
+	],
+	[	AC_MSG_RESULT(no) 
+		ac_cv_lib_vpb_vpb_open="no" 
+	]
+	)
+   LIBS="${saved_libs}"
+   CPPFLAGS="${saved_cppflags}"
+   if test "${ac_cv_lib_vpb_vpb_open}" = "yes"; then
+	VPB_LIB="-lvpb"
+	if test "${VPB_DIR}" != ""; then
+	   VPB_LIB="-L${vpblibdir}  ${VPB_LIB}"
+	   VPB_INCLUDE="-I${VPB_DIR}/include"
+	fi
+	PBX_VPB=1
+	AC_DEFINE([HAVE_VPB], 1, [Define if your system has the VoiceTronix API libraries.])
+   fi
+fi
+
+AC_LANG_POP
+
 AST_EXT_LIB_CHECK([ZLIB], [z], [compress], [zlib.h])
 
 # Check for various zaptel features and locations.

Modified: team/oej/videocaps/doc/tex/channelvariables.tex
URL: http://svn.digium.com/view/asterisk/team/oej/videocaps/doc/tex/channelvariables.tex?view=diff&rev=101148&r1=101147&r2=101148
==============================================================================
--- team/oej/videocaps/doc/tex/channelvariables.tex (original)
+++ team/oej/videocaps/doc/tex/channelvariables.tex Wed Jan 30 02:40:51 2008
@@ -838,6 +838,7 @@
 ${TOUCH_MONITOR_FORMAT}   The audio format to use with Touch Monitor (auto record)
 ${TOUCH_MONITOR_OUTPUT} * Recorded file from Touch Monitor (auto record)
 ${TXTCIDNAME}           * Result of application TXTCIDName
+${VPB_GETDTMF}            chan_vpb
 \end{verbatim}
 
 \subsection{The MeetMe Conference Bridge}

Modified: team/oej/videocaps/include/asterisk/autoconfig.h.in
URL: http://svn.digium.com/view/asterisk/team/oej/videocaps/include/asterisk/autoconfig.h.in?view=diff&rev=101148&r1=101147&r2=101148
==============================================================================
--- team/oej/videocaps/include/asterisk/autoconfig.h.in (original)
+++ team/oej/videocaps/include/asterisk/autoconfig.h.in Wed Jan 30 02:40:51 2008
@@ -992,6 +992,9 @@
 
 /* Define to indicate the ${VORBIS_DESCRIP} library version */
 #undef HAVE_VORBIS_VERSION
+
+/* Define if your system has the VoiceTronix API libraries. */
+#undef HAVE_VPB
 
 /* Define to 1 if you have the `vprintf' function. */
 #undef HAVE_VPRINTF
@@ -1163,6 +1166,9 @@
 #ifndef _POSIX_PTHREAD_SEMANTICS
 # undef _POSIX_PTHREAD_SEMANTICS
 #endif
+#ifndef _TANDEM_SOURCE
+# undef _TANDEM_SOURCE
+#endif
 
 /* Define like PROTOTYPES; this can be used by system headers. */
 #undef __PROTOTYPES

Modified: team/oej/videocaps/main/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/videocaps/main/Makefile?view=diff&rev=101148&r1=101147&r2=101148
==============================================================================
--- team/oej/videocaps/main/Makefile (original)
+++ team/oej/videocaps/main/Makefile Wed Jan 30 02:40:51 2008
@@ -108,11 +108,11 @@
 CHECK_SUBDIR:	# do nothing, just make sure that we recurse in the subdir/
 
 editline/libedit.a: CHECK_SUBDIR
-	cd editline && test -f config.h || CFLAGS="$(PTHREAD_CFLAGS) $(ASTCFLAGS:-Werror=)" LDFLAGS="$(ASTLDFLAGS)" ./configure --build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM) --with-ncurses=$(NCURSES_DIR) --with-curses=$(CURSES_DIR) --with-termcap=$(TERMCAP_DIR) --with-tinfo=$(TINFO_DIR)
+	cd editline && test -f config.h || CFLAGS="$(PTHREAD_CFLAGS) $(subst $(ASTTOPDIR),../../,$(ASTCFLAGS:-Werror=))" LDFLAGS="$(ASTLDFLAGS)" ./configure --build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM) --with-ncurses=$(NCURSES_DIR) --with-curses=$(CURSES_DIR) --with-termcap=$(TERMCAP_DIR) --with-tinfo=$(TINFO_DIR)
 	$(MAKE) -C editline libedit.a
 
 db1-ast/libdb1.a: CHECK_SUBDIR
-	CFLAGS="$(ASTCFLAGS)" LDFLAGS="$(ASTLDFLAGS)" $(MAKE) -C db1-ast libdb1.a
+	CFLAGS="$(subst $(ASTTOPDIR),../../,$(ASTCFLAGS))" LDFLAGS="$(ASTLDFLAGS)" $(MAKE) -C db1-ast libdb1.a
 
 ast_expr2.c ast_expr2.h:
 	bison -o $@ -d --name-prefix=ast_yy ast_expr2.y

Modified: team/oej/videocaps/main/pbx.c
URL: http://svn.digium.com/view/asterisk/team/oej/videocaps/main/pbx.c?view=diff&rev=101148&r1=101147&r2=101148
==============================================================================
--- team/oej/videocaps/main/pbx.c (original)
+++ team/oej/videocaps/main/pbx.c Wed Jan 30 02:40:51 2008
@@ -7032,9 +7032,13 @@
 	if (!res) {
 		if (ast_exists_extension(chan, chan->context, chan->exten, chan->priority + 1, chan->cid.cid_num)) {
 			ast_verb(3, "Timeout on %s, continuing...\n", chan->name);
+		} else if (chan->_softhangup == AST_SOFTHANGUP_TIMEOUT) {
+			if (option_verbose > 2)
+				ast_verbose(VERBOSE_PREFIX_3 "Call timeout on %s, checking for 'T'\n", chan->name);
+			res = -1;
 		} else if (ast_exists_extension(chan, chan->context, "t", 1, chan->cid.cid_num)) {
 			ast_verb(3, "Timeout on %s, going to 't'\n", chan->name);
-			set_ext_pri(chan, "t", 0); /* XXX is the 0 correct ? */
+			set_ext_pri(chan, "t", 0); /* 0 will become 1, next time through the loop */
 		} else {
 			ast_log(LOG_WARNING, "Timeout but no rule 't' in context '%s'\n", chan->context);
 			res = -1;

Modified: team/oej/videocaps/makeopts.in
URL: http://svn.digium.com/view/asterisk/team/oej/videocaps/makeopts.in?view=diff&rev=101148&r1=101147&r2=101148
==============================================================================
--- team/oej/videocaps/makeopts.in (original)
+++ team/oej/videocaps/makeopts.in Wed Jan 30 02:40:51 2008
@@ -195,6 +195,9 @@
 VORBIS_INCLUDE=@VORBIS_INCLUDE@
 VORBIS_LIB=@VORBIS_LIB@
 
+VPBAPI_INCLUDE=@VPB_INCLUDE@
+VPBAPI_LIB=@VPB_LIB@
+
 ZAPTEL_INCLUDE=@ZAPTEL_INCLUDE@
 
 ZLIB_INCLUDE=@ZLIB_INCLUDE@

Modified: team/oej/videocaps/res/res_config_curl.c
URL: http://svn.digium.com/view/asterisk/team/oej/videocaps/res/res_config_curl.c?view=diff&rev=101148&r1=101147&r2=101148
==============================================================================
--- team/oej/videocaps/res/res_config_curl.c (original)
+++ team/oej/videocaps/res/res_config_curl.c Wed Jan 30 02:40:51 2008
@@ -61,7 +61,7 @@
 	char *stringp, *pair, *key;
 	int i;
 	struct ast_variable *var=NULL, *prev=NULL;
-	const int EncodeSpecialChars = 1;
+	const int EncodeSpecialChars = 1, bufsize = 64000;
 	char *buffer;
 
 	if (!ast_custom_function_find("CURL")) {
@@ -72,7 +72,7 @@
 	if (!(query = ast_str_create(1000)))
 		return NULL;
 
-	if (!(buffer = ast_malloc(64000))) {
+	if (!(buffer = ast_malloc(bufsize))) {
 		ast_free(query);
 		return NULL;
 	}
@@ -88,7 +88,7 @@
 	va_end(ap);
 
 	ast_str_append(&query, 0, ")}");
-	pbx_substitute_variables_helper(NULL, query->str, buffer, sizeof(buffer));
+	pbx_substitute_variables_helper(NULL, query->str, buffer, bufsize);
 
 	/* Remove any trailing newline characters */
 	if ((stringp = strchr(buffer, '\r')) || (stringp = strchr(buffer, '\n')))
@@ -131,7 +131,8 @@
 	char buf1[200], buf2[200];
 	const char *newparam, *newval;
 	char *stringp, *line, *pair, *key, *initfield = NULL;
-	int i, EncodeSpecialChars = 1;
+	int i;
+	const int EncodeSpecialChars = 1, bufsize = 256000;
 	struct ast_variable *var=NULL;
 	struct ast_config *cfg=NULL;
 	struct ast_category *cat=NULL;
@@ -145,7 +146,7 @@
 	if (!(query = ast_str_create(1000)))
 		return NULL;
 
-	if (!(buffer = ast_malloc(256000))) {
+	if (!(buffer = ast_malloc(bufsize))) {
 		ast_free(query);
 		return NULL;
 	}
@@ -165,7 +166,7 @@
 	ast_str_append(&query, 0, ")}");
 
 	/* Do the CURL query */
-	pbx_substitute_variables_helper(NULL, query->str, buffer, sizeof(buffer));
+	pbx_substitute_variables_helper(NULL, query->str, buffer, bufsize);
 
 	if (!(cfg = ast_config_new()))
 		goto exit_multi;
@@ -224,7 +225,7 @@
 	const char *newparam, *newval;
 	char *stringp;
 	int i, rowcount = -1;
-	const int EncodeSpecialChars = 1;
+	const int EncodeSpecialChars = 1, bufsize = 100;
 	char *buffer;
 
 	if (!ast_custom_function_find("CURL")) {
@@ -235,7 +236,7 @@
 	if (!(query = ast_str_create(1000)))
 		return -1;
 
-	if (!(buffer = ast_malloc(100))) {
+	if (!(buffer = ast_malloc(bufsize))) {
 		ast_free(query);
 		return -1;
 	}
@@ -253,7 +254,7 @@
 	va_end(ap);
 
 	ast_str_append(&query, 0, ")}");
-	pbx_substitute_variables_helper(NULL, query->str, buffer, sizeof(buffer));
+	pbx_substitute_variables_helper(NULL, query->str, buffer, bufsize);
 
 	/* Line oriented output */
 	stringp = buffer;
@@ -290,7 +291,7 @@
 	const char *newparam, *newval;
 	char *stringp;
 	int i, rowcount = -1;
-	const int EncodeSpecialChars = 1;
+	const int EncodeSpecialChars = 1, bufsize = 100;
 	char *buffer;
 
 	if (!ast_custom_function_find("CURL")) {
@@ -301,7 +302,7 @@
 	if (!(query = ast_str_create(1000)))
 		return -1;
 
-	if (!(buffer = ast_malloc(100))) {
+	if (!(buffer = ast_malloc(bufsize))) {
 		ast_free(query);
 		return -1;
 	}
@@ -317,7 +318,7 @@
 	va_end(ap);
 
 	ast_str_append(&query, 0, ")}");
-	pbx_substitute_variables_helper(NULL, query->str, buffer, sizeof(buffer));
+	pbx_substitute_variables_helper(NULL, query->str, buffer, bufsize);
 
 	stringp = buffer;
 	while (*stringp <= ' ')
@@ -355,7 +356,7 @@
 	const char *newparam, *newval;
 	char *stringp;
 	int i, rowcount = -1;
-	const int EncodeSpecialChars = 1;
+	const int EncodeSpecialChars = 1, bufsize = 100;
 	char *buffer;
 
 	if (!ast_custom_function_find("CURL")) {
@@ -366,7 +367,7 @@
 	if (!(query = ast_str_create(1000)))
 		return -1;
 
-	if (!(buffer = ast_malloc(100))) {
+	if (!(buffer = ast_malloc(bufsize))) {
 		ast_free(query);
 		return -1;
 	}
@@ -384,7 +385,7 @@
 	va_end(ap);
 
 	ast_str_append(&query, 0, ")}");
-	pbx_substitute_variables_helper(NULL, query->str, buffer, sizeof(buffer));
+	pbx_substitute_variables_helper(NULL, query->str, buffer, bufsize);
 
 	/* Line oriented output */
 	stringp = buffer;
@@ -407,7 +408,8 @@
 	struct ast_str *query;
 	char buf1[200];
 	char *stringp, *line, *pair, *key;
-	int EncodeSpecialChars = 1, last_cat_metric = -1, cat_metric = -1;
+	const int EncodeSpecialChars = 1, bufsize = 256000;
+	int last_cat_metric = -1, cat_metric = -1;
 	struct ast_category *cat=NULL;
 	char *buffer, *cur_cat = "";
 	char *category = "", *var_name = "", *var_val = "";

[... 19 lines stripped ...]



More information about the asterisk-commits mailing list