[asterisk-commits] moy: branch moy/dahdi-tap-1.6.2 r220440 - /team/moy/dahdi-tap-1.6.2/channels/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Sep 24 18:24:36 CDT 2009


Author: moy
Date: Thu Sep 24 18:24:31 2009
New Revision: 220440

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=220440
Log:
make the extension for the recordings configurable

Modified:
    team/moy/dahdi-tap-1.6.2/channels/chan_dahdi.c

Modified: team/moy/dahdi-tap-1.6.2/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/team/moy/dahdi-tap-1.6.2/channels/chan_dahdi.c?view=diff&rev=220440&r1=220439&r2=220440
==============================================================================
--- team/moy/dahdi-tap-1.6.2/channels/chan_dahdi.c (original)
+++ team/moy/dahdi-tap-1.6.2/channels/chan_dahdi.c Thu Sep 24 18:24:31 2009
@@ -567,6 +567,9 @@
 	int passive;
 	/* TODO: allocate this structures on demand only when the pri is flagged as passive */
 	struct dahdi_pcall pcalls[MAX_CHANNELS];		        /*!< Passive calls if any.*/
+#define MAX_FORMAT_EXTEN 10
+#define DEFAULT_RECORDING_EXTEN "wav49"
+	char passiverecordexten[MAX_FORMAT_EXTEN];                         /*!< Record format extension */
 	struct dahdi_pvt *pvts[MAX_CHANNELS];				/*!< Member channel pvt structs */
 	struct dahdi_pvt *crvs;						/*!< Member CRV structs */
 	struct dahdi_pvt *crvend;					/*!< Pointer to end of CRV structs */
@@ -10267,6 +10270,11 @@
 						pris[span].minidle = conf->pri.minidle;
 						pris[span].overlapdial = conf->pri.overlapdial;
 						pris[span].passive = conf->pri.passive;
+						if (ast_strlen_zero(conf->pri.passiverecordexten)) {
+							ast_copy_string(pris[span].passiverecordexten, DEFAULT_RECORDING_EXTEN, sizeof(pris[span].passiverecordexten));
+						} else {
+							ast_copy_string(pris[span].passiverecordexten, conf->pri.passiverecordexten, sizeof(pris[span].passiverecordexten));
+						}
 						pris[span].qsigchannelmapping = conf->pri.qsigchannelmapping;
 						pris[span].discardremoteholdretrieval = conf->pri.discardremoteholdretrieval;
 #ifdef HAVE_PRI_INBANDDISCONNECT
@@ -12630,8 +12638,8 @@
 		now = ast_tvnow();	
 		ast_localtime(&now, &tm, NULL);
 		ast_strftime(datestr, sizeof(datestr), "%F-%H-%M-%S", &tm);
-		snprintf(mixfilename, sizeof(mixfilename), "dahdi-tap-%s-span-%d-chan-%d-mix.wav", 
-			datestr, pri->span, PRI_CHANNEL(e->answer.channel));
+		snprintf(mixfilename, sizeof(mixfilename), "dahdi-tap-%s-span-%d-chan-%d-mix.%s", 
+			datestr, pri->span, PRI_CHANNEL(e->answer.channel), pri->passiverecordexten);
 		mixfilename[sizeof(mixfilename)-1] = '\0';
 		if (pbx_exec(pri->pvts[chanpos]->owner, app, mixfilename)) {
 			ast_log(LOG_ERROR, "Failed to launch MixMonitor application to record audio for channel number %d/%d on span %d\n",
@@ -17095,6 +17103,8 @@
 				ast_copy_string(confp->pri.idledial, v->value, sizeof(confp->pri.idledial));
 			} else if (!strcasecmp(v->name, "passive")) {
 				confp->pri.passive = ast_true(v->value);
+			} else if (!strcasecmp(v->name, "passiverecordexten")) {
+				ast_copy_string(confp->pri.passiverecordexten, v->value, sizeof(confp->pri.passiverecordexten));
 			} else if (!strcasecmp(v->name, "overlapdial")) {
 				if (ast_true(v->value)) {
 					confp->pri.overlapdial = DAHDI_OVERLAPDIAL_BOTH;




More information about the asterisk-commits mailing list