[asterisk-commits] file: branch group/vldtmf_fixup r51191 - /team/group/vldtmf_fixup/main/rtp.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed Jan 17 11:27:09 MST 2007


Author: file
Date: Wed Jan 17 12:27:08 2007
New Revision: 51191

URL: http://svn.digium.com/view/asterisk?view=rev&rev=51191
Log:
Only do direct media if DTMF transmission matches both sides. ie: RFC2833<->RFC2833 and OOB<->OOB.

Modified:
    team/group/vldtmf_fixup/main/rtp.c

Modified: team/group/vldtmf_fixup/main/rtp.c
URL: http://svn.digium.com/view/asterisk/team/group/vldtmf_fixup/main/rtp.c?view=diff&rev=51191&r1=51190&r2=51191
==============================================================================
--- team/group/vldtmf_fixup/main/rtp.c (original)
+++ team/group/vldtmf_fixup/main/rtp.c Wed Jan 17 12:27:08 2007
@@ -3180,6 +3180,12 @@
 		audio_p1_res = AST_RTP_TRY_PARTIAL;
 	}
 
+	/* If both sides are not using the same method of DTMF transmission (ie: one is RFC2833, other is INFO... then we can not do direct media */
+	if (ast_test_flag(p0, FLAG_HAS_DTMF) != ast_test_flag(p1, FLAG_HAS_DTMF)) {
+		audio_p0_res = AST_RTP_TRY_PARTIAL;
+		audio_p1_res = AST_RTP_TRY_PARTIAL;
+	}
+
 	/* Get codecs from both sides */
 	codec0 = pr0->get_codec ? pr0->get_codec(c0) : 0;
 	codec1 = pr1->get_codec ? pr1->get_codec(c1) : 0;



More information about the asterisk-commits mailing list