Revision
14591
Author
anthm
Date
2009-08-21 17:29:44 -0500 (Fri, 21 Aug 2009)

Log Message

add record_start and record_stop events

Modified Paths

Diff

Modified: freeswitch/trunk/libs/esl/php/esl_wrap.cpp (14590 => 14591)


--- freeswitch/trunk/libs/esl/php/esl_wrap.cpp	2009-08-21 22:20:31 UTC (rev 14590)
+++ freeswitch/trunk/libs/esl/php/esl_wrap.cpp	2009-08-21 22:29:44 UTC (rev 14591)
@@ -1091,7 +1091,7 @@
   }
   if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
   
-  /*@SWIG:/usr/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
+  /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
   convert_to_string_ex(args[1]);
   arg2 = (char *) Z_STRVAL_PP(args[1]);
   /*@SWIG@*/;
@@ -1159,7 +1159,7 @@
   }
   if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
   
-  /*@SWIG:/usr/share/swig/1.3.35/php4/utils.i,7,CONVERT_INT_IN@*/
+  /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,7,CONVERT_INT_IN@*/
   convert_to_long_ex(args[1]);
   arg2 = (int) Z_LVAL_PP(args[1]);
   /*@SWIG@*/;
@@ -1213,13 +1213,13 @@
   WRONG_PARAM_COUNT;
   
   
-  /*@SWIG:/usr/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
+  /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
   convert_to_string_ex(args[0]);
   arg1 = (char *) Z_STRVAL_PP(args[0]);
   /*@SWIG@*/;
   
   if(arg_count > 1) {
-    /*@SWIG:/usr/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
+    /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
     convert_to_string_ex(args[1]);
     arg2 = (char *) Z_STRVAL_PP(args[1]);
     /*@SWIG@*/;
@@ -1254,7 +1254,7 @@
     }
   }
   if(arg_count > 1) {
-    /*@SWIG:/usr/share/swig/1.3.35/php4/utils.i,7,CONVERT_INT_IN@*/
+    /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,7,CONVERT_INT_IN@*/
     convert_to_long_ex(args[1]);
     arg2 = (int) Z_LVAL_PP(args[1]);
     /*@SWIG@*/;
@@ -1384,7 +1384,7 @@
   }
   if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
   if(arg_count > 1) {
-    /*@SWIG:/usr/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
+    /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
     convert_to_string_ex(args[1]);
     arg2 = (char *) Z_STRVAL_PP(args[1]);
     /*@SWIG@*/;
@@ -1460,7 +1460,7 @@
   }
   if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
   
-  /*@SWIG:/usr/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
+  /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
   convert_to_string_ex(args[1]);
   arg2 = (char *) Z_STRVAL_PP(args[1]);
   /*@SWIG@*/;
@@ -1557,7 +1557,7 @@
   }
   if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
   
-  /*@SWIG:/usr/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
+  /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
   convert_to_string_ex(args[1]);
   arg2 = (char *) Z_STRVAL_PP(args[1]);
   /*@SWIG@*/;
@@ -1591,13 +1591,13 @@
   }
   if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
   
-  /*@SWIG:/usr/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
+  /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
   convert_to_string_ex(args[1]);
   arg2 = (char *) Z_STRVAL_PP(args[1]);
   /*@SWIG@*/;
   
   
-  /*@SWIG:/usr/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
+  /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
   convert_to_string_ex(args[2]);
   arg3 = (char *) Z_STRVAL_PP(args[2]);
   /*@SWIG@*/;
@@ -1630,7 +1630,7 @@
   }
   if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
   
-  /*@SWIG:/usr/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
+  /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
   convert_to_string_ex(args[1]);
   arg2 = (char *) Z_STRVAL_PP(args[1]);
   /*@SWIG@*/;
@@ -1718,19 +1718,19 @@
   }
   
   
-  /*@SWIG:/usr/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
+  /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
   convert_to_string_ex(args[0]);
   arg1 = (char *) Z_STRVAL_PP(args[0]);
   /*@SWIG@*/;
   
   
-  /*@SWIG:/usr/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
+  /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
   convert_to_string_ex(args[1]);
   arg2 = (char *) Z_STRVAL_PP(args[1]);
   /*@SWIG@*/;
   
   
-  /*@SWIG:/usr/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
+  /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
   convert_to_string_ex(args[2]);
   arg3 = (char *) Z_STRVAL_PP(args[2]);
   /*@SWIG@*/;
@@ -1756,7 +1756,7 @@
   }
   
   
-  /*@SWIG:/usr/share/swig/1.3.35/php4/utils.i,7,CONVERT_INT_IN@*/
+  /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,7,CONVERT_INT_IN@*/
   convert_to_long_ex(args[0]);
   arg1 = (int) Z_LVAL_PP(args[0]);
   /*@SWIG@*/;
@@ -1917,7 +1917,7 @@
   }
   if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
   
-  /*@SWIG:/usr/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
+  /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
   convert_to_string_ex(args[1]);
   arg2 = (char *) Z_STRVAL_PP(args[1]);
   /*@SWIG@*/;
@@ -1950,7 +1950,7 @@
   }
   if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
   
-  /*@SWIG:/usr/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
+  /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
   convert_to_string_ex(args[1]);
   arg2 = (char *) Z_STRVAL_PP(args[1]);
   /*@SWIG@*/;
@@ -1986,13 +1986,13 @@
   }
   if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
   
-  /*@SWIG:/usr/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
+  /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
   convert_to_string_ex(args[1]);
   arg2 = (char *) Z_STRVAL_PP(args[1]);
   /*@SWIG@*/;
   
   if(arg_count > 2) {
-    /*@SWIG:/usr/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
+    /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
     convert_to_string_ex(args[2]);
     arg3 = (char *) Z_STRVAL_PP(args[2]);
     /*@SWIG@*/;
@@ -2029,13 +2029,13 @@
   }
   if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
   
-  /*@SWIG:/usr/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
+  /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
   convert_to_string_ex(args[1]);
   arg2 = (char *) Z_STRVAL_PP(args[1]);
   /*@SWIG@*/;
   
   if(arg_count > 2) {
-    /*@SWIG:/usr/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
+    /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
     convert_to_string_ex(args[2]);
     arg3 = (char *) Z_STRVAL_PP(args[2]);
     /*@SWIG@*/;
@@ -2127,7 +2127,7 @@
   }
   if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
   
-  /*@SWIG:/usr/share/swig/1.3.35/php4/utils.i,7,CONVERT_INT_IN@*/
+  /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,7,CONVERT_INT_IN@*/
   convert_to_long_ex(args[1]);
   arg2 = (int) Z_LVAL_PP(args[1]);
   /*@SWIG@*/;
@@ -2161,13 +2161,13 @@
   }
   if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
   
-  /*@SWIG:/usr/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
+  /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
   convert_to_string_ex(args[1]);
   arg2 = (char *) Z_STRVAL_PP(args[1]);
   /*@SWIG@*/;
   
   
-  /*@SWIG:/usr/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
+  /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
   convert_to_string_ex(args[2]);
   arg3 = (char *) Z_STRVAL_PP(args[2]);
   /*@SWIG@*/;
@@ -2201,13 +2201,13 @@
   }
   if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
   
-  /*@SWIG:/usr/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
+  /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
   convert_to_string_ex(args[1]);
   arg2 = (char *) Z_STRVAL_PP(args[1]);
   /*@SWIG@*/;
   
   
-  /*@SWIG:/usr/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
+  /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
   convert_to_string_ex(args[2]);
   arg3 = (char *) Z_STRVAL_PP(args[2]);
   /*@SWIG@*/;
@@ -2244,20 +2244,20 @@
   }
   if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
   
-  /*@SWIG:/usr/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
+  /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
   convert_to_string_ex(args[1]);
   arg2 = (char *) Z_STRVAL_PP(args[1]);
   /*@SWIG@*/;
   
   if(arg_count > 2) {
-    /*@SWIG:/usr/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
+    /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
     convert_to_string_ex(args[2]);
     arg3 = (char *) Z_STRVAL_PP(args[2]);
     /*@SWIG@*/;
     
   }
   if(arg_count > 3) {
-    /*@SWIG:/usr/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
+    /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
     convert_to_string_ex(args[3]);
     arg4 = (char *) Z_STRVAL_PP(args[3]);
     /*@SWIG@*/;
@@ -2295,20 +2295,20 @@
   }
   if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
   
-  /*@SWIG:/usr/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
+  /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
   convert_to_string_ex(args[1]);
   arg2 = (char *) Z_STRVAL_PP(args[1]);
   /*@SWIG@*/;
   
   if(arg_count > 2) {
-    /*@SWIG:/usr/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
+    /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
     convert_to_string_ex(args[2]);
     arg3 = (char *) Z_STRVAL_PP(args[2]);
     /*@SWIG@*/;
     
   }
   if(arg_count > 3) {
-    /*@SWIG:/usr/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
+    /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
     convert_to_string_ex(args[3]);
     arg4 = (char *) Z_STRVAL_PP(args[3]);
     /*@SWIG@*/;
@@ -2342,7 +2342,7 @@
   }
   if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
   
-  /*@SWIG:/usr/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
+  /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
   convert_to_string_ex(args[1]);
   arg2 = (char *) Z_STRVAL_PP(args[1]);
   /*@SWIG@*/;
@@ -2375,7 +2375,7 @@
   }
   if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
   
-  /*@SWIG:/usr/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
+  /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,26,CONVERT_STRING_IN@*/
   convert_to_string_ex(args[1]);
   arg2 = (char *) Z_STRVAL_PP(args[1]);
   /*@SWIG@*/;
@@ -2426,7 +2426,7 @@
   }
   
   
-  /*@SWIG:/usr/share/swig/1.3.35/php4/utils.i,7,CONVERT_INT_IN@*/
+  /*@SWIG:/usr/local/share/swig/1.3.35/php4/utils.i,7,CONVERT_INT_IN@*/
   convert_to_long_ex(args[0]);
   arg1 = (int) Z_LVAL_PP(args[0]);
   /*@SWIG@*/;

Modified: freeswitch/trunk/libs/esl/ruby/esl_wrap.cpp (14590 => 14591)


--- freeswitch/trunk/libs/esl/ruby/esl_wrap.cpp	2009-08-21 22:20:31 UTC (rev 14590)
+++ freeswitch/trunk/libs/esl/ruby/esl_wrap.cpp	2009-08-21 22:29:44 UTC (rev 14591)
@@ -1902,7 +1902,7 @@
 } 
 
 
-/*@SWIG:/usr/share/swig/1.3.35/ruby/rubyprimtypes.swg,23,%ruby_aux_method@*/
+/*@SWIG:/usr/local/share/swig/1.3.35/ruby/rubyprimtypes.swg,23,%ruby_aux_method@*/
 SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE *args)
 {
   VALUE obj = args[0];

Modified: freeswitch/trunk/libs/esl/src/esl_event.c (14590 => 14591)


--- freeswitch/trunk/libs/esl/src/esl_event.c	2009-08-21 22:20:31 UTC (rev 14590)
+++ freeswitch/trunk/libs/esl/src/esl_event.c	2009-08-21 22:29:44 UTC (rev 14591)
@@ -126,6 +126,8 @@
 	"RECV_INFO",
 	"CALL_SECURE",
 	"NAT",
+	"RECORD_START",
+	"RECORD_STOP",
 	"ALL"
 };
 

Modified: freeswitch/trunk/libs/esl/src/include/esl_event.h (14590 => 14591)


--- freeswitch/trunk/libs/esl/src/include/esl_event.h	2009-08-21 22:20:31 UTC (rev 14590)
+++ freeswitch/trunk/libs/esl/src/include/esl_event.h	2009-08-21 22:29:44 UTC (rev 14591)
@@ -114,6 +114,8 @@
 	ESL_EVENT_RECV_INFO,
 	ESL_EVENT_CALL_SECURE,
 	ESL_EVENT_NAT,
+	ESL_EVENT_RECORD_START,
+	ESL_EVENT_RECORD_STOP,
 	ESL_EVENT_ALL
 } esl_event_types_t;
 

Modified: freeswitch/trunk/src/include/switch_types.h (14590 => 14591)


--- freeswitch/trunk/src/include/switch_types.h	2009-08-21 22:20:31 UTC (rev 14590)
+++ freeswitch/trunk/src/include/switch_types.h	2009-08-21 22:29:44 UTC (rev 14591)
@@ -1280,6 +1280,8 @@
 	SWITCH_EVENT_RECV_INFO,
 	SWITCH_EVENT_CALL_SECURE,
 	SWITCH_EVENT_NAT,
+	SWITCH_EVENT_RECORD_START,
+	SWITCH_EVENT_RECORD_STOP,
 	SWITCH_EVENT_ALL
 } switch_event_types_t;
 

Modified: freeswitch/trunk/src/switch_channel.c (14590 => 14591)


--- freeswitch/trunk/src/switch_channel.c	2009-08-21 22:20:31 UTC (rev 14590)
+++ freeswitch/trunk/src/switch_channel.c	2009-08-21 22:29:44 UTC (rev 14591)
@@ -1365,6 +1365,8 @@
 		event->event_id == SWITCH_EVENT_CHANNEL_EXECUTE_COMPLETE ||
 		event->event_id == SWITCH_EVENT_SESSION_HEARTBEAT ||
 		event->event_id == SWITCH_EVENT_API ||
+		event->event_id == SWITCH_EVENT_RECORD_START ||
+		event->event_id == SWITCH_EVENT_RECORD_STOP ||
 		event->event_id == SWITCH_EVENT_CUSTOM
 		) {
 

Modified: freeswitch/trunk/src/switch_event.c (14590 => 14591)


--- freeswitch/trunk/src/switch_event.c	2009-08-21 22:20:31 UTC (rev 14590)
+++ freeswitch/trunk/src/switch_event.c	2009-08-21 22:29:44 UTC (rev 14591)
@@ -180,6 +180,8 @@
 	"RECV_INFO",
 	"CALL_SECURE",
 	"NAT",
+	"RECORD_START",
+	"RECORD_STOP",
 	"ALL"
 };
 

Modified: freeswitch/trunk/src/switch_ivr_async.c (14590 => 14591)


--- freeswitch/trunk/src/switch_ivr_async.c	2009-08-21 22:20:31 UTC (rev 14590)
+++ freeswitch/trunk/src/switch_ivr_async.c	2009-08-21 22:29:44 UTC (rev 14591)
@@ -432,9 +432,16 @@
 	switch_core_session_t *session = switch_core_media_bug_get_session(bug);
 	switch_channel_t *channel = switch_core_session_get_channel(session);
 	struct record_helper *rh = (struct record_helper *) user_data;
+	switch_event_t *event;
 
+
 	switch (type) {
 	case SWITCH_ABC_TYPE_INIT:
+		if (switch_event_create(&event, SWITCH_EVENT_RECORD_START) == SWITCH_STATUS_SUCCESS) {
+			switch_channel_event_set_data(channel, event);
+			switch_event_fire(&event);
+		}
+
 		break;
 	case SWITCH_ABC_TYPE_CLOSE:
 		{
@@ -444,6 +451,11 @@
 			switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Stop recording file %s\n", rh->file);
 			switch_channel_set_private(channel, rh->file, NULL);
 			
+			if (switch_event_create(&event, SWITCH_EVENT_RECORD_STOP) == SWITCH_STATUS_SUCCESS) {
+				switch_channel_event_set_data(channel, event);
+				switch_event_fire(&event);
+			}
+
 			if (rh->fh) {
 				if (switch_channel_test_flag(channel, CF_ANSWERED) || !switch_core_media_bug_test_flag(bug, SMBF_RECORD_ANSWER_REQ)) {
 					switch_size_t len;

Modified: freeswitch/trunk/src/switch_ivr_play_say.c (14590 => 14591)


--- freeswitch/trunk/src/switch_ivr_play_say.c	2009-08-21 22:20:31 UTC (rev 14590)
+++ freeswitch/trunk/src/switch_ivr_play_say.c	2009-08-21 22:29:44 UTC (rev 14591)
@@ -393,8 +393,8 @@
     switch_codec_implementation_t read_impl = {0};
 	switch_frame_t write_frame = { 0 };
 	unsigned char write_buf[SWITCH_RECOMMENDED_BUFFER_SIZE] = { 0 };
+	switch_event_t *event;
 
-
     switch_core_session_get_read_impl(session, &read_impl);
 
 	if (!switch_channel_ready(channel)) {
@@ -575,6 +575,12 @@
 		}
 	}
 
+
+	if (switch_event_create(&event, SWITCH_EVENT_RECORD_START) == SWITCH_STATUS_SUCCESS) {
+		switch_channel_event_set_data(channel, event);
+		switch_event_fire(&event);
+	}
+
 	for (;;) {
 		switch_size_t len;
 
@@ -685,6 +691,11 @@
 
 	}
 
+	if (switch_event_create(&event, SWITCH_EVENT_RECORD_STOP) == SWITCH_STATUS_SUCCESS) {
+		switch_channel_event_set_data(channel, event);
+		switch_event_fire(&event);
+	}
+
 	if (waste_resources) {
 		switch_core_codec_destroy(&write_codec);
 	}