[asterisk-commits] oej: branch oej/roibos-cng-support-1.8 r411934 - in /team/oej/roibos-cng-supp...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Apr 8 10:19:39 CDT 2014


Author: oej
Date: Tue Apr  8 10:19:33 2014
New Revision: 411934

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=411934
Log:
Try sending CNG...

Modified:
    team/oej/roibos-cng-support-1.8/channels/chan_sip.c
    team/oej/roibos-cng-support-1.8/main/channel.c
    team/oej/roibos-cng-support-1.8/res/res_rtp_asterisk.c

Modified: team/oej/roibos-cng-support-1.8/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/roibos-cng-support-1.8/channels/chan_sip.c?view=diff&rev=411934&r1=411933&r2=411934
==============================================================================
--- team/oej/roibos-cng-support-1.8/channels/chan_sip.c (original)
+++ team/oej/roibos-cng-support-1.8/channels/chan_sip.c Tue Apr  8 10:19:33 2014
@@ -6930,6 +6930,12 @@
 	}
 
 	switch (frame->frametype) {
+	case AST_FRAME_CN:
+		/* We get this frame if silence suppression is active. */
+		ast_rtp_instance_sendcng(dialog->rtp, 64);
+		res = 0;
+		break;
+	
 	case AST_FRAME_VOICE:
 		if (!(frame->subclass.codec & ast->nativeformats)) {
 			char s1[512], s2[512], s3[512];

Modified: team/oej/roibos-cng-support-1.8/main/channel.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/roibos-cng-support-1.8/main/channel.c?view=diff&rev=411934&r1=411933&r2=411934
==============================================================================
--- team/oej/roibos-cng-support-1.8/main/channel.c (original)
+++ team/oej/roibos-cng-support-1.8/main/channel.c Tue Apr  8 10:19:33 2014
@@ -1836,6 +1836,7 @@
 	case AST_FRAME_IAX:
 	case AST_FRAME_CNG:
 	case AST_FRAME_MODEM:
+	case AST_FRAME_DROP;
 		return 0;
 	}
 	return 0;
@@ -3058,6 +3059,7 @@
 				case AST_FRAME_IAX:
 				case AST_FRAME_NULL:
 				case AST_FRAME_CNG:
+				case AST_FRAME_DROP;
 					break;
 				}
 

Modified: team/oej/roibos-cng-support-1.8/res/res_rtp_asterisk.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/roibos-cng-support-1.8/res/res_rtp_asterisk.c?view=diff&rev=411934&r1=411933&r2=411934
==============================================================================
--- team/oej/roibos-cng-support-1.8/res/res_rtp_asterisk.c (original)
+++ team/oej/roibos-cng-support-1.8/res/res_rtp_asterisk.c Tue Apr  8 10:19:33 2014
@@ -1348,6 +1348,10 @@
 	/* If there is no data length we can't very well send the packet */
 	if (!frame->datalen) {
 		ast_debug(1, "Received frame with no data for RTP instance '%p' so dropping frame\n", instance);
+		return 0;
+	}
+	if (frame->frametype == AST_FRAME_CNG) {
+		ast_debug(1, "Receiveed frame with CNG for RTP instance '%p' (just dropping it now)\n", instance);
 		return 0;
 	}
 




More information about the asterisk-commits mailing list