[asterisk-commits] mmichelson: branch group/manager2 r110275 - in /team/group/manager2: ./ apps/...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Mar 20 13:12:34 CDT 2008


Author: mmichelson
Date: Thu Mar 20 13:12:33 2008
New Revision: 110275

URL: http://svn.digium.com/view/asterisk?view=rev&rev=110275
Log:
Resolve, Reset


Added:
    team/group/manager2/build_tools/cflags-devmode.xml
      - copied unchanged from r110272, trunk/build_tools/cflags-devmode.xml
Modified:
    team/group/manager2/   (props changed)
    team/group/manager2/CHANGES
    team/group/manager2/Makefile
    team/group/manager2/apps/app_chanspy.c
    team/group/manager2/apps/app_directory.c
    team/group/manager2/apps/app_meetme.c
    team/group/manager2/apps/app_minivm.c
    team/group/manager2/apps/app_queue.c
    team/group/manager2/build_tools/cflags.xml
    team/group/manager2/channels/chan_h323.c
    team/group/manager2/channels/chan_mgcp.c
    team/group/manager2/channels/chan_misdn.c
    team/group/manager2/channels/chan_sip.c
    team/group/manager2/channels/chan_usbradio.c
    team/group/manager2/channels/chan_vpb.cc
    team/group/manager2/channels/chan_zap.c
    team/group/manager2/configs/res_ldap.conf.sample
    team/group/manager2/include/asterisk/_private.h
    team/group/manager2/include/asterisk/dsp.h
    team/group/manager2/include/asterisk/http.h
    team/group/manager2/include/asterisk/netsock.h
    team/group/manager2/main/channel.c
    team/group/manager2/main/config.c
    team/group/manager2/main/dial.c
    team/group/manager2/main/dsp.c
    team/group/manager2/main/http.c
    team/group/manager2/main/manager.c
    team/group/manager2/main/netsock.c
    team/group/manager2/main/pbx.c
    team/group/manager2/main/rtp.c
    team/group/manager2/main/utils.c
    team/group/manager2/res/res_config_ldap.c
    team/group/manager2/res/res_musiconhold.c
    team/group/manager2/res/res_phoneprov.c
    team/group/manager2/sounds/Makefile

Propchange: team/group/manager2/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Propchange: team/group/manager2/
            ('svnmerge-blocked' removed)

Propchange: team/group/manager2/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu Mar 20 13:12:33 2008
@@ -1,1 +1,1 @@
-/trunk:1-109694
+/trunk:1-110274

Modified: team/group/manager2/CHANGES
URL: http://svn.digium.com/view/asterisk/team/group/manager2/CHANGES?view=diff&rev=110275&r1=110274&r2=110275
==============================================================================
--- team/group/manager2/CHANGES (original)
+++ team/group/manager2/CHANGES Thu Mar 20 13:12:33 2008
@@ -11,6 +11,12 @@
 ----------------------------------------
  * Channels can now be configured using named sections in zapata.conf, just
    like other channel drivers, including the use of templates.
+
+PBX Changes
+-----------
+ * It is now possible to specify a pattern match as a hint. Once a phone subscribes
+   to something that matches the pattern a hint will be created using the contents
+   and variables evaluated.
 
 ------------------------------------------------------------------------------
 --- Functionality changes from Asterisk 1.4.X to Asterisk 1.6.0  -------------
@@ -169,6 +175,7 @@
      more information on how it is used.
   * Added a new configuration option "authfailureevents" that enables manager events when
     a peer can't authenticate properly. 
+  * Added DNS manager support to registrations not referencing a peer entry.
 
 IAX2 changes
 ------------

Modified: team/group/manager2/Makefile
URL: http://svn.digium.com/view/asterisk/team/group/manager2/Makefile?view=diff&rev=110275&r1=110274&r2=110275
==============================================================================
--- team/group/manager2/Makefile (original)
+++ team/group/manager2/Makefile Thu Mar 20 13:12:33 2008
@@ -847,7 +847,7 @@
 menuselect/makeopts:
 	$(MAKE_MENUSELECT) makeopts
 
-menuselect-tree: $(foreach dir,$(filter-out main,$(MOD_SUBDIRS)),$(wildcard $(dir)/*.c) $(wildcard $(dir)/*.cc)) build_tools/cflags.xml sounds/sounds.xml build_tools/embed_modules.xml configure
+menuselect-tree: $(foreach dir,$(filter-out main,$(MOD_SUBDIRS)),$(wildcard $(dir)/*.c) $(wildcard $(dir)/*.cc)) build_tools/cflags.xml build_tools/cflags-devmode.xml sounds/sounds.xml build_tools/embed_modules.xml configure
 	@echo "Generating input for menuselect ..."
 	@echo "<?xml version=\"1.0\"?>" > $@
 	@echo >> $@
@@ -855,6 +855,9 @@
 	@for dir in $(sort $(filter-out main,$(MOD_SUBDIRS))); do $(SUBMAKE) -C $${dir} SUBDIR=$${dir} moduleinfo >> $@; done
 	@for dir in $(sort $(filter-out main,$(MOD_SUBDIRS))); do $(SUBMAKE) -C $${dir} SUBDIR=$${dir} makeopts >> $@; done
 	@cat build_tools/cflags.xml >> $@
+	@if [ "${AST_DEVMODE}" = "yes" ]; then \
+		cat build_tools/cflags-devmode.xml >> $@; \
+	fi
 	@cat build_tools/embed_modules.xml >> $@
 	@cat sounds/sounds.xml >> $@
 	@echo "</menu>" >> $@

Modified: team/group/manager2/apps/app_chanspy.c
URL: http://svn.digium.com/view/asterisk/team/group/manager2/apps/app_chanspy.c?view=diff&rev=110275&r1=110274&r2=110275
==============================================================================
--- team/group/manager2/apps/app_chanspy.c (original)
+++ team/group/manager2/apps/app_chanspy.c Thu Mar 20 13:12:33 2008
@@ -478,16 +478,15 @@
 
 	ast_mutex_lock(&chanspy_ds->lock);
 
-	chanspy_ds->chan = chan;
-
 	if (!(datastore = ast_channel_datastore_alloc(&chanspy_ds_info, NULL))) {
+		ast_mutex_unlock(&chanspy_ds->lock);
 		chanspy_ds = chanspy_ds_free(chanspy_ds);
 		ast_channel_unlock(chan);
 		return NULL;
 	}
-
+	
+	chanspy_ds->chan = chan;
 	datastore->data = chanspy_ds;
-
 	ast_channel_datastore_add(chan, datastore);
 
 	return chanspy_ds;
@@ -714,8 +713,10 @@
 					res = ast_streamfile(chan, peer_name, chan->language);
 					if (!res)
 						res = ast_waitstream(chan, "");
-					if (res)
+					if (res) {
+						chanspy_ds_free(peer_chanspy_ds);
 						break;
+					}
 				} else
 					res = ast_say_character_str(chan, peer_name, "", chan->language);
 				if ((num = atoi(ptr)))
@@ -731,6 +732,7 @@
 				goto exit;
 			} else if (res == -2) {
 				res = 0;
+				chanspy_ds_free(peer_chanspy_ds);
 				goto exit;
 			} else if (res > 1 && spec) {
 				struct ast_channel *next;

Modified: team/group/manager2/apps/app_directory.c
URL: http://svn.digium.com/view/asterisk/team/group/manager2/apps/app_directory.c?view=diff&rev=110275&r1=110274&r2=110275
==============================================================================
--- team/group/manager2/apps/app_directory.c (original)
+++ team/group/manager2/apps/app_directory.c Thu Mar 20 13:12:33 2008
@@ -37,6 +37,7 @@
 #include "asterisk/module.h"
 #include "asterisk/say.h"
 #include "asterisk/app.h"
+#include "asterisk/utils.h"
 
 #ifdef ODBC_STORAGE
 #include <sys/mman.h>
@@ -66,27 +67,53 @@
 "                   extension that the user has selected, or when jumping to the\n"
 "                   'o' or 'a' extension.\n\n"
 "  Options:\n"
-"    e - In addition to the name, also read the extension number to the\n"
-"        caller before presenting dialing options.\n"
-"    f - Allow the caller to enter the first name of a user in the directory\n"
-"        instead of using the last name.\n"
-"    m - Instead of reading each name sequentially and asking for confirmation,\n"
-"        create a menu of up to 8 names.\n";
+"    e           In addition to the name, also read the extension number to the\n"
+"              caller before presenting dialing options.\n"
+"    f[(<n>)]    Allow the caller to enter the first name of a user in the\n"
+"              directory instead of using the last name.  If specified, the\n"
+"              optional number argument will be used for the number of\n"
+"              characters the user should enter.\n"
+"    l[(<n>)]    Allow the caller to enter the last name of a user in the\n"
+"              directory.  This is the default.  If specified, the\n"
+"              optional number argument will be used for the number of\n"
+"              characters the user should enter.\n"
+"    b[(<n>)]    Allow the caller to enter either the first or the last name\n"
+"              of a user in the directory.  If specified, the optional number\n"
+"              argument will be used for the number of characters the user\n"
+"              should enter.\n"
+"    m           Instead of reading each name sequentially and asking for\n"
+"              confirmation, create a menu of up to 8 names.\n"
+"    p(<n>)      Pause for n milliseconds after the digits are typed.  This is\n"
+"              helpful for people with cellphones, who are not holding the\n"
+"              receiver to their ear while entering DTMF.\n"
+"\n"
+"    Only one of the f, l, or b options may be specified.  If more than one is\n"
+"    specified, then Directory will act as if 'b' was specified.  The number\n"
+"    of characters for the user to type defaults to 3.\n";
 
 /* For simplicity, I'm keeping the format compatible with the voicemail config,
    but i'm open to suggestions for isolating it */
 
 #define VOICEMAIL_CONFIG "voicemail.conf"
-
-/* How many digits to read in */
-#define NUMDIGITS 3
 
 enum {
 	OPT_LISTBYFIRSTNAME = (1 << 0),
 	OPT_SAYEXTENSION =    (1 << 1),
 	OPT_FROMVOICEMAIL =   (1 << 2),
 	OPT_SELECTFROMMENU =  (1 << 3),
+	OPT_LISTBYLASTNAME =  (1 << 4),
+	OPT_LISTBYEITHER =    OPT_LISTBYFIRSTNAME | OPT_LISTBYLASTNAME,
+	OPT_PAUSE =           (1 << 5),
 } directory_option_flags;
+
+enum {
+	OPT_ARG_FIRSTNAME =   0,
+	OPT_ARG_LASTNAME =    1,
+	OPT_ARG_EITHER =      2,
+	OPT_ARG_PAUSE =       3,
+	/* This *must* be the last value in this enum! */
+	OPT_ARG_ARRAY_SIZE =  4,
+};
 
 struct directory_item {
 	char exten[AST_MAX_EXTENSION + 1];
@@ -97,7 +124,10 @@
 };
 
 AST_APP_OPTIONS(directory_app_options, {
-	AST_APP_OPTION('f', OPT_LISTBYFIRSTNAME),
+	AST_APP_OPTION_ARG('f', OPT_LISTBYFIRSTNAME, OPT_ARG_FIRSTNAME),
+	AST_APP_OPTION_ARG('l', OPT_LISTBYLASTNAME, OPT_ARG_LASTNAME),
+	AST_APP_OPTION_ARG('b', OPT_LISTBYEITHER, OPT_ARG_EITHER),
+	AST_APP_OPTION_ARG('p', OPT_PAUSE, OPT_ARG_PAUSE),
 	AST_APP_OPTION('e', OPT_SAYEXTENSION),
 	AST_APP_OPTION('v', OPT_FROMVOICEMAIL),
 	AST_APP_OPTION('m', OPT_SELECTFROMMENU),
@@ -500,10 +530,11 @@
 	mailbox = NULL;
 	while ( (mailbox = ast_category_browse(rtdata, mailbox)) ) {
 		fullname = ast_variable_retrieve(rtdata, mailbox, "fullname");
-		hidefromdir = ast_variable_retrieve(rtdata, mailbox, "hidefromdir");
-		snprintf(tmp, sizeof(tmp), "no-password,%s,hidefromdir=%s",
-			fullname ? fullname : "",
-			hidefromdir ? hidefromdir : "no");
+		if (ast_true((hidefromdir = ast_variable_retrieve(rtdata, mailbox, "hidefromdir")))) {
+			/* Skip hidden */
+			continue;
+		}
+		snprintf(tmp, sizeof(tmp), "no-password,%s", S_OR(fullname, ""));
 		var = ast_variable_new(mailbox, tmp, "");
 		if (var)
 			ast_variable_append(cat, var);
@@ -556,7 +587,7 @@
 
 typedef AST_LIST_HEAD_NOLOCK(, directory_item) itemlist;
 
-static int search_directory(const char *context, struct ast_config *vmcfg, struct ast_config *ucfg, const char *ext, int use_first_name, itemlist *alist)
+static int search_directory(const char *context, struct ast_config *vmcfg, struct ast_config *ucfg, const char *ext, struct ast_flags flags, itemlist *alist)
 {
 	struct ast_variable *v;
 	char buf[AST_MAX_EXTENSION + 1], *pos, *bufptr, *cat;
@@ -578,7 +609,14 @@
 		strsep(&bufptr, ",");
 		pos = strsep(&bufptr, ",");
 
-		res = check_match(&item, pos, v->name, ext, use_first_name);
+		res = 0;
+		if (ast_test_flag(&flags, OPT_LISTBYLASTNAME)) {
+			res = check_match(&item, pos, v->name, ext, 0 /* use_first_name */);
+		}
+		if (!res && ast_test_flag(&flags, OPT_LISTBYFIRSTNAME)) {
+			res = check_match(&item, pos, v->name, ext, 1 /* use_first_name */);
+		}
+
 		if (!res)
 			continue;
 		else if (res < 0)
@@ -601,7 +639,14 @@
 			if (!pos)
 				continue;
 
-			res = check_match(&item, pos, cat, ext, use_first_name);
+			res = 0;
+			if (ast_test_flag(&flags, OPT_LISTBYLASTNAME)) {
+				res = check_match(&item, pos, v->name, ext, 0 /* use_first_name */);
+			}
+			if (!res && ast_test_flag(&flags, OPT_LISTBYFIRSTNAME)) {
+				res = check_match(&item, pos, v->name, ext, 1 /* use_first_name */);
+			}
+
 			if (!res)
 				continue;
 			else if (res < 0)
@@ -649,14 +694,14 @@
 	}
 }
 
-static int do_directory(struct ast_channel *chan, struct ast_config *vmcfg, struct ast_config *ucfg, char *context, char *dialcontext, char digit, struct ast_flags *flags)
+static int do_directory(struct ast_channel *chan, struct ast_config *vmcfg, struct ast_config *ucfg, char *context, char *dialcontext, char digit, int digits, struct ast_flags *flags)
 {
 	/* Read in the first three digits..  "digit" is the first digit, already read */
 	int res = 0;
 	itemlist alist = AST_LIST_HEAD_NOLOCK_INIT_VALUE;
 	struct directory_item *item, **ptr, **sorted = NULL;
 	int count, i;
-	char ext[NUMDIGITS + 1] = "";
+	char ext[10] = "";
 
 	if (ast_strlen_zero(context)) {
 		ast_log(LOG_WARNING,
@@ -674,10 +719,10 @@
 	}
 
 	ext[0] = digit;
-	if (ast_readstring(chan, ext + 1, NUMDIGITS - 1, 3000, 3000, "#") < 0)
+	if (ast_readstring(chan, ext + 1, digits - 1, 3000, 3000, "#") < 0)
 		return -1;
 
-	res = search_directory(context, vmcfg, ucfg, ext, ast_test_flag(flags, OPT_LISTBYFIRSTNAME), &alist);
+	res = search_directory(context, vmcfg, ucfg, ext, *flags, &alist);
 	if (res)
 		goto exit;
 
@@ -735,12 +780,14 @@
 
 static int directory_exec(struct ast_channel *chan, void *data)
 {
-	int res = 0;
+	int res = 0, digit = 3;
 	struct ast_config *cfg, *ucfg;
 	const char *dirintro;
-	char *parse, *opts[0];
+	char *parse, *opts[OPT_ARG_ARRAY_SIZE];
 	struct ast_flags flags = { 0 };
 	struct ast_flags config_flags = { 0 };
+	enum { FIRST, LAST, BOTH } which = LAST;
+	char digits[9] = "digits/3";
 	AST_DECLARE_APP_ARGS(args,
 		AST_APP_ARG(vmcontext);
 		AST_APP_ARG(dialcontext);
@@ -773,15 +820,53 @@
 	dirintro = ast_variable_retrieve(cfg, args.vmcontext, "directoryintro");
 	if (ast_strlen_zero(dirintro))
 		dirintro = ast_variable_retrieve(cfg, "general", "directoryintro");
-	if (ast_strlen_zero(dirintro))
-		dirintro = ast_test_flag(&flags, OPT_LISTBYFIRSTNAME) ? "dir-intro-fn" : "dir-intro";
+
+	if (ast_test_flag(&flags, OPT_LISTBYFIRSTNAME) && ast_test_flag(&flags, OPT_LISTBYLASTNAME)) {
+		if (!ast_strlen_zero(opts[OPT_ARG_EITHER])) {
+			digit = atoi(opts[OPT_ARG_EITHER]);
+		}
+		which = BOTH;
+	} else if (ast_test_flag(&flags, OPT_LISTBYFIRSTNAME)) {
+		if (!ast_strlen_zero(opts[OPT_ARG_FIRSTNAME])) {
+			digit = atoi(opts[OPT_ARG_FIRSTNAME]);
+		}
+		which = FIRST;
+	} else {
+		if (!ast_strlen_zero(opts[OPT_ARG_LASTNAME])) {
+			digit = atoi(opts[OPT_ARG_LASTNAME]);
+		}
+		which = LAST;
+	}
+
+	/* If no options specified, search by last name */
+	if (!ast_test_flag(&flags, OPT_LISTBYFIRSTNAME) && !ast_test_flag(&flags, OPT_LISTBYLASTNAME)) {
+		ast_set_flag(&flags, OPT_LISTBYLASTNAME);
+		which = LAST;
+	}
+
+	if (digit > 9) {
+		digit = 9;
+	} else if (digit < 1) {
+		digit = 3;
+	}
+	digits[7] = digit + '0';
 
 	if (chan->_state != AST_STATE_UP)
 		res = ast_answer(chan);
 
 	for (;;) {
-		if (!res)
+		if (!ast_strlen_zero(dirintro) && !res) {
 			res = ast_stream_and_wait(chan, dirintro, AST_DIGIT_ANY);
+		} else if (!res) {
+			res = ast_stream_and_wait(chan, "dir-welcome", AST_DIGIT_ANY) ||
+				ast_stream_and_wait(chan, "dir-pls-enter", AST_DIGIT_ANY) ||
+				ast_stream_and_wait(chan, digits, AST_DIGIT_ANY) ||
+				ast_stream_and_wait(chan, 
+					which == FIRST ? "dir-first" :
+					which == LAST ? "dir-last" :
+					"dir-firstlast", AST_DIGIT_ANY) ||
+				ast_stream_and_wait(chan, "dir-usingkeypad", AST_DIGIT_ANY);
+		}
 		ast_stopstream(chan);
 		if (!res)
 			res = ast_waitfordigit(chan, 5000);
@@ -789,7 +874,7 @@
 		if (res <= 0)
 			break;
 
-		res = do_directory(chan, cfg, ucfg, args.vmcontext, args.dialcontext, res, &flags);
+		res = do_directory(chan, cfg, ucfg, args.vmcontext, args.dialcontext, res, digit, &flags);
 		if (res)
 			break;
 

Modified: team/group/manager2/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/team/group/manager2/apps/app_meetme.c?view=diff&rev=110275&r1=110274&r2=110275
==============================================================================
--- team/group/manager2/apps/app_meetme.c (original)
+++ team/group/manager2/apps/app_meetme.c Thu Mar 20 13:12:33 2008
@@ -54,7 +54,6 @@
 #include "asterisk/utils.h"
 #include "asterisk/translate.h"
 #include "asterisk/ulaw.h"
-#include "asterisk/astobj.h"
 #include "asterisk/devicestate.h"
 #include "asterisk/dial.h"
 #include "asterisk/causes.h"
@@ -5077,7 +5076,9 @@
 	conf = NULL;
 	trunk->chan = NULL;
 	trunk->on_hold = 0;
-	
+
+	sla_change_trunk_state(trunk, SLA_TRUNK_STATE_IDLE, ALL_TRUNK_REFS, NULL);
+
 	if (!pbx_builtin_getvar_helper(chan, "SLATRUNK_STATUS"))
 		pbx_builtin_setvar_helper(chan, "SLATRUNK_STATUS", "SUCCESS");
 
@@ -5092,7 +5093,6 @@
 	AST_LIST_TRAVERSE_SAFE_END;
 	ast_mutex_unlock(&sla.lock);
 	if (ringing_trunk) {
-		sla_change_trunk_state(ringing_trunk->trunk, SLA_TRUNK_STATE_IDLE, ALL_TRUNK_REFS, NULL);
 		ast_free(ringing_trunk);
 		pbx_builtin_setvar_helper(chan, "SLATRUNK_STATUS", "UNANSWERED");
 		/* Queue reprocessing of ringing trunks to make stations stop ringing

Modified: team/group/manager2/apps/app_minivm.c
URL: http://svn.digium.com/view/asterisk/team/group/manager2/apps/app_minivm.c?view=diff&rev=110275&r1=110274&r2=110275
==============================================================================
--- team/group/manager2/apps/app_minivm.c (original)
+++ team/group/manager2/apps/app_minivm.c Thu Mar 20 13:12:33 2008
@@ -155,7 +155,6 @@
 
 
 #include "asterisk/paths.h"	/* use various paths */
-#include "asterisk/astobj.h"
 #include "asterisk/lock.h"
 #include "asterisk/file.h"
 #include "asterisk/channel.h"

Modified: team/group/manager2/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/team/group/manager2/apps/app_queue.c?view=diff&rev=110275&r1=110274&r2=110275
==============================================================================
--- team/group/manager2/apps/app_queue.c (original)
+++ team/group/manager2/apps/app_queue.c Thu Mar 20 13:12:33 2008
@@ -676,64 +676,32 @@
  * Lock interface list find sc, iterate through each queues queue_member list for member to
  * update state inside queues
 */
-static void *handle_statechange(struct statechange *sc)
-{
+static int update_status(const char *interface, const int status)
+{
+	struct member *cur;
+	struct ao2_iterator mem_iter, queue_iter;
 	struct call_queue *q;
-	struct member *cur;
-	struct ao2_iterator mem_iter;
-	struct member_interface *curint;
-	struct ao2_iterator queue_iter;
-	char *loc;
-	char *technology;
-
-	technology = ast_strdupa(sc->dev);
-	loc = strchr(technology, '/');
-	if (loc) {
-		*loc++ = '\0';
-	} else {
-		return NULL;
-	}
-
-	AST_LIST_LOCK(&interfaces);
-	AST_LIST_TRAVERSE(&interfaces, curint, list) {
-		char *interface;
-		char *slash_pos;
-		interface = ast_strdupa(curint->interface);
-		if ((slash_pos = strchr(interface, '/')))
-			if ((slash_pos = strchr(slash_pos + 1, '/')))
-				*slash_pos = '\0';
-
-		if (!strcasecmp(interface, sc->dev))
-			break;
-	}
-	AST_LIST_UNLOCK(&interfaces);
-
-	if (!curint) {
-		ast_debug(3, "Device '%s/%s' changed to state '%d' (%s) but we don't care because they're not a member of any queue.\n", technology, loc, sc->state, devstate2str(sc->state));
-		return NULL;
-	}
-
-	ast_debug(1, "Device '%s/%s' changed to state '%d' (%s)\n", technology, loc, sc->state, devstate2str(sc->state));
+
 	queue_iter = ao2_iterator_init(queues, 0);
 	while ((q = ao2_iterator_next(&queue_iter))) {
 		ao2_lock(q);
 		mem_iter = ao2_iterator_init(q->members, 0);
 		while ((cur = ao2_iterator_next(&mem_iter))) {
-			char *interface;
+			char *tmp_interface;
 			char *slash_pos;
 			struct ast_event *event = NULL;
-			interface = ast_strdupa(cur->state_interface);
+			tmp_interface = ast_strdupa(cur->state_interface);
 			if ((slash_pos = strchr(interface, '/')))
 				if ((slash_pos = strchr(slash_pos + 1, '/')))
 					*slash_pos = '\0';
 
-			if (strcasecmp(sc->dev, interface)) {
+			if (strcasecmp(interface, tmp_interface)) {
 				ao2_ref(cur, -1);
 				continue;
 			}
 
-			if (cur->status != sc->state) {
-				cur->status = sc->state;
+			if (cur->status != status) {
+				cur->status = status;
 				if (q->maskmemberstatus) {
 					ao2_ref(cur, -1);
 					continue;
@@ -771,6 +739,49 @@
 		queue_unref(q);
 		ao2_unlock(q);
 	}
+
+	return 0;
+}
+
+/*! \brief set a member's status based on device state of that member's interface*/
+static void *handle_statechange(struct statechange *sc)
+{
+	struct member_interface *curint;
+	char *loc;
+	char *technology;
+
+	technology = ast_strdupa(sc->dev);
+	loc = strchr(technology, '/');
+	if (loc) {
+		*loc++ = '\0';
+	} else {
+		return NULL;
+	}
+
+	AST_LIST_LOCK(&interfaces);
+	AST_LIST_TRAVERSE(&interfaces, curint, list) {
+		char *interface;
+		char *slash_pos;
+		interface = ast_strdupa(curint->interface);
+		if ((slash_pos = strchr(interface, '/')))
+			if ((slash_pos = strchr(slash_pos + 1, '/')))
+				*slash_pos = '\0';
+
+		if (!strcasecmp(interface, sc->dev))
+			break;
+	}
+	AST_LIST_UNLOCK(&interfaces);
+
+	if (!curint) {
+		if (option_debug > 2)
+			ast_log(LOG_DEBUG, "Device '%s/%s' changed to state '%d' (%s) but we don't care because they're not a member of any queue.\n", technology, loc, sc->state, devstate2str(sc->state));
+		return NULL;
+	}
+
+	if (option_debug)
+		ast_log(LOG_DEBUG, "Device '%s/%s' changed to state '%d' (%s)\n", technology, loc, sc->state, devstate2str(sc->state));
+
+	update_status(sc->dev, sc->state);
 
 	return NULL;
 }
@@ -2032,71 +2043,6 @@
 	}
 }
 
-static int update_status(struct call_queue *q, struct member *member, int status)
-{
-	struct member *cur;
-	struct ao2_iterator mem_iter;
-	struct ast_event *event = NULL;
-
-	/* Since a reload could have taken place, we have to traverse the list to
-		be sure it's still valid */
-	ao2_lock(q);
-	mem_iter = ao2_iterator_init(q->members, 0);
-	while ((cur = ao2_iterator_next(&mem_iter))) {
-		if (member != cur) {
-			ao2_ref(cur, -1);
-			continue;
-		}
-
-		cur->status = status;
-		if (!q->maskmemberstatus) {
-			event = ast_event_new(AST_EVENT_QUEUE_MEMBER_STATUS,
-					AST_EVENT_IE_INFO_QUEUE_NAME, AST_EVENT_IE_PLTYPE_STR, q->name,
-					AST_EVENT_IE_INFO_QUEUE_INTERFACE, AST_EVENT_IE_PLTYPE_STR, cur->interface,
-					AST_EVENT_IE_INFO_QUEUE_MEMBER_NAME, AST_EVENT_IE_PLTYPE_STR, cur->membername,
-					AST_EVENT_IE_INFO_QUEUE_MEMBERSHIP, AST_EVENT_IE_PLTYPE_STR, cur->dynamic ? "dynamic" : cur->realtime ? "realtime" : "static",
-					AST_EVENT_IE_INFO_QUEUE_PENALTY, AST_EVENT_IE_PLTYPE_UINT, cur->penalty,
-					AST_EVENT_IE_INFO_QUEUE_CALLS, AST_EVENT_IE_PLTYPE_UINT, cur->calls,
-					AST_EVENT_IE_INFO_QUEUE_LASTCALL, AST_EVENT_IE_PLTYPE_UINT, cur->lastcall,
-					AST_EVENT_IE_INFO_QUEUE_STATUS, AST_EVENT_IE_PLTYPE_STR, devstate2str(cur->status),
-					AST_EVENT_IE_INFO_QUEUE_PAUSED, AST_EVENT_IE_PLTYPE_UINT, cur->paused,
-					AST_EVENT_IE_END);
-
-			ast_event_queue(event);
-#if 0
-			manager_event(EVENT_FLAG_AGENT, "QueueMemberStatus",
-				"Queue: %s\r\n"
-				"Location: %s\r\n"
-				"MemberName: %s\r\n"
-				"Membership: %s\r\n"
-				"Penalty: %d\r\n"
-				"CallsTaken: %d\r\n"
-				"LastCall: %d\r\n"
-				"Status: %d\r\n"
-				"Paused: %d\r\n",
-				q->name, cur->interface, cur->membername, cur->dynamic ? "dynamic" : cur->realtime ? "realtime": "static",
-				cur->penalty, cur->calls, (int)cur->lastcall, cur->status, cur->paused);
-#endif
-		}
-		ao2_ref(cur, -1);
-	}
-	ao2_unlock(q);
-	return 0;
-}
-
-static int update_dial_status(struct call_queue *q, struct member *member, int status)
-{
-	if (status == AST_CAUSE_BUSY)
-		status = AST_DEVICE_BUSY;
-	else if (status == AST_CAUSE_UNREGISTERED)
-		status = AST_DEVICE_UNAVAILABLE;
-	else if (status == AST_CAUSE_NOSUCHDRIVER)
-		status = AST_DEVICE_INVALID;
-	else
-		status = AST_DEVICE_UNKNOWN;
-	return update_status(q, member, status);
-}
-
 /*! 
  * \brief traverse all defined queues which have calls waiting and contain this member
  * \retval 0 if no other queue has precedence (higher weight) 
@@ -2254,7 +2200,8 @@
 		if (qe->chan->cdr)
 			ast_cdr_busy(qe->chan->cdr);
 		tmp->stillgoing = 0;
-		update_dial_status(qe->parent, tmp->member, status);
+
+		update_status(tmp->member->state_interface, ast_device_state(tmp->member->state_interface));
 
 		ao2_lock(qe->parent);
 		qe->parent->rrpos++;
@@ -2264,8 +2211,7 @@
 
 		(*busies)++;
 		return 0;
-	} else if (status != tmp->oldstatus)
-		update_dial_status(qe->parent, tmp->member, status);
+	}
 	
 	tmp->chan->appl = "AppQueue";
 	tmp->chan->data = "(Outgoing Line)";
@@ -2667,8 +2613,6 @@
 					ast_verb(3, "Now forwarding %s to '%s/%s' (thanks to %s)\n", in->name, tech, stuff, o->chan->name);
 					/* Setup parameters */
 					o->chan = ast_request(tech, in->nativeformats, stuff, &status);
-					if (status != o->oldstatus)
-						update_dial_status(qe->parent, o->member, status);						
 					if (!o->chan) {
 						ast_log(LOG_NOTICE, "Unable to create local channel for call forward to '%s/%s'\n", tech, stuff);
 						o->stillgoing = 0;
@@ -3399,8 +3343,8 @@
 		to = (qe->parent->timeout) ? qe->parent->timeout * 1000 : -1;
 	orig = to;
 	++qe->pending;
+	ao2_unlock(qe->parent);
 	ring_one(qe, outgoing, &numbusies);
-	ao2_unlock(qe->parent);
 	if (use_weight)
 		ao2_unlock(queues);
 	lpeer = wait_for_answer(qe, outgoing, &to, &digit, numbusies, ast_test_flag(&(bridge_config.features_caller), AST_FEATURE_DISCONNECT), forwardsallowed);

Modified: team/group/manager2/build_tools/cflags.xml
URL: http://svn.digium.com/view/asterisk/team/group/manager2/build_tools/cflags.xml?view=diff&rev=110275&r1=110274&r2=110275
==============================================================================
--- team/group/manager2/build_tools/cflags.xml (original)
+++ team/group/manager2/build_tools/cflags.xml Thu Mar 20 13:12:33 2008
@@ -16,8 +16,6 @@
 		</member>
 		<member name="LOTS_OF_SPANS" displayname="More than 32 Zaptel spans">
 		</member>
-		<member name="MTX_PROFILE" displayname="Enable Code Profiling Using TSC Counters">
-		</member>
 		<member name="RADIO_RELAX" displayname="Relax DTMF for Radio Applications">
 		</member>
 		<member name="G711_NEW_ALGORITHM" displayname="Use the NEW ulaw/alaw codecs (slower, but cleaner)">
@@ -35,22 +33,7 @@
 		</member>
 		<member name="DEBUG_CHANNEL_LOCKS" displayname="Debug Channel Locking">
 		</member>
-		<member name="DEBUG_SCHEDULER" displayname="Enable Scheduler Debugging Output">
-		</member>
-		<member name="DEBUG_THREADLOCALS" displayname="Enable Thread-Local-Storage Debugging">
-		</member>
-		<member name="DETECT_DEADLOCKS" displayname="Detect Deadlocks">
-			<depend>DEBUG_THREADS</depend>
-		</member>
-		<member name="DUMP_SCHEDULER" displayname="Dump Scheduler Contents for Debugging">
-		</member>
 		<member name="MALLOC_DEBUG" displayname="Keep Track of Memory Allocations">
-		</member>
-		<member name="TRACE_FRAMES" displayname="Trace Frame Allocations">
-		</member>
-		<member name="DO_CRASH" displayname="Crash on fatal errors">
-		</member>
-		<member name="THREAD_CRASH" displayname="Crash on mutex errors">
 		</member>
 		<member name="BUSYDETECT_TONEONLY" displayname="Enable additional comparision of only the tone duration not the silence part">
 			<conflict>BUSYDETECT_COMPARE_TONE_AND_SILENCE</conflict>
@@ -63,6 +46,4 @@
 		<member name="BUSYDETECT_DEBUG" displayname="Enable additional busy detection debugging">
 			<defaultenabled>no</defaultenabled>
 		</member>
-		<member name="CHANNEL_TRACE" displayname="Enable CHANNEL(trace) function">
-		</member>
 	</category>

Modified: team/group/manager2/channels/chan_h323.c
URL: http://svn.digium.com/view/asterisk/team/group/manager2/channels/chan_h323.c?view=diff&rev=110275&r1=110274&r2=110275
==============================================================================
--- team/group/manager2/channels/chan_h323.c (original)
+++ team/group/manager2/channels/chan_h323.c Thu Mar 20 13:12:33 2008
@@ -1053,7 +1053,7 @@
 		/* Allocate dsp for in-band DTMF support */
 		if (pvt->options.dtmfmode & H323_DTMF_INBAND) {
 			pvt->vad = ast_dsp_new();
-			ast_dsp_set_features(pvt->vad, DSP_FEATURE_DTMF_DETECT);
+			ast_dsp_set_features(pvt->vad, DSP_FEATURE_DIGIT_DETECT);
 		}
 		/* Register channel functions. */
 		ch->tech_pvt = pvt;

Modified: team/group/manager2/channels/chan_mgcp.c
URL: http://svn.digium.com/view/asterisk/team/group/manager2/channels/chan_mgcp.c?view=diff&rev=110275&r1=110274&r2=110275
==============================================================================
--- team/group/manager2/channels/chan_mgcp.c (original)
+++ team/group/manager2/channels/chan_mgcp.c Thu Mar 20 13:12:33 2008
@@ -1511,9 +1511,9 @@
 			ast_channel_set_fd(tmp, 0, ast_rtp_fd(sub->rtp));
 		if (i->dtmfmode & (MGCP_DTMF_INBAND | MGCP_DTMF_HYBRID)) {
 			i->dsp = ast_dsp_new();
-			ast_dsp_set_features(i->dsp,DSP_FEATURE_DTMF_DETECT);
+			ast_dsp_set_features(i->dsp, DSP_FEATURE_DIGIT_DETECT);
 			/* this is to prevent clipping of dtmf tones during dsp processing */
-			ast_dsp_digitmode(i->dsp, DSP_DIGITMODE_NOQUELCH);
+			ast_dsp_set_digitmode(i->dsp, DSP_DIGITMODE_NOQUELCH);
 		} else {
 			i->dsp = NULL;
 		}

Modified: team/group/manager2/channels/chan_misdn.c
URL: http://svn.digium.com/view/asterisk/team/group/manager2/channels/chan_misdn.c?view=diff&rev=110275&r1=110274&r2=110275
==============================================================================
--- team/group/manager2/channels/chan_misdn.c (original)
+++ team/group/manager2/channels/chan_misdn.c Thu Mar 20 13:12:33 2008
@@ -2154,9 +2154,9 @@
 			ch->dsp = ast_dsp_new();
 		if (ch->dsp) {
 			if (ch->faxdetect) 
-				ast_dsp_set_features(ch->dsp, DSP_FEATURE_DTMF_DETECT | DSP_FEATURE_FAX_DETECT);
+				ast_dsp_set_features(ch->dsp, DSP_FEATURE_DIGIT_DETECT | DSP_FEATURE_FAX_DETECT);
 			else 
-				ast_dsp_set_features(ch->dsp, DSP_FEATURE_DTMF_DETECT );
+				ast_dsp_set_features(ch->dsp, DSP_FEATURE_DIGIT_DETECT );
 		}
 		if (!ch->trans)
 			ch->trans = ast_translator_build_path(AST_FORMAT_SLINEAR, AST_FORMAT_ALAW);
@@ -5492,7 +5492,7 @@
 		if (!ch->dsp)
 			ch->dsp = ast_dsp_new();
 		if (ch->dsp)
-			ast_dsp_set_features(ch->dsp, DSP_FEATURE_DTMF_DETECT | DSP_FEATURE_FAX_DETECT);
+			ast_dsp_set_features(ch->dsp, DSP_FEATURE_DIGIT_DETECT | DSP_FEATURE_FAX_DETECT);
 		if (!ch->trans)
 			ch->trans = ast_translator_build_path(AST_FORMAT_SLINEAR, AST_FORMAT_ALAW);
 	}

Modified: team/group/manager2/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/group/manager2/channels/chan_sip.c?view=diff&rev=110275&r1=110274&r2=110275
==============================================================================
--- team/group/manager2/channels/chan_sip.c (original)
+++ team/group/manager2/channels/chan_sip.c Thu Mar 20 13:12:33 2008
@@ -1303,7 +1303,6 @@
 	struct sip_st_dlg *stimer;		/*!< SIP Session-Timers */              
 };
 
-
 /*! Max entires in the history list for a sip_pvt */
 #define MAX_HISTORY_ENTRIES 50
 
@@ -1547,6 +1546,8 @@
 	struct timeval regtime;		/*!< Last successful registration time */
 	int callid_valid;		/*!< 0 means we haven't chosen callid for this registry yet. */
 	unsigned int ocseq;		/*!< Sequence number we got to for REGISTERs for this registry */
+	struct ast_dnsmgr_entry *dnsmgr;	/*!<  DNS refresh manager for register */
+	struct sockaddr_in us;		/*!< Who the server thinks we are */
 	int noncecount;			/*!< Nonce-count */
 	char lastmsg[256];		/*!< Last Message sent/received */
 };
@@ -1959,7 +1960,7 @@
 static const struct sockaddr_in *sip_real_dst(const struct sip_pvt *p);
 static void build_via(struct sip_pvt *p);
 static int create_addr_from_peer(struct sip_pvt *r, struct sip_peer *peer);
-static int create_addr(struct sip_pvt *dialog, const char *opeer);
+static int create_addr(struct sip_pvt *dialog, const char *opeer, struct in_addr *sin);
 static char *generate_random_string(char *buf, size_t size);
 static void build_callid_pvt(struct sip_pvt *pvt);
 static void build_callid_registry(struct sip_registry *reg, struct in_addr ourip, const char *fromdomain);
@@ -2528,7 +2529,7 @@
 	int res = 0;
 	const struct sockaddr_in *dst = sip_real_dst(p);
 
-	ast_debug(1, "Trying to put '%.10s' onto %s socket...\n", data->str, get_transport(p->socket.type));
+	ast_debug(1, "Trying to put '%.10s' onto %s socket destined for %s\n", data->str, get_transport(p->socket.type), ast_inet_ntoa(dst->sin_addr));
 
 	if (sip_prepare_socket(p) < 0)
 		return XMIT_ERROR;
@@ -3100,6 +3101,7 @@
 		 __sip_reliable_xmit(p, seqno, 1, req->data, req->len, (reliable == XMIT_CRITICAL), req->method) :
 		__sip_xmit(p, req->data, req->len);
 	ast_free(req->data);
+	req->data = NULL;
 	if (res > 0)
 		return 0;
 	return res;
@@ -3133,8 +3135,10 @@
 	res = (reliable) ?
 		__sip_reliable_xmit(p, seqno, 0, req->data, req->len, (reliable == XMIT_CRITICAL), req->method) :
 		__sip_xmit(p, req->data, req->len);
-	if (req->data)
+	if (req->data) {
 		ast_free(req->data);
+		req->data = NULL;
+	}
 	return res;
 }
 
@@ -4054,7 +4058,7 @@
 /*! \brief create address structure from peer name
  *      Or, if peer not found, find it in the global DNS 
  *      returns TRUE (-1) on failure, FALSE on success */
-static int create_addr(struct sip_pvt *dialog, const char *opeer)
+static int create_addr(struct sip_pvt *dialog, const char *opeer, struct in_addr *sin)
 {
 	struct hostent *hp;
 	struct ast_hostent ahp;
@@ -4063,6 +4067,7 @@
 	int portno;
 	char host[MAXHOSTNAMELEN], *hostn;
 	char peername[256];
+	int srv_ret = 0;
 
 	ast_copy_string(peername, opeer, sizeof(peername));
 	port = strchr(peername, ':');
@@ -4094,27 +4099,32 @@
 
 	/* Let's see if we can find the host in DNS. First try DNS SRV records,
    	   then hostname lookup */
-
 	hostn = peername;
 	portno = port ? atoi(port) : (dialog->socket.type & SIP_TRANSPORT_TLS) ? STANDARD_TLS_PORT : STANDARD_SIP_PORT;
 	if (global_srvlookup) {
 		char service[MAXHOSTNAMELEN];
 		int tportno;
-		int ret;
 
 		snprintf(service, sizeof(service), "_sip._%s.%s", get_transport(dialog->socket.type), peername);
-		ret = ast_get_srv(NULL, host, sizeof(host), &tportno, service);
-		if (ret > 0) {
+		srv_ret = ast_get_srv(NULL, host, sizeof(host), &tportno, service);
+		if (srv_ret > 0) {
 			hostn = host;
 			portno = tportno;
 		}
 	}
-	hp = ast_gethostbyname(hostn, &ahp);
-	if (!hp) {
-		ast_log(LOG_WARNING, "No such host: %s\n", peername);
-		return -1;
-	}
-	memcpy(&dialog->sa.sin_addr, hp->h_addr, sizeof(dialog->sa.sin_addr));
+
+	if (sin && srv_ret <= 0) {
+		memcpy(&dialog->sa.sin_addr, sin, sizeof(dialog->sa.sin_addr));
+		ast_log(LOG_DEBUG, "IP lookup for hostname=%s, using dnsmgr resolved to %s...\n", peername, ast_inet_ntoa(*sin));
+	} else {
+		hp = ast_gethostbyname(hostn, &ahp);
+		if (!hp) {
+			ast_log(LOG_WARNING, "No such host: %s\n", peername);
+			return -1;
+		}
+		memcpy(&dialog->sa.sin_addr, hp->h_addr, sizeof(dialog->sa.sin_addr));
+	}
+
 	dialog->sa.sin_port = htons(portno);
 	dialog->recv = dialog->sa;
 	return 0;
@@ -4252,6 +4262,7 @@
 	AST_SCHED_DEL(sched, reg->timeout);
 	ast_string_field_free_memory(reg);
 	regobjs--;
+	ast_dnsmgr_release(reg->dnsmgr);
 	ast_free(reg);
 	
 }
@@ -5306,9 +5317,9 @@
 
 	if (ast_test_flag(&i->flags[0], SIP_DTMF) ==  SIP_DTMF_INBAND) {
 		i->vad = ast_dsp_new();
-		ast_dsp_set_features(i->vad, DSP_FEATURE_DTMF_DETECT);
+		ast_dsp_set_features(i->vad, DSP_FEATURE_DIGIT_DETECT);
 		if (global_relaxdtmf)
-			ast_dsp_digitmode(i->vad, DSP_DIGITMODE_DTMF | DSP_DIGITMODE_RELAXDTMF);
+			ast_dsp_set_digitmode(i->vad, DSP_DIGITMODE_DTMF | DSP_DIGITMODE_RELAXDTMF);
 	}
 
 	/* Set file descriptors for audio, video, realtime text and UDPTL as needed */
@@ -9138,6 +9149,11 @@
 	if (!r)
 		return 0;
 
+	if (r->dnsmgr) {
+		/* If the registration has timed out, maybe the IP changed.  Force a refresh. */
+		ast_dnsmgr_refresh(r->dnsmgr);
+	}
+
 	ast_log(LOG_NOTICE, "   -- Registration for '%s@%s' timed out, trying again (Attempt #%d)\n", r->username, r->hostname, r->regattempts); 
 	/* If the initial tranmission failed, we may not have an existing dialog,
 	 * so it is possible that r->call == NULL.
@@ -9189,10 +9205,14 @@
 	struct sip_pvt *p;
 
 	/* exit if we are already in process with this registrar ?*/
-	if ( r == NULL || ((auth==NULL) && (r->regstate==REG_STATE_REGSENT || r->regstate==REG_STATE_AUTHSENT))) {
+	if (r == NULL || ((auth == NULL) && (r->regstate == REG_STATE_REGSENT || r->regstate == REG_STATE_AUTHSENT))) {
 		ast_log(LOG_NOTICE, "Strange, trying to register %s@%s when registration already pending\n", r->username, r->hostname);
 		return 0;
 	}
+
+	if (r->dnsmgr == NULL) {
+		ast_dnsmgr_lookup(r->hostname, &r->us.sin_addr, &r->dnsmgr);
+	} 
 
 	if (r->call) {	/* We have a registration */
 		if (!auth) {
@@ -9221,7 +9241,7 @@
 		p->outboundproxy = obproxy_get(p, NULL);
 
 		/* Find address to hostname */
-		if (create_addr(p, r->hostname)) {
+		if (create_addr(p, r->hostname, &r->us.sin_addr)) {
 			/* we have what we hope is a temporary network error,
 			 * probably DNS.  We need to reschedule a registration try */
 			sip_destroy(p);
@@ -13865,7 +13885,7 @@
 			return CLI_FAILURE;
 		}
 
-		if (create_addr(p, a->argv[i])) {
+		if (create_addr(p, a->argv[i], NULL)) {
 			/* Maybe they're not registered, etc. */
 			sip_destroy(p);
 			ast_cli(a->fd, "Could not create address for '%s'\n", a->argv[i]);
@@ -18102,6 +18122,7 @@
 
 	if (req->headers < 2) {	/* Must have at least two headers */
 		ast_free(req->data);
+		req->data = NULL;
 		return 1;
 	}
 
@@ -19111,7 +19132,7 @@
 		ext = extension (user part of URI)
 		dnid = destination of the call (applies to the To: header)
 	*/
-	if (create_addr(p, host)) {
+	if (create_addr(p, host, NULL)) {
 		*cause = AST_CAUSE_UNREGISTERED;
 		ast_debug(3, "Cant create SIP call - target device not registred\n");
 		sip_destroy(p);
@@ -21166,7 +21187,7 @@
 	if (ast_test_flag(&p->flags[0], SIP_DTMF) == SIP_DTMF_INBAND) {
 		if (!p->vad) {
 			p->vad = ast_dsp_new();
-			ast_dsp_set_features(p->vad, DSP_FEATURE_DTMF_DETECT);
+			ast_dsp_set_features(p->vad, DSP_FEATURE_DIGIT_DETECT);
 		}
 	} else {
 		if (p->vad) {

Modified: team/group/manager2/channels/chan_usbradio.c
URL: http://svn.digium.com/view/asterisk/team/group/manager2/channels/chan_usbradio.c?view=diff&rev=110275&r1=110274&r2=110275
==============================================================================
--- team/group/manager2/channels/chan_usbradio.c (original)
+++ team/group/manager2/channels/chan_usbradio.c Thu Mar 20 13:12:33 2008
@@ -2285,7 +2285,7 @@
 	o->dsp = ast_dsp_new();
 	if (o->dsp) {
 		ast_dsp_set_features(o->dsp, DSP_FEATURE_DTMF_DETECT);
-		ast_dsp_digitmode(o->dsp, DSP_DIGITMODE_DTMF | DSP_DIGITMODE_MUTECONF | DSP_DIGITMODE_RELAXDTMF);
+		ast_dsp_set_digitmode(o->dsp, DSP_DIGITMODE_DTMF | DSP_DIGITMODE_MUTECONF | DSP_DIGITMODE_RELAXDTMF);
 	}
 
 	if (o->rxctcssfreq != 0 && o->rxdemod == RX_AUDIO_SPEAKER)

Modified: team/group/manager2/channels/chan_vpb.cc
URL: http://svn.digium.com/view/asterisk/team/group/manager2/channels/chan_vpb.cc?view=diff&rev=110275&r1=110274&r2=110275
==============================================================================
--- team/group/manager2/channels/chan_vpb.cc (original)
+++ team/group/manager2/channels/chan_vpb.cc Thu Mar 20 13:12:33 2008
@@ -1633,10 +1633,10 @@
 	}
 	if (use_ast_dtmfdet) {
 		tmp->vad = ast_dsp_new();
-		ast_dsp_set_features(tmp->vad, DSP_FEATURE_DTMF_DETECT);
-		ast_dsp_digitmode(tmp->vad, DSP_DIGITMODE_DTMF);
+		ast_dsp_set_features(tmp->vad, DSP_FEATURE_DIGIT_DETECT);
+		ast_dsp_set_digitmode(tmp->vad, DSP_DIGITMODE_DTMF);
 		if (relaxdtmf)
-			ast_dsp_digitmode(tmp->vad, DSP_DIGITMODE_DTMF|DSP_DIGITMODE_RELAXDTMF);

[... 2301 lines stripped ...]



More information about the asterisk-commits mailing list