[asterisk-commits] file: branch file/pimp_sip_media r380964 - /team/file/pimp_sip_media/channels/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Feb 6 08:59:58 CST 2013


Author: file
Date: Wed Feb  6 08:59:55 2013
New Revision: 380964

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=380964
Log:
Don't assume that the audio RTP instance will exist when sending DTMF.

Modified:
    team/file/pimp_sip_media/channels/chan_gulp.c

Modified: team/file/pimp_sip_media/channels/chan_gulp.c
URL: http://svnview.digium.com/svn/asterisk/team/file/pimp_sip_media/channels/chan_gulp.c?view=diff&rev=380964&r1=380963&r2=380964
==============================================================================
--- team/file/pimp_sip_media/channels/chan_gulp.c (original)
+++ team/file/pimp_sip_media/channels/chan_gulp.c Wed Feb  6 08:59:55 2013
@@ -377,7 +377,9 @@
 
 	switch (session->endpoint->dtmf) {
 	case AST_SIP_DTMF_RFC_4733:
-		ast_rtp_instance_dtmf_begin(session->media[AST_SIP_MEDIA_AUDIO].rtp, digit);
+		if (session->media[AST_SIP_MEDIA_AUDIO].rtp) {
+			ast_rtp_instance_dtmf_begin(session->media[AST_SIP_MEDIA_AUDIO].rtp, digit);
+		}
 	case AST_SIP_DTMF_NONE:
 		break;
 	case AST_SIP_DTMF_INBAND:
@@ -401,7 +403,9 @@
 		/* TODO: Send INFO dtmf here */
 		break;
 	case AST_SIP_DTMF_RFC_4733:
-		ast_rtp_instance_dtmf_end_with_duration(session->media[AST_SIP_MEDIA_AUDIO].rtp, digit, duration);
+		if (session->media[AST_SIP_MEDIA_AUDIO].rtp) {
+			ast_rtp_instance_dtmf_end_with_duration(session->media[AST_SIP_MEDIA_AUDIO].rtp, digit, duration);
+		}
 	case AST_SIP_DTMF_NONE:
 		break;
 	case AST_SIP_DTMF_INBAND:




More information about the asterisk-commits mailing list