I have having trouble with both missing and duplicated DTMF in Freeswitch.
callPin = session:playAndGetDigits(1, 10, 4, 30000, "#","/tmp/cw_17.wav", "", "\\d+");
4. On Leg A, I send DTMF information in a lua script. Here is the code of interest. I initiate a delay between each digit:
local newPin = "";
for i = 1, string.len(pin) do
newPin = newPin .. string.sub(pin, i, i) .. "W";
end
session:execute("send_dtmf", newPin .. "#@200");
** Note that there is a session:sleep on Leg A before I send the DTMF to make sure i don't send it too early **
The problem is that the recognized DTMF on Leg B is wrong about 30% of the time. For example, if Leg A enters: 22063083, Leg B will get the DTMF digits 222063083. This is an example of duplication, but I have also experienced missing DTMF codes (and an occasional wrong code completely)
I have messed with a bunch of DTMF settings in hopes of fixing this issue, but I cannot seem to find something that is reliable 100% of the time.
_____________________________
Here are the DTMF settings I have looked at / messed with. I've tried various values for the dtmf-duration in the config (and in the send_dtmf command above)
<!-- This is in external.xml -->
<param name="dtmf-duration" value="500"/>
<param name="dtmf-type" value="rfc2833"/>
<param name="inbound-codec-prefs" value="$${global_codec_prefs}"/>
<param name="outbound-codec-prefs" value="$${outbound_codec_prefs}"/>