]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Inband DTMF regression
authorKinsey Moore <kmoore@digium.com>
Wed, 20 Jul 2011 19:00:23 +0000 (19:00 +0000)
committerKinsey Moore <kmoore@digium.com>
Wed, 20 Jul 2011 19:00:23 +0000 (19:00 +0000)
The functionality of inband DTMF in chan_sip relied upon
ast_rtp_instance_dtmf_mode_get/set not working properly to avoid calling
ast_rtp_instance_dtmf_begin/end on RTP streams with inband DTMF. According to
documentation, ast_rtp_instance_dtmf_begin/end is meant only for RFC2833 DTMF,
never inband.  This fixes the regression introduced in revision 328823.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@328935 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 21919cd45bb30045bc8a116ba204dffbed07067a..429a1b60f3e29e2ed736ce0aea22e0a957e8e747 100644 (file)
@@ -6486,11 +6486,7 @@ static int sip_senddigit_begin(struct ast_channel *ast, char digit)
        sip_pvt_lock(p);
        switch (ast_test_flag(&p->flags[0], SIP_DTMF)) {
        case SIP_DTMF_INBAND:
-               if (p->rtp && ast_rtp_instance_dtmf_mode_get(p->rtp) == AST_RTP_DTMF_MODE_INBAND) {
-                       ast_rtp_instance_dtmf_begin(p->rtp, digit);
-               } else {
-                       res = -1; /* Tell Asterisk to generate inband indications */
-               }
+               res = -1; /* Tell Asterisk to generate inband indications */
                break;
        case SIP_DTMF_RFC2833:
                if (p->rtp)
@@ -6522,11 +6518,7 @@ static int sip_senddigit_end(struct ast_channel *ast, char digit, unsigned int d
                        ast_rtp_instance_dtmf_end_with_duration(p->rtp, digit, duration);
                break;
        case SIP_DTMF_INBAND:
-               if (p->rtp && ast_rtp_instance_dtmf_mode_get(p->rtp) == AST_RTP_DTMF_MODE_INBAND) {
-                       ast_rtp_instance_dtmf_end(p->rtp, digit);
-               } else {
-                       res = -1; /* Tell Asterisk to stop inband indications */
-               }
+               res = -1; /* Tell Asterisk to stop inband indications */
                break;
        }
        sip_pvt_unlock(p);