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

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


Author: oej
Date: Tue Apr  8 10:30:31 2014
New Revision: 411942

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=411942
Log:
And we're actually sending CNG frames when silence begins. Aint that 'mazing folks?

Modified:
    team/oej/roibos-cng-support-1.8/channels/chan_sip.c
    team/oej/roibos-cng-support-1.8/main/channel.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=411942&r1=411941&r2=411942
==============================================================================
--- 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:30:31 2014
@@ -6924,15 +6924,17 @@
 	struct sip_pvt *p = ast->tech_pvt;
 	int res = 0;
 
-	if (frame == &ast_null_frame) {
+	if (frame == &ast_null_frame || frame->frametype == AST_FRAME_NULL) {
 		/* We do not send null frames. Sorry */
 		return 1;
 	}
 
 	switch (frame->frametype) {
-	case AST_FRAME_CN:
+	case AST_FRAME_CNG:
 		/* We get this frame if silence suppression is active. */
-		ast_rtp_instance_sendcng(dialog->rtp, 64);
+		if (p->rtp) {
+			ast_rtp_instance_sendcng(p->rtp, 64);
+		}
 		res = 0;
 		break;
 	

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=411942&r1=411941&r2=411942
==============================================================================
--- 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:30:31 2014
@@ -1836,7 +1836,7 @@
 	case AST_FRAME_IAX:
 	case AST_FRAME_CNG:
 	case AST_FRAME_MODEM:
-	case AST_FRAME_DROP;
+	case AST_FRAME_DROP:
 		return 0;
 	}
 	return 0;
@@ -3059,7 +3059,7 @@
 				case AST_FRAME_IAX:
 				case AST_FRAME_NULL:
 				case AST_FRAME_CNG:
-				case AST_FRAME_DROP;
+				case AST_FRAME_DROP:
 					break;
 				}
 




More information about the asterisk-commits mailing list