don't use tone generation for DTMF if the channel driver only supports begin/end...
[asterisk/asterisk.git] / channel.c
index c961f57..501baa8 100644 (file)
--- a/channel.c
+++ b/channel.c
@@ -2184,7 +2184,8 @@ static int do_senddigit(struct ast_channel *chan, char digit)
 
        if (chan->tech->send_digit)
                res = chan->tech->send_digit(chan, digit);
-       if (!chan->tech->send_digit || res) {
+       if (!(chan->tech->send_digit && chan->tech->send_digit_begin) ||
+           res) {
                /*
                 * Device does not support DTMF tones, lets fake
                 * it by doing our own generation. (PM2002)