[asterisk-commits] branch kpfleming/vldtmf r9061 - in /team/kpfleming/vldtmf: ./ agi/ apps/ cdr/...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed Feb 1 16:17:47 MST 2006


Author: kpfleming
Date: Wed Feb  1 17:17:41 2006
New Revision: 9061

URL: http://svn.digium.com/view/asterisk?rev=9061&view=rev
Log:
update to trunk

Added:
    team/kpfleming/vldtmf/configs/muted.conf.sample
      - copied unchanged from r9060, trunk/configs/muted.conf.sample
    team/kpfleming/vldtmf/doc/00README.1st
      - copied unchanged from r9060, trunk/doc/00README.1st
    team/kpfleming/vldtmf/doc/ael.txt
      - copied unchanged from r9060, trunk/doc/ael.txt
    team/kpfleming/vldtmf/doc/app-sms.txt
      - copied unchanged from r9060, trunk/doc/app-sms.txt
    team/kpfleming/vldtmf/doc/asterisk-conf.txt
      - copied unchanged from r9060, trunk/doc/asterisk-conf.txt
    team/kpfleming/vldtmf/doc/backtrace.txt
      - copied unchanged from r9060, trunk/doc/backtrace.txt
    team/kpfleming/vldtmf/doc/billing.txt
      - copied unchanged from r9060, trunk/doc/billing.txt
    team/kpfleming/vldtmf/doc/callingpres.txt
      - copied unchanged from r9060, trunk/doc/callingpres.txt
    team/kpfleming/vldtmf/doc/cdrdriver.txt
      - copied unchanged from r9060, trunk/doc/cdrdriver.txt
    team/kpfleming/vldtmf/doc/chaniax.txt
      - copied unchanged from r9060, trunk/doc/chaniax.txt
    team/kpfleming/vldtmf/doc/channels.txt
      - copied unchanged from r9060, trunk/doc/channels.txt
    team/kpfleming/vldtmf/doc/channelvariables.txt
      - copied unchanged from r9060, trunk/doc/channelvariables.txt
    team/kpfleming/vldtmf/doc/cliprompt.txt
      - copied unchanged from r9060, trunk/doc/cliprompt.txt
    team/kpfleming/vldtmf/doc/configuration.txt
      - copied unchanged from r9060, trunk/doc/configuration.txt
    team/kpfleming/vldtmf/doc/cygwin.txt
      - copied unchanged from r9060, trunk/doc/cygwin.txt
    team/kpfleming/vldtmf/doc/dundi.txt
      - copied unchanged from r9060, trunk/doc/dundi.txt
    team/kpfleming/vldtmf/doc/enum.txt
      - copied unchanged from r9060, trunk/doc/enum.txt
    team/kpfleming/vldtmf/doc/extconfig.txt
      - copied unchanged from r9060, trunk/doc/extconfig.txt
    team/kpfleming/vldtmf/doc/externalivr.txt
      - copied unchanged from r9060, trunk/doc/externalivr.txt
    team/kpfleming/vldtmf/doc/freetds.txt
      - copied unchanged from r9060, trunk/doc/freetds.txt
    team/kpfleming/vldtmf/doc/h323.txt
      - copied unchanged from r9060, trunk/doc/h323.txt
    team/kpfleming/vldtmf/doc/hardware.txt
      - copied unchanged from r9060, trunk/doc/hardware.txt
    team/kpfleming/vldtmf/doc/ices.txt
      - copied unchanged from r9060, trunk/doc/ices.txt
    team/kpfleming/vldtmf/doc/jitterbuffer.txt
      - copied unchanged from r9060, trunk/doc/jitterbuffer.txt
    team/kpfleming/vldtmf/doc/linkedlists.txt
      - copied unchanged from r9060, trunk/doc/linkedlists.txt
    team/kpfleming/vldtmf/doc/math.txt
      - copied unchanged from r9060, trunk/doc/math.txt
    team/kpfleming/vldtmf/doc/misdn.txt
      - copied unchanged from r9060, trunk/doc/misdn.txt
    team/kpfleming/vldtmf/doc/mp3.txt
      - copied unchanged from r9060, trunk/doc/mp3.txt
    team/kpfleming/vldtmf/doc/musiconhold-fpm.txt
      - copied unchanged from r9060, trunk/doc/musiconhold-fpm.txt
    team/kpfleming/vldtmf/doc/mysql.txt
      - copied unchanged from r9060, trunk/doc/mysql.txt
    team/kpfleming/vldtmf/doc/odbcstorage.txt
      - copied unchanged from r9060, trunk/doc/odbcstorage.txt
    team/kpfleming/vldtmf/doc/privacy.txt
      - copied unchanged from r9060, trunk/doc/privacy.txt
    team/kpfleming/vldtmf/doc/realtime.txt
      - copied unchanged from r9060, trunk/doc/realtime.txt
    team/kpfleming/vldtmf/doc/security.txt
      - copied unchanged from r9060, trunk/doc/security.txt
    team/kpfleming/vldtmf/doc/sms.txt
      - copied unchanged from r9060, trunk/doc/sms.txt
Modified:
    team/kpfleming/vldtmf/   (props changed)
    team/kpfleming/vldtmf/Makefile
    team/kpfleming/vldtmf/agi/Makefile
    team/kpfleming/vldtmf/apps/app_dial.c
    team/kpfleming/vldtmf/apps/app_disa.c
    team/kpfleming/vldtmf/apps/app_dumpchan.c
    team/kpfleming/vldtmf/apps/app_flash.c
    team/kpfleming/vldtmf/apps/app_meetme.c
    team/kpfleming/vldtmf/apps/app_queue.c
    team/kpfleming/vldtmf/apps/app_softhangup.c
    team/kpfleming/vldtmf/apps/app_transfer.c
    team/kpfleming/vldtmf/apps/app_voicemail.c
    team/kpfleming/vldtmf/apps/app_zapbarge.c
    team/kpfleming/vldtmf/apps/app_zapras.c
    team/kpfleming/vldtmf/apps/app_zapscan.c
    team/kpfleming/vldtmf/cdr.c
    team/kpfleming/vldtmf/cdr/Makefile
    team/kpfleming/vldtmf/channel.c
    team/kpfleming/vldtmf/channels/chan_agent.c
    team/kpfleming/vldtmf/channels/chan_alsa.c
    team/kpfleming/vldtmf/channels/chan_features.c
    team/kpfleming/vldtmf/channels/chan_iax2.c
    team/kpfleming/vldtmf/channels/chan_local.c
    team/kpfleming/vldtmf/channels/chan_mgcp.c
    team/kpfleming/vldtmf/channels/chan_oss.c
    team/kpfleming/vldtmf/channels/chan_phone.c
    team/kpfleming/vldtmf/channels/chan_sip.c
    team/kpfleming/vldtmf/channels/chan_skinny.c
    team/kpfleming/vldtmf/channels/chan_zap.c
    team/kpfleming/vldtmf/channels/iax2-parser.c
    team/kpfleming/vldtmf/channels/iax2-parser.h
    team/kpfleming/vldtmf/cli.c
    team/kpfleming/vldtmf/codecs/Makefile
    team/kpfleming/vldtmf/formats/Makefile
    team/kpfleming/vldtmf/frame.c
    team/kpfleming/vldtmf/funcs/Makefile
    team/kpfleming/vldtmf/funcs/func_language.c
    team/kpfleming/vldtmf/funcs/func_moh.c
    team/kpfleming/vldtmf/image.c
    team/kpfleming/vldtmf/include/asterisk/cdr.h
    team/kpfleming/vldtmf/include/asterisk/channel.h
    team/kpfleming/vldtmf/include/asterisk/frame.h
    team/kpfleming/vldtmf/include/asterisk/image.h
    team/kpfleming/vldtmf/include/asterisk/musiconhold.h
    team/kpfleming/vldtmf/include/asterisk/stringfields.h
    team/kpfleming/vldtmf/pbx.c
    team/kpfleming/vldtmf/res/Makefile
    team/kpfleming/vldtmf/res/res_agi.c
    team/kpfleming/vldtmf/res/res_features.c
    team/kpfleming/vldtmf/res/res_musiconhold.c
    team/kpfleming/vldtmf/rtp.c
    team/kpfleming/vldtmf/stdtime/Makefile
    team/kpfleming/vldtmf/udptl.c
    team/kpfleming/vldtmf/utils/Makefile

Propchange: team/kpfleming/vldtmf/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed Feb  1 17:17:41 2006
@@ -1,1 +1,1 @@
-/trunk:1-9036
+/trunk:1-9060

Modified: team/kpfleming/vldtmf/Makefile
URL: http://svn.digium.com/view/asterisk/team/kpfleming/vldtmf/Makefile?rev=9061&r1=9060&r2=9061&view=diff
==============================================================================
--- team/kpfleming/vldtmf/Makefile (original)
+++ team/kpfleming/vldtmf/Makefile Wed Feb  1 17:17:41 2006
@@ -912,3 +912,37 @@
 	if cmp -s .cleancount .lastclean ; then echo ; else \
 		$(MAKE) clean; cp -f .cleancount .lastclean;\
 	fi
+
+_uninstall:
+	rm -f $(DESTDIR)$(MODULES_DIR)/*
+	rm -f $(DESTDIR)$(ASTSBINDIR)/*asterisk*
+	rm -f $(DESTDIR)$(ASTSBINDIR)/astgenkey
+	rm -f $(DESTDIR)$(ASTSBINDIR)/autosupport
+	rm -rf $(DESTDIR)$(ASTHEADERDIR)
+	rm -rf $(DESTDIR)$(ASTVARLIBDIR)/sounds
+	rm -rf $(DESTDIR)$(ASTVARLIBDIR)/firmware
+	rm -rf $(DESTDIR)$(ASTMANDIR)/man8
+	for x in $(SUBDIRS); do $(MAKE) -C $$x uninstall || exit 1 ; done
+
+uninstall: _uninstall
+	@echo " +--------- Asterisk Uninstall Complete -----+"  
+	@echo " + Asterisk binaries, sounds, man pages,     +"  
+	@echo " + headers, modules, and firmware builds,    +"  
+	@echo " + have all been uninstalled.                +"  
+	@echo " +                                           +"
+	@echo " + To remove ALL traces of Asterisk,         +"
+	@echo " + including configuration, spool            +"
+	@echo " + directories, and logs, run the following  +"
+	@echo " + command:                                  +"
+	@echo " +                                           +"
+	@echo " +            $(MAKE) uninstall-all             +"  
+	@echo " +-------------------------------------------+"  
+
+
+uninstall-all: _uninstall
+	rm -rf $(DESTDIR)$(ASTLIBDIR)
+	rm -rf $(DESTDIR)$(ASTVARLIBDIR)
+	rm -rf $(DESTDIR)$(ASTSPOOLDIR)
+	rm -rf $(DESTDIR)$(ASTETCDIR)
+	rm -rf $(DESTDIR)$(ASTLOGDIR)
+	

Modified: team/kpfleming/vldtmf/agi/Makefile
URL: http://svn.digium.com/view/asterisk/team/kpfleming/vldtmf/agi/Makefile?rev=9061&r1=9060&r2=9061&view=diff
==============================================================================
--- team/kpfleming/vldtmf/agi/Makefile (original)
+++ team/kpfleming/vldtmf/agi/Makefile Wed Feb  1 17:17:41 2006
@@ -30,6 +30,9 @@
 	mkdir -p $(DESTDIR)$(AGI_DIR)
 	for x in $(AGIS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(AGI_DIR) ; done
 
+uninstall:
+	for x in $(AGIS); do rm -f $(DESTDIR)$(AGI_DIR)/$$x ; done
+
 eagi-test: eagi-test.o
 	$(CC) $(CFLAGS) -o eagi-test eagi-test.o $(LIBS)
 

Modified: team/kpfleming/vldtmf/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/team/kpfleming/vldtmf/apps/app_dial.c?rev=9061&r1=9060&r2=9061&view=diff
==============================================================================
--- team/kpfleming/vldtmf/apps/app_dial.c (original)
+++ team/kpfleming/vldtmf/apps/app_dial.c Wed Feb  1 17:17:41 2006
@@ -58,6 +58,7 @@
 #include "asterisk/rtp.h"
 #include "asterisk/manager.h"
 #include "asterisk/privacy.h"
+#include "asterisk/stringfields.h"
 
 static char *tdesc = "Dialing Application";
 
@@ -498,7 +499,7 @@
 							else
 								newcid = in->exten;
 							o->chan->cid.cid_num = strdup(newcid);
-							ast_copy_string(o->chan->accountcode, winner->accountcode, sizeof(o->chan->accountcode));
+							ast_string_field_set(o->chan, accountcode, winner->accountcode);
 							o->chan->cdrflags = winner->cdrflags;
 							if (!o->chan->cid.cid_num)
 								ast_log(LOG_WARNING, "Out of memory\n");
@@ -513,7 +514,7 @@
 								if (!o->chan->cid.cid_name)
 									ast_log(LOG_WARNING, "Out of memory\n");	
 							}
-							ast_copy_string(o->chan->accountcode, in->accountcode, sizeof(o->chan->accountcode));
+							ast_string_field_set(o->chan, accountcode, in->accountcode);
 							o->chan->cdrflags = in->cdrflags;
 						}
 
@@ -1089,11 +1090,11 @@
 			tmp->chan->cid.cid_ani = strdup(chan->cid.cid_ani);
 		
 		/* Copy language from incoming to outgoing */
-		ast_copy_string(tmp->chan->language, chan->language, sizeof(tmp->chan->language));
-		ast_copy_string(tmp->chan->accountcode, chan->accountcode, sizeof(tmp->chan->accountcode));
+		ast_string_field_set(tmp->chan, language, chan->language);
+		ast_string_field_set(tmp->chan, accountcode, chan->accountcode);
 		tmp->chan->cdrflags = chan->cdrflags;
 		if (ast_strlen_zero(tmp->chan->musicclass))
-			ast_copy_string(tmp->chan->musicclass, chan->musicclass, sizeof(tmp->chan->musicclass));
+			ast_string_field_set(tmp->chan, musicclass, chan->musicclass);
 		if (chan->cid.cid_rdnis)
 			tmp->chan->cid.cid_rdnis = strdup(chan->cid.cid_rdnis);
 		/* Pass callingpres setting */

Modified: team/kpfleming/vldtmf/apps/app_disa.c
URL: http://svn.digium.com/view/asterisk/team/kpfleming/vldtmf/apps/app_disa.c?rev=9061&r1=9060&r2=9061&view=diff
==============================================================================
--- team/kpfleming/vldtmf/apps/app_disa.c (original)
+++ team/kpfleming/vldtmf/apps/app_disa.c Wed Feb  1 17:17:41 2006
@@ -47,6 +47,7 @@
 #include "asterisk/translate.h"
 #include "asterisk/ulaw.h"
 #include "asterisk/callerid.h"
+#include "asterisk/stringfields.h"
 
 static char *tdesc = "DISA (Direct Inward System Access) Application";
 
@@ -347,7 +348,7 @@
 			}
 
 			if (!ast_strlen_zero(acctcode))
-				ast_copy_string(chan->accountcode, acctcode, sizeof(chan->accountcode));
+				ast_string_field_set(chan, accountcode, acctcode);
 
 			if (special_noanswer) flags.flags = 0;
 			ast_cdr_reset(chan->cdr, &flags);

Modified: team/kpfleming/vldtmf/apps/app_dumpchan.c
URL: http://svn.digium.com/view/asterisk/team/kpfleming/vldtmf/apps/app_dumpchan.c?rev=9061&r1=9060&r2=9061&view=diff
==============================================================================
--- team/kpfleming/vldtmf/apps/app_dumpchan.c (original)
+++ team/kpfleming/vldtmf/apps/app_dumpchan.c Wed Feb  1 17:17:41 2006
@@ -106,7 +106,7 @@
 			 "Data=               %s\n"
 			 "Blocking_in=        %s\n",
 			 c->name,
-			 c->type,
+			 c->tech->type,
 			 c->uniqueid,
 			 (c->cid.cid_num ? c->cid.cid_num : "(N/A)"),
 			 (c->cid.cid_name ? c->cid.cid_name : "(N/A)"),

Modified: team/kpfleming/vldtmf/apps/app_flash.c
URL: http://svn.digium.com/view/asterisk/team/kpfleming/vldtmf/apps/app_flash.c?rev=9061&r1=9060&r2=9061&view=diff
==============================================================================
--- team/kpfleming/vldtmf/apps/app_flash.c (original)
+++ team/kpfleming/vldtmf/apps/app_flash.c Wed Feb  1 17:17:41 2006
@@ -82,7 +82,7 @@
 	struct localuser *u;
 	struct zt_params ztp;
 	LOCAL_USER_ADD(u);
-	if (!strcasecmp(chan->type, "Zap")) {
+	if (!strcasecmp(chan->tech->type, "Zap")) {
 		memset(&ztp, 0, sizeof(ztp));
 		res = ioctl(chan->fds[0], ZT_GET_PARAMS, &ztp);
 		if (!res) {

Modified: team/kpfleming/vldtmf/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/team/kpfleming/vldtmf/apps/app_meetme.c?rev=9061&r1=9060&r2=9061&view=diff
==============================================================================
--- team/kpfleming/vldtmf/apps/app_meetme.c (original)
+++ team/kpfleming/vldtmf/apps/app_meetme.c Wed Feb  1 17:17:41 2006
@@ -996,7 +996,7 @@
 	}
 
 	ast_indicate(chan, -1);
-	retryzap = strcasecmp(chan->type, "Zap");
+	retryzap = strcasecmp(chan->tech->type, "Zap");
 	user->zapchannel = !retryzap;
 
  zapretry:
@@ -1302,7 +1302,7 @@
 						using_pseudo = 0;
 					}
 					ast_log(LOG_DEBUG, "Ooh, something swapped out under us, starting over\n");
-					retryzap = strcasecmp(c->type, "Zap");
+					retryzap = strcasecmp(c->tech->type, "Zap");
 					user->zapchannel = !retryzap;
 					goto zapretry;
 				}

Modified: team/kpfleming/vldtmf/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/team/kpfleming/vldtmf/apps/app_queue.c?rev=9061&r1=9060&r2=9061&view=diff
==============================================================================
--- team/kpfleming/vldtmf/apps/app_queue.c (original)
+++ team/kpfleming/vldtmf/apps/app_queue.c Wed Feb  1 17:17:41 2006
@@ -91,6 +91,7 @@
 #include "asterisk/causes.h"
 #include "asterisk/astdb.h"
 #include "asterisk/devicestate.h"
+#include "asterisk/stringfields.h"
 
 #define QUEUE_STRATEGY_RINGALL		0
 #define QUEUE_STRATEGY_ROUNDROBIN	1
@@ -1735,7 +1736,7 @@
 							if (!o->chan->cid.cid_name)
 								ast_log(LOG_WARNING, "Out of memory\n");	
 						}
-						ast_copy_string(o->chan->accountcode, in->accountcode, sizeof(o->chan->accountcode));
+						ast_string_field_set(o->chan, accountcode, in->accountcode);
 						o->chan->cdrflags = in->cdrflags;
 
 						if (in->cid.cid_ani) {
@@ -2182,9 +2183,9 @@
 		   we will always return with -1 so that it is hung up properly after the 
 		   conversation.  */
 		qe->handled++;
-		if (!strcmp(qe->chan->type,"Zap"))
+		if (!strcmp(qe->chan->tech->type, "Zap"))
 			ast_channel_setoption(qe->chan, AST_OPTION_TONE_VERIFY, &nondataquality, sizeof(nondataquality), 0);
-		if (!strcmp(peer->type,"Zap"))
+		if (!strcmp(peer->tech->type, "Zap"))
 			ast_channel_setoption(peer, AST_OPTION_TONE_VERIFY, &nondataquality, sizeof(nondataquality), 0);
 		/* Update parameters for the queue */
 		recalc_holdtime(qe);

Modified: team/kpfleming/vldtmf/apps/app_softhangup.c
URL: http://svn.digium.com/view/asterisk/team/kpfleming/vldtmf/apps/app_softhangup.c?rev=9061&r1=9060&r2=9061&view=diff
==============================================================================
--- team/kpfleming/vldtmf/apps/app_softhangup.c (original)
+++ team/kpfleming/vldtmf/apps/app_softhangup.c Wed Feb  1 17:17:41 2006
@@ -84,7 +84,7 @@
 		/* XXX watch out, i think it is wrong to access c-> after unlocking! */
 		if (all) {
 			/* CAPI is set up like CAPI[foo/bar]/clcnt */ 
-			if (!strcmp(c->type,"CAPI")) 
+			if (!strcmp(c->tech->type, "CAPI")) 
 				cut = strrchr(name,'/');
 			/* Basically everything else is Foo/Bar-Z */
 			else

Modified: team/kpfleming/vldtmf/apps/app_transfer.c
URL: http://svn.digium.com/view/asterisk/team/kpfleming/vldtmf/apps/app_transfer.c?rev=9061&r1=9060&r2=9061&view=diff
==============================================================================
--- team/kpfleming/vldtmf/apps/app_transfer.c (original)
+++ team/kpfleming/vldtmf/apps/app_transfer.c Wed Feb  1 17:17:41 2006
@@ -113,7 +113,7 @@
 		tech = dest;
 		dest = slash + 1;
 		/* Allow execution only if the Tech/destination agrees with the type of the channel */
-		if (strncasecmp(chan->type, tech, len)) {
+		if (strncasecmp(chan->tech->type, tech, len)) {
 			pbx_builtin_setvar_helper(chan, "TRANSFERSTATUS", "FAILURE");
 			LOCAL_USER_REMOVE(u);
 			return 0;

Modified: team/kpfleming/vldtmf/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/team/kpfleming/vldtmf/apps/app_voicemail.c?rev=9061&r1=9060&r2=9061&view=diff
==============================================================================
--- team/kpfleming/vldtmf/apps/app_voicemail.c (original)
+++ team/kpfleming/vldtmf/apps/app_voicemail.c Wed Feb  1 17:17:41 2006
@@ -72,6 +72,7 @@
 #include "asterisk/localtime.h"
 #include "asterisk/cli.h"
 #include "asterisk/utils.h"
+#include "asterisk/stringfields.h"
 #ifdef USE_ODBC_STORAGE
 #include "asterisk/res_odbc.h"
 #endif
@@ -2655,7 +2656,7 @@
 }
 
 
-static int say_and_wait(struct ast_channel *chan, int num, char *language)
+static int say_and_wait(struct ast_channel *chan, int num, const char *language)
 {
 	int d;
 	d = ast_say_number(chan, num, AST_DIGIT_ANY, language, (char *) NULL);
@@ -5150,7 +5151,7 @@
 	
 	/* Set language from config to override channel language */
 	if (!ast_strlen_zero(vmu->language))
-		ast_copy_string(chan->language, vmu->language, sizeof(chan->language));
+		ast_string_field_set(chan, language, vmu->language);
 	create_dirpath(vms.curdir, sizeof(vms.curdir), vmu->context, vms.username, "");
 	/* Retrieve old and new message counts */
 	res = open_mailbox(&vms, vmu, 1);

Modified: team/kpfleming/vldtmf/apps/app_zapbarge.c
URL: http://svn.digium.com/view/asterisk/team/kpfleming/vldtmf/apps/app_zapbarge.c?rev=9061&r1=9060&r2=9061&view=diff
==============================================================================
--- team/kpfleming/vldtmf/apps/app_zapbarge.c (original)
+++ team/kpfleming/vldtmf/apps/app_zapbarge.c Wed Feb  1 17:17:41 2006
@@ -131,7 +131,7 @@
 		goto outrun;
 	}
 	ast_indicate(chan, -1);
-	retryzap = strcasecmp(chan->type, "Zap");
+	retryzap = strcasecmp(chan->tech->type, "Zap");
 zapretry:
 	origfd = chan->fds[0];
 	if (retryzap) {

Modified: team/kpfleming/vldtmf/apps/app_zapras.c
URL: http://svn.digium.com/view/asterisk/team/kpfleming/vldtmf/apps/app_zapras.c?rev=9061&r1=9060&r2=9061&view=diff
==============================================================================
--- team/kpfleming/vldtmf/apps/app_zapras.c (original)
+++ team/kpfleming/vldtmf/apps/app_zapras.c Wed Feb  1 17:17:41 2006
@@ -217,7 +217,7 @@
 	/* Answer the channel if it's not up */
 	if (chan->_state != AST_STATE_UP)
 		ast_answer(chan);
-	if (strcasecmp(chan->type, "Zap")) {
+	if (strcasecmp(chan->tech->type, "Zap")) {
 		/* If it's not a zap channel, we're done.  Wait a couple of
 		   seconds and then hangup... */
 		if (option_verbose > 1)

Modified: team/kpfleming/vldtmf/apps/app_zapscan.c
URL: http://svn.digium.com/view/asterisk/team/kpfleming/vldtmf/apps/app_zapscan.c?rev=9061&r1=9060&r2=9061&view=diff
==============================================================================
--- team/kpfleming/vldtmf/apps/app_zapscan.c (original)
+++ team/kpfleming/vldtmf/apps/app_zapscan.c Wed Feb  1 17:17:41 2006
@@ -137,7 +137,7 @@
 		goto outrun;
 	}
 	ast_indicate(chan, -1);
-	retryzap = strcasecmp(chan->type, "Zap");
+	retryzap = strcasecmp(chan->tech->type, "Zap");
  zapretry:
 	origfd = chan->fds[0];
 	if (retryzap) {
@@ -345,7 +345,7 @@
 				continue;
 			}
 		}
-		if ( tempchan && tempchan->type && (!strcmp(tempchan->type, "Zap")) && (tempchan != chan) ) {
+		if (tempchan && (!strcmp(tempchan->tech->type, "Zap")) && (tempchan != chan) ) {
 			ast_verbose(VERBOSE_PREFIX_3 "Zap channel %s is in-use, monitoring...\n", tempchan->name);
 			ast_copy_string(confstr, tempchan->name, sizeof(confstr));
 			ast_mutex_unlock(&tempchan->lock);

Modified: team/kpfleming/vldtmf/cdr.c
URL: http://svn.digium.com/view/asterisk/team/kpfleming/vldtmf/cdr.c?rev=9061&r1=9060&r2=9061&view=diff
==============================================================================
--- team/kpfleming/vldtmf/cdr.c (original)
+++ team/kpfleming/vldtmf/cdr.c Wed Feb  1 17:17:41 2006
@@ -54,6 +54,7 @@
 #include "asterisk/config.h"
 #include "asterisk/cli.h"
 #include "asterisk/module.h"
+#include "asterisk/stringfields.h"
 
 /*! Default AMA flag for billing records (CDR's) */
 int ast_default_amaflags = AST_CDR_DOCUMENTATION;
@@ -535,7 +536,7 @@
 	return res;
 }
 
-void ast_cdr_setdestchan(struct ast_cdr *cdr, char *chann)
+void ast_cdr_setdestchan(struct ast_cdr *cdr, const char *chann)
 {
 	char *chan; 
 
@@ -682,7 +683,7 @@
 {
 	struct ast_cdr *cdr = chan->cdr;
 
-	ast_copy_string(chan->accountcode, account, sizeof(chan->accountcode));
+	ast_string_field_set(chan, accountcode, account);
 	while (cdr) {
 		if (!ast_test_flag(cdr, AST_CDR_FLAG_LOCKED))
 			ast_copy_string(cdr->accountcode, chan->accountcode, sizeof(cdr->accountcode));

Modified: team/kpfleming/vldtmf/cdr/Makefile
URL: http://svn.digium.com/view/asterisk/team/kpfleming/vldtmf/cdr/Makefile?rev=9061&r1=9060&r2=9061&view=diff
==============================================================================
--- team/kpfleming/vldtmf/cdr/Makefile (original)
+++ team/kpfleming/vldtmf/cdr/Makefile Wed Feb  1 17:17:41 2006
@@ -112,6 +112,8 @@
 install: all
 	for x in $(MODS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
 
+uninstall:
+
 clean:
 	rm -f *.so *.o .depend
 

Modified: team/kpfleming/vldtmf/channel.c
URL: http://svn.digium.com/view/asterisk/team/kpfleming/vldtmf/channel.c?rev=9061&r1=9060&r2=9061&view=diff
==============================================================================
--- team/kpfleming/vldtmf/channel.c (original)
+++ team/kpfleming/vldtmf/channel.c Wed Feb  1 17:17:41 2006
@@ -604,6 +604,8 @@
 		return NULL;
 	}
 	
+	ast_string_field_init(tmp, 128);
+
 	/* Don't bother initializing the last two FD here, because they
 	   will *always* be set just a few lines down (AST_TIMING_FD,
 	   AST_ALERT_FD). */
@@ -642,7 +644,7 @@
 	tmp->fds[AST_ALERT_FD] = tmp->alertpipe[0];
 	/* And timing pipe */
 	tmp->fds[AST_TIMING_FD] = tmp->timingfd;
-	strcpy(tmp->name, "**Unknown**");
+	ast_string_field_set(tmp, name, "**Unknown**");
 	/* Initial state */
 	tmp->_state = AST_STATE_DOWN;
 	tmp->streamid = -1;
@@ -659,11 +661,11 @@
 	AST_LIST_HEAD_INIT_NOLOCK(&tmp->readq);
 	AST_LIST_HEAD_INIT_NOLOCK(&tmp->dtmfq);
 	strcpy(tmp->context, "default");
-	ast_copy_string(tmp->language, defaultlanguage, sizeof(tmp->language));
+	ast_string_field_set(tmp, language, defaultlanguage);
 	strcpy(tmp->exten, "s");
 	tmp->priority = 1;
 	tmp->amaflags = ast_default_amaflags;
-	ast_copy_string(tmp->accountcode, ast_default_accountcode, sizeof(tmp->accountcode));
+	ast_string_field_set(tmp, accountcode, ast_default_accountcode);
 
 	tmp->tech = &null_tech;
 
@@ -2786,10 +2788,8 @@
 
 void ast_change_name(struct ast_channel *chan, char *newname)
 {
-	char tmp[256];
-	ast_copy_string(tmp, chan->name, sizeof(tmp));
-	ast_copy_string(chan->name, newname, sizeof(chan->name));
-	manager_event(EVENT_FLAG_CALL, "Rename", "Oldname: %s\r\nNewname: %s\r\nUniqueid: %s\r\n", tmp, chan->name, chan->uniqueid);
+	manager_event(EVENT_FLAG_CALL, "Rename", "Oldname: %s\r\nNewname: %s\r\nUniqueid: %s\r\n", chan->name, newname, chan->uniqueid);
+	ast_string_field_set(chan, name, newname);
 }
 
 void ast_channel_inherit_variables(const struct ast_channel *parent, struct ast_channel *child)
@@ -2922,10 +2922,10 @@
 	snprintf(masqn, sizeof(masqn), "%s<MASQ>", newn);
 		
 	/* Copy the name from the clone channel */
-	ast_copy_string(original->name, newn, sizeof(original->name));
+	ast_string_field_set(original, name, newn);
 
 	/* Mangle the name of the clone channel */
-	ast_copy_string(clone->name, masqn, sizeof(clone->name));
+	ast_string_field_set(clone, name, masqn);
 	
 	/* Notify any managers of the change, first the masq then the other */
 	manager_event(EVENT_FLAG_CALL, "Rename", "Oldname: %s\r\nNewname: %s\r\nUniqueid: %s\r\n", newn, masqn, clone->uniqueid);
@@ -3006,17 +3006,16 @@
 	
 	snprintf(zombn, sizeof(zombn), "%s<ZOMBIE>", orig);
 	/* Mangle the name of the clone channel */
-	ast_copy_string(clone->name, zombn, sizeof(clone->name));
+	ast_string_field_set(clone, name, zombn);
 	manager_event(EVENT_FLAG_CALL, "Rename", "Oldname: %s\r\nNewname: %s\r\nUniqueid: %s\r\n", masqn, zombn, clone->uniqueid);
 
 	/* Update the type. */
-	original->type = clone->type;
 	t_pvt = original->monitor;
 	original->monitor = clone->monitor;
 	clone->monitor = t_pvt;
 	
 	/* Keep the same language.  */
-	ast_copy_string(original->language, clone->language, sizeof(original->language));
+	ast_string_field_set(original, language, clone->language);
 	/* Copy the FD's other than the generator fd */
 	for (x = 0; x < AST_MAX_FDS; x++) {
 		if (x != AST_GENERATOR_FD)
@@ -3059,7 +3058,7 @@
 	ast_set_read_format(original, rformat);
 
 	/* Copy the music class */
-	ast_copy_string(original->musicclass, clone->musicclass, sizeof(original->musicclass));
+	ast_string_field_set(original, musicclass, clone->musicclass);
 
 	ast_log(LOG_DEBUG, "Putting channel %s in %d/%d formats\n", original->name, wformat, rformat);
 
@@ -3069,13 +3068,13 @@
 		res = original->tech->fixup(clone, original);
 		if (res) {
 			ast_log(LOG_WARNING, "Channel for type '%s' could not fixup channel %s\n",
-				original->type, original->name);
+				original->tech->type, original->name);
 			ast_mutex_unlock(&clone->lock);
 			return -1;
 		}
 	} else
 		ast_log(LOG_WARNING, "Channel type '%s' does not have a fixup routine (for %s)!  Bad things may happen.\n",
-			original->type, original->name);
+			original->tech->type, original->name);
 	
 	/* Now, at this point, the "clone" channel is totally F'd up.  We mark it as
 	   a zombie so nothing tries to touch it.  If it's already been marked as a
@@ -3755,15 +3754,13 @@
 	return group;
 }
 
-static int (*ast_moh_start_ptr)(struct ast_channel *, char *) = NULL;
+static int (*ast_moh_start_ptr)(struct ast_channel *, const char *) = NULL;
 static void (*ast_moh_stop_ptr)(struct ast_channel *) = NULL;
 static void (*ast_moh_cleanup_ptr)(struct ast_channel *) = NULL;
 
-
-void ast_install_music_functions(int (*start_ptr)(struct ast_channel *, char *),
-								 void (*stop_ptr)(struct ast_channel *),
-								 void (*cleanup_ptr)(struct ast_channel *)
-								 ) 
+void ast_install_music_functions(int (*start_ptr)(struct ast_channel *, const char *),
+				 void (*stop_ptr)(struct ast_channel *),
+				 void (*cleanup_ptr)(struct ast_channel *))
 {
 	ast_moh_start_ptr = start_ptr;
 	ast_moh_stop_ptr = stop_ptr;
@@ -3778,7 +3775,7 @@
 }
 
 /*! \brief Turn on music on hold on a given channel */
-int ast_moh_start(struct ast_channel *chan, char *mclass) 
+int ast_moh_start(struct ast_channel *chan, const char *mclass) 
 {
 	if (ast_moh_start_ptr)
 		return ast_moh_start_ptr(chan, mclass);

Modified: team/kpfleming/vldtmf/channels/chan_agent.c
URL: http://svn.digium.com/view/asterisk/team/kpfleming/vldtmf/channels/chan_agent.c?rev=9061&r1=9060&r2=9061&view=diff
==============================================================================
--- team/kpfleming/vldtmf/channels/chan_agent.c (original)
+++ team/kpfleming/vldtmf/channels/chan_agent.c Wed Feb  1 17:17:41 2006
@@ -71,9 +71,9 @@
 #include "asterisk/astdb.h"
 #include "asterisk/devicestate.h"
 #include "asterisk/monitor.h"
+#include "asterisk/stringfields.h"
 
 static const char desc[] = "Agent Proxy Channel";
-static const char channeltype[] = "Agent";
 static const char tdesc[] = "Call Agent Proxy Channel";
 static const char config[] = "agents.conf";
 
@@ -257,7 +257,7 @@
 static void set_agentbycallerid(const char *callerid, const char *agent);
 
 static const struct ast_channel_tech agent_tech = {
-	.type = channeltype,
+	.type = "Agent",
 	.description = tdesc,
 	.capabilities = -1,
 	.requester = agent_request,
@@ -520,7 +520,7 @@
 
 	CLEANUP(ast,p);
 	if (p->chan && !p->chan->_bridge) {
-		if (strcasecmp(p->chan->type, "Local")) {
+		if (strcasecmp(p->chan->tech->type, "Local")) {
 			p->chan->_bridge = ast;
 			if (p->chan)
 				ast_log(LOG_DEBUG, "Bridge on '%s' being set to '%s' (3)\n", p->chan->name, p->chan->_bridge->name);
@@ -913,7 +913,7 @@
 			tmp->rawwriteformat = p->chan->writeformat;
 			tmp->readformat = p->chan->readformat;
 			tmp->rawreadformat = p->chan->readformat;
-			ast_copy_string(tmp->language, p->chan->language, sizeof(tmp->language));
+			ast_string_field_set(tmp, language, p->chan->language);
 			ast_copy_string(tmp->context, p->chan->context, sizeof(tmp->context));
 			ast_copy_string(tmp->exten, p->chan->exten, sizeof(tmp->exten));
 		} else {
@@ -924,10 +924,9 @@
 			tmp->rawreadformat = AST_FORMAT_SLINEAR;
 		}
 		if (p->pending)
-			snprintf(tmp->name, sizeof(tmp->name), "Agent/P%s-%d", p->agent, rand() & 0xffff);
+			ast_string_field_build(tmp, name, "Agent/P%s-%d", p->agent, rand() & 0xffff);
 		else
-			snprintf(tmp->name, sizeof(tmp->name), "Agent/%s", p->agent);
-		tmp->type = channeltype;
+			ast_string_field_build(tmp, name, "Agent/%s", p->agent);
 		/* Safe, agentlock already held */
 		ast_setstate(tmp, state);
 		tmp->tech_pvt = p;
@@ -2491,7 +2490,7 @@
 {
 	/* Make sure we can register our agent channel type */
 	if (ast_channel_register(&agent_tech)) {
-		ast_log(LOG_ERROR, "Unable to register channel class %s\n", channeltype);
+		ast_log(LOG_ERROR, "Unable to register channel class 'Agent'\n");
 		return -1;
 	}
 	/* Dialplan applications */

Modified: team/kpfleming/vldtmf/channels/chan_alsa.c
URL: http://svn.digium.com/view/asterisk/team/kpfleming/vldtmf/channels/chan_alsa.c?rev=9061&r1=9060&r2=9061&view=diff
==============================================================================
--- team/kpfleming/vldtmf/channels/chan_alsa.c (original)
+++ team/kpfleming/vldtmf/channels/chan_alsa.c Wed Feb  1 17:17:41 2006
@@ -56,6 +56,7 @@
 #include "asterisk/utils.h"
 #include "asterisk/causes.h"
 #include "asterisk/endian.h"
+#include "asterisk/stringfields.h"
 
 #include "busy.h"
 #include "ringtone.h"
@@ -105,7 +106,6 @@
 AST_MUTEX_DEFINE_STATIC(usecnt_lock);
 AST_MUTEX_DEFINE_STATIC(alsalock);
 
-static const char type[] = "Console";
 static const char desc[] = "ALSA Console Channel Driver";
 static const char tdesc[] = "ALSA Console Channel Driver";
 static const char config[] = "alsa.conf";
@@ -184,7 +184,7 @@
 static int alsa_fixup(struct ast_channel *oldchan, struct ast_channel *newchan);
 
 static const struct ast_channel_tech alsa_tech = {
-	.type = type,
+	.type = "Console",
 	.description = tdesc,
 	.capabilities = AST_FORMAT_SLINEAR,
 	.requester = alsa_request,
@@ -681,7 +681,7 @@
 	f.datalen = 0;
 	f.data = NULL;
 	f.offset = 0;
-	f.src = type;
+	f.src = "Console";
 	f.mallocd = 0;
 	f.delivery.tv_sec = 0;
 	f.delivery.tv_usec = 0;
@@ -727,7 +727,7 @@
 		f.datalen = FRAME_SIZE * 2;
 		f.data = buf;
 		f.offset = AST_FRIENDLY_OFFSET;
-		f.src = type;
+		f.src = "Console";
 		f.mallocd = 0;
 #ifdef ALSA_MONITOR
 		alsa_monitor_read((char *)buf, FRAME_SIZE * 2);
@@ -784,8 +784,7 @@
 	tmp = ast_channel_alloc(1);
 	if (tmp) {
 		tmp->tech = &alsa_tech;
-		snprintf(tmp->name, sizeof(tmp->name), "ALSA/%s", indevname);
-		tmp->type = type;
+		ast_string_field_build(tmp, name, "ALSA/%s", indevname);
 		tmp->fds[0] = readdev;
 		tmp->nativeformats = AST_FORMAT_SLINEAR;
 		tmp->readformat = AST_FORMAT_SLINEAR;
@@ -796,7 +795,7 @@
 		if (!ast_strlen_zero(p->exten))
 			ast_copy_string(tmp->exten, p->exten, sizeof(tmp->exten));
 		if (!ast_strlen_zero(language))
-			ast_copy_string(tmp->language, language, sizeof(tmp->language));
+			ast_string_field_set(tmp, language, language);
 		p->owner = tmp;
 		ast_setstate(tmp, state);
 		ast_mutex_lock(&usecnt_lock);
@@ -857,7 +856,7 @@
 	return res;
 }
 
-static char *autoanswer_complete(char *line, char *word, int pos, int state)
+static char *autoanswer_complete(const char *line, const char *word, int pos, int state)
 {
 #ifndef MIN
 #define MIN(a,b) ((a) < (b) ? (a) : (b))
@@ -875,7 +874,7 @@
 	return NULL;
 }
 
-static char autoanswer_usage[] =
+static const char autoanswer_usage[] =
 "Usage: autoanswer [on|off]\n"
 "       Enables or disables autoanswer feature.  If used without\n"
 "       argument, displays the current on/off status of autoanswer.\n"
@@ -1088,7 +1087,7 @@
 
 	res = ast_channel_register(&alsa_tech);
 	if (res < 0) {
-		ast_log(LOG_ERROR, "Unable to register channel class '%s'\n", type);
+		ast_log(LOG_ERROR, "Unable to register channel class 'Console'\n");
 		return -1;
 	}
 	for (x=0;x<sizeof(myclis)/sizeof(struct ast_cli_entry); x++)

Modified: team/kpfleming/vldtmf/channels/chan_features.c
URL: http://svn.digium.com/view/asterisk/team/kpfleming/vldtmf/channels/chan_features.c?rev=9061&r1=9060&r2=9061&view=diff
==============================================================================
--- team/kpfleming/vldtmf/channels/chan_features.c (original)
+++ team/kpfleming/vldtmf/channels/chan_features.c Wed Feb  1 17:17:41 2006
@@ -61,9 +61,9 @@
 #include "asterisk/app.h"
 #include "asterisk/musiconhold.h"
 #include "asterisk/manager.h"
+#include "asterisk/stringfields.h"
 
 static const char desc[] = "Feature Proxy Channel";
-static const char type[] = "Feature";
 static const char tdesc[] = "Feature Proxy Channel Driver";
 
 static int usecnt =0;
@@ -106,7 +106,7 @@
 static int features_fixup(struct ast_channel *oldchan, struct ast_channel *newchan);
 
 static const struct ast_channel_tech features_tech = {
-	.type = type,
+	.type = "Feature",
 	.description = tdesc,
 	.capabilities = -1,
 	.requester = features_request,
@@ -349,8 +349,8 @@
 				p->subchan->cid.cid_ani = NULL;
 		
 			p->subchan->cid.cid_pres = p->owner->cid.cid_pres;
-			strncpy(p->subchan->language, p->owner->language, sizeof(p->subchan->language) - 1);
-			strncpy(p->subchan->accountcode, p->owner->accountcode, sizeof(p->subchan->accountcode) - 1);
+			ast_string_field_set(p->subchan, language, p->owner->language);
+			ast_string_field_set(p->subchan, accountcode, p->owner->accountcode);
 			p->subchan->cdrflags = p->owner->cdrflags;
 			res = ast_call(p->subchan, dest2, timeout);
 			update_features(p, x);
@@ -464,7 +464,7 @@
 	}
 	tmp->tech = &features_tech;
 	for (x=1;x<4;x++) {
-		snprintf(tmp->name, sizeof(tmp->name), "Feature/%s/%s-%d", p->tech, p->dest, x);
+		ast_string_field_build(tmp, name, "Feature/%s/%s-%d", p->tech, p->dest, x);
 		for (y=0;y<3;y++) {
 			if (y == index)
 				continue;
@@ -474,7 +474,6 @@
 		if (y >= 3)
 			break;
 	}
-	tmp->type = type;
 	ast_setstate(tmp, state);
 	tmp->writeformat = p->subchan->writeformat;
 	tmp->rawwriteformat = p->subchan->rawwriteformat;
@@ -540,7 +539,7 @@
 {
 	/* Make sure we can register our sip channel type */
 	if (ast_channel_register(&features_tech)) {
-		ast_log(LOG_ERROR, "Unable to register channel class %s\n", type);
+		ast_log(LOG_ERROR, "Unable to register channel class 'Feature'\n");
 		return -1;
 	}
 	ast_cli_register(&cli_show_features);

Modified: team/kpfleming/vldtmf/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/team/kpfleming/vldtmf/channels/chan_iax2.c?rev=9061&r1=9060&r2=9061&view=diff
==============================================================================
--- team/kpfleming/vldtmf/channels/chan_iax2.c (original)
+++ team/kpfleming/vldtmf/channels/chan_iax2.c Wed Feb  1 17:17:41 2006
@@ -90,6 +90,7 @@
 #include "asterisk/dnsmgr.h"
 #include "asterisk/devicestate.h"
 #include "asterisk/netsock.h"
+#include "asterisk/stringfields.h"
 
 #include "iax2.h"
 #include "iax2-parser.h"
@@ -141,7 +142,6 @@
 
 static const char desc[] = "Inter Asterisk eXchange (Ver 2)";
 static const char tdesc[] = "Inter Asterisk eXchange Driver (Ver 2)";
-static const char channeltype[] = "IAX2";
 
 static char context[80] = "default";
 
@@ -747,7 +747,7 @@
 static int iax2_fixup(struct ast_channel *oldchannel, struct ast_channel *newchan);
 
 static const struct ast_channel_tech iax2_tech = {
-	.type = channeltype,
+	.type = "IAX2",
 	.description = tdesc,
 	.capabilities = IAX_CAPABILITY_FULLBANDWIDTH,
 	.properties = AST_CHAN_TP_WANTSJITTER,
@@ -3175,16 +3175,16 @@
 	cs[1] = c1;
 	for (/* ever */;;) {
 		/* Check in case we got masqueraded into */
-		if ((c0->type != channeltype) || (c1->type != channeltype)) {
+		if ((c0->tech != &iax2_tech) || (c1->tech != &iax2_tech)) {
 			if (option_verbose > 2)
 				ast_verbose(VERBOSE_PREFIX_3 "Can't masquerade, we're different...\n");
 			/* Remove from native mode */
-			if (c0->type == channeltype) {
+			if (c0->tech == &iax2_tech) {
 				ast_mutex_lock(&iaxsl[callno0]);
 				iaxs[callno0]->bridgecallno = 0;
 				ast_mutex_unlock(&iaxsl[callno0]);
 			}
-			if (c1->type == channeltype) {
+			if (c1->tech == &iax2_tech) {
 				ast_mutex_lock(&iaxsl[callno1]);
 				iaxs[callno1]->bridgecallno = 0;
 				ast_mutex_unlock(&iaxsl[callno1]);
@@ -3387,8 +3387,7 @@
 	i = iaxs[callno];
 	if (i && tmp) {
 		tmp->tech = &iax2_tech;
-		snprintf(tmp->name, sizeof(tmp->name), "IAX2/%s-%d", i->host, i->callno);
-		tmp->type = channeltype;
+		ast_string_field_build(tmp, name, "IAX2/%s-%d", i->host, i->callno);
 		/* We can support any format by default, until we get restricted */
 		tmp->nativeformats = capability;
 		tmp->readformat = ast_best_codec(capability);
@@ -3402,7 +3401,7 @@
 		if (!ast_strlen_zero(i->ani))
 			tmp->cid.cid_ani = ast_strdup(i->ani);
 		if (!ast_strlen_zero(i->language))
-			ast_copy_string(tmp->language, i->language, sizeof(tmp->language));
+			ast_string_field_set(tmp, language, i->language);
 		if (!ast_strlen_zero(i->dnid))
 			tmp->cid.cid_dnid = ast_strdup(i->dnid);
 		if (!ast_strlen_zero(i->rdnis))
@@ -3411,7 +3410,7 @@
 		tmp->cid.cid_ton = i->calling_ton;
 		tmp->cid.cid_tns = i->calling_tns;
 		if (!ast_strlen_zero(i->accountcode))
-			ast_copy_string(tmp->accountcode, i->accountcode, sizeof(tmp->accountcode));
+			ast_string_field_set(tmp, accountcode, i->accountcode);
 		if (i->amaflags)
 			tmp->amaflags = i->amaflags;
 		ast_copy_string(tmp->context, i->context, sizeof(tmp->context));
@@ -5538,7 +5537,8 @@
 		while((ext = strsep(&stringp, "&"))) {
 			if (onoff) {
 				if (!ast_exists_extension(NULL, regcontext, ext, 1, NULL))
-					ast_add_extension(regcontext, 1, ext, 1, NULL, NULL, "Noop", ast_strdup(peer->name), free, channeltype);
+					ast_add_extension(regcontext, 1, ext, 1, NULL, NULL,
+							  "Noop", ast_strdup(peer->name), free, "IAX2");
 			} else
 				ast_context_remove_extension(regcontext, ext, 1, NULL);
 		}
@@ -6140,7 +6140,7 @@
 	chan1m = ast_channel_alloc(0);
 	chan2m = ast_channel_alloc(0);
 	if (chan2m && chan1m) {
-		snprintf(chan1m->name, sizeof(chan1m->name), "Parking/%s", chan1->name);
+		ast_string_field_build(chan1m, name, "Parking/%s", chan1->name);
 		/* Make formats okay */
 		chan1m->readformat = chan1->readformat;
 		chan1m->writeformat = chan1->writeformat;
@@ -6152,7 +6152,7 @@
 		
 		/* We make a clone of the peer channel too, so we can play
 		   back the announcement */
-		snprintf(chan2m->name, sizeof (chan2m->name), "IAXPeer/%s",chan2->name);
+		ast_string_field_build(chan2m, name, "IAXPeer/%s",chan2->name);
 		/* Make formats okay */
 		chan2m->readformat = chan2->readformat;
 		chan2m->writeformat = chan2->writeformat;
@@ -7716,7 +7716,7 @@
 	if (opts)
 		*opts='\0';

[... 1730 lines stripped ...]


More information about the asterisk-commits mailing list