Merged revisions 328824 via svnmerge from

https://origsvn.digium.com/svn/asterisk/branches/1.10

................
  r328824 | kmoore | 2011-07-19 13:05:21 -0500 (Tue, 19 Jul 2011) | 18 lines
  
  Merged revisions 328823 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r328823 | kmoore | 2011-07-19 12:57:18 -0500 (Tue, 19 Jul 2011) | 11 lines
    
    RTP bridge away with inband DTMF and feature detection
    
    When deciding whether Asterisk was allowed to bridge the call away from the
    core, chan_sip did not take into account the usage of features on dialed
    channels that require monitoring of DTMF on channels utilizing inband DTMF.
    This would cause Asterisk to allow the call to be locally or remotely bridged, 
    preventing access to the data required to detect activations of such features.
    
    (closes 17237)
    Review: https://reviewboard.asterisk.org/r/1302/
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@328825 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Kinsey Moore
2011-07-19 18:07:22 +00:00
parent 4ea4b7e1ab
commit 1dc97eb69b
4 changed files with 34 additions and 18 deletions

View File

@@ -4228,10 +4228,11 @@ static void enable_dsp_detect(struct sip_pvt *p)
}
if ((ast_test_flag(&p->flags[0], SIP_DTMF) == SIP_DTMF_INBAND) ||
(ast_test_flag(&p->flags[0], SIP_DTMF) == SIP_DTMF_AUTO)) {
if (!p->rtp || ast_rtp_instance_dtmf_mode_set(p->rtp, AST_RTP_DTMF_MODE_INBAND)) {
features |= DSP_FEATURE_DIGIT_DETECT;
}
(ast_test_flag(&p->flags[0], SIP_DTMF) == SIP_DTMF_AUTO)) {
if (p->rtp) {
ast_rtp_instance_dtmf_mode_set(p->rtp, AST_RTP_DTMF_MODE_INBAND);
}
features |= DSP_FEATURE_DIGIT_DETECT;
}
if (ast_test_flag(&p->flags[1], SIP_PAGE2_FAX_DETECT_CNG)) {
@@ -6932,8 +6933,8 @@ static struct ast_channel *sip_new(struct sip_pvt *i, int state, const char *tit
if ((ast_test_flag(&i->flags[0], SIP_DTMF) == SIP_DTMF_INBAND) ||
(ast_test_flag(&i->flags[0], SIP_DTMF) == SIP_DTMF_AUTO)) {
if (!i->rtp || ast_rtp_instance_dtmf_mode_set(i->rtp, AST_RTP_DTMF_MODE_INBAND)) {
enable_dsp_detect(i);
if (i->rtp) {
ast_rtp_instance_dtmf_mode_set(i->rtp, AST_RTP_DTMF_MODE_INBAND);
}
} else if (ast_test_flag(&i->flags[0], SIP_DTMF) == SIP_DTMF_RFC2833) {
if (i->rtp) {