--- a/res/res_rtp_asterisk.c +++ b/res/res_rtp_asterisk.c @@ -2808,6 +2808,12 @@ char data[256]; unsigned int *rtpheader = (unsigned int*)data; + if (ast_test_flag(rtp, FLAG_HOLD)) { + /* This stream is on hold, just keep on happily and don't do anything */ + ast_debug(1, "** DTMF begin frame muted since we're on hold. \n"); + return 0; + } + ast_rtp_instance_get_remote_address(instance, &remote_address); /* If we have no remote address information bail out now */ @@ -2888,6 +2894,12 @@ unsigned int *rtpheader = (unsigned int*)data; int ice; + if (ast_test_flag(rtp, FLAG_HOLD)) { + /* This stream is on hold, just keep on happily and don't do anything */ + ast_debug(1, "** DTMF continuation frame muted since we're on hold. \n"); + return 0; + } + ast_rtp_instance_get_remote_address(instance, &remote_address); /* Make sure we know where the other side is so we can send them the packet */ @@ -2939,6 +2951,12 @@ unsigned int *rtpheader = (unsigned int*)data; unsigned int measured_samples; + if (ast_test_flag(rtp, FLAG_HOLD)) { + /* This stream is on hold, just keep on happily and don't do anything */ + ast_debug(1, "** DTMF end frame muted since we're on hold. \n"); + return 0; + } + ast_rtp_instance_get_remote_address(instance, &remote_address); /* Make sure we know where the remote side is so we can send them the packet we construct */