Index: channels/chan_sip.c =================================================================== --- channels/chan_sip.c (revision 248348) +++ channels/chan_sip.c (working copy) @@ -1064,6 +1064,7 @@ * The large-scale changes would be a good idea for implementing during an SDP rewrite. */ struct offered_media offered_media[3]; + struct ast_silence_generator *gen; } *iflist = NULL; /*! Max entires in the history list for a sip_pvt */ @@ -4030,8 +4031,12 @@ res = -1; /* Tell Asterisk to generate inband indications */ break; case SIP_DTMF_RFC2833: - if (p->rtp) + if (p->rtp) { + if (ast_opt_transmit_silence) { + p->gen = ast_channel_start_silence_generator(ast); + } ast_rtp_senddigit_begin(p->rtp, digit); + } break; default: break; @@ -4054,8 +4059,12 @@ transmit_info_with_digit(p, digit, duration); break; case SIP_DTMF_RFC2833: - if (p->rtp) + if (p->rtp) { ast_rtp_senddigit_end(p->rtp, digit); + if (p->gen) { + ast_channel_stop_silence_generator(ast, p->gen); + } + } break; case SIP_DTMF_INBAND: res = -1; /* Tell Asterisk to stop inband indications */ Index: main/rtp.c =================================================================== --- main/rtp.c (revision 248348) +++ main/rtp.c (working copy) @@ -2707,7 +2707,7 @@ f->samples /= 2; } - if (rtp->sending_digit) { + if (rtp->sending_digit && !ast_opt_transmit_silence) { return 0; }