[svn-commits] oej: trunk r64903 - /trunk/channels/chan_sip.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Fri May 18 01:49:40 MST 2007


Author: oej
Date: Fri May 18 03:49:34 2007
New Revision: 64903

URL: http://svn.digium.com/view/asterisk?view=rev&rev=64903
Log:
Another fix for the support for recordings controlled by INFO-packets

We still lack a setting to enable/disable this per peer

Modified:
    trunk/channels/chan_sip.c

Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?view=diff&rev=64903&r1=64902&r2=64903
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Fri May 18 03:49:34 2007
@@ -11699,32 +11699,18 @@
 			ast_unlock_call_features();
 			return;
 		} 
-		/* OEJ: Why is the DTMF code included in the record section? */
+		/* Send the feature code to the PBX as DTMF, just like the handset had sent it */
 		f.len = 100;
-		for (j=0; j<strlen(feat->exten); j++) {
+		for (j=0; j < strlen(feat->exten); j++) {
 			f.subclass = feat->exten[j];
 			ast_queue_frame(p->owner, &f);
 			if (sipdebug)
-				ast_verbose("* DTMF-relay event received: %c\n", f.subclass);
+				ast_verbose("* DTMF-relay event faked: %c\n", f.subclass);
 		}
 		ast_unlock_call_features();
-#ifdef DISABLED_CODE
-		/* And feat isn't used here - Is this code tested at all??? 
-			We just send a reply ... 
-		*/
-		if (strcasecmp(c, "on")== 0) {
-			if (option_debug)
-				ast_log(LOG_DEBUG, "Got a Request to Record the channel!\n");
-			transmit_response(p, "200 OK", req);
-			return;
-
-		} else if (strcasecmp(c, "off")== 0) {
-			if (option_debug)
-				ast_log(LOG_DEBUG, "Got a Request to Stop Recording the channel\n");
-			transmit_response(p, "200 OK", req);
-			return;
-		}
-#endif
+
+		if (option_debug)
+			ast_log(LOG_DEBUG, "Got a Request to Record the channel, state %s\n", c);
 		transmit_response(p, "200 OK", req);
 		return;
 	}



More information about the svn-commits mailing list