diff -urN asterisk-1.4.0.orig/main/rtp.c asterisk-1.4.0/main/rtp.c --- asterisk-1.4.0.orig/main/rtp.c 2006-12-15 11:55:28.000000000 -0800 +++ asterisk-1.4.0/main/rtp.c 2007-01-10 21:48:25.000000000 -0800 @@ -140,7 +140,8 @@ unsigned int dtmfduration; /* DTMF Transmission Variables */ unsigned int lastdigitts; - char send_digit; + char sending_digit; /* boolean - are we sending digits */ + char send_digit; /* digit we are sending */ int send_payload; int send_duration; int nat; @@ -1083,7 +1084,7 @@ struct ast_rtp *bridged = NULL; /* If time is up, kill it */ - if (rtp->send_digit) + if (rtp->sending_digit) ast_rtp_senddigit_continuation(rtp); len = sizeof(sin); @@ -2118,6 +2119,7 @@ } /* Since we received a begin, we can safely store the digit and disable any compensation */ + rtp->sending_digit = 1; rtp->send_digit = digit; rtp->send_payload = payload; @@ -2209,6 +2211,7 @@ ast_inet_ntoa(rtp->them.sin_addr), ntohs(rtp->them.sin_port), rtp->send_payload, rtp->seqno, rtp->lastdigitts, res - hdrlen); } + rtp->sending_digit = 0; rtp->send_digit = 0; /* Increment lastdigitts */ rtp->lastdigitts += 960;