Tuesday, February 11, 2014

Asterisk. Issue with IVR. DTMF not properly detected.

Asterisk routes all incoming calls, received through chan dongle, to IVR, where callers should press '1', '2' or '3'. Depends on selection made in IVR call is routed to different destination.
When call comes from mobile operator everything works fine, but when call received from landline(actually it was from alcatel pbx) it is impossible to choose destination in IVR.
Affter turning on DTMF logging and playing a little with IVR from landline, log looks like:

[Apr 18 07:56:28] DTMF[1787]: channel.c:4062 __ast_read: DTMF begin '1' received on Dongle/dongle0-0100000000
[Apr 18 07:56:28] DTMF[1787]: channel.c:4066 __ast_read: DTMF begin ignored '1' on Dongle/dongle0-0100000000
[Apr 18 07:56:30] DTMF[1787]: channel.c:4062 __ast_read: DTMF begin '2' received on Dongle/dongle0-0100000000
[Apr 18 07:56:30] DTMF[1787]: channel.c:4066 __ast_read: DTMF begin ignored '2' on Dongle/dongle0-0100000000
[Apr 18 07:56:30] DTMF[1787]: channel.c:4062 __ast_read: DTMF begin '3' received on Dongle/dongle0-0100000000
[Apr 18 07:56:30] DTMF[1787]: channel.c:4066 __ast_read: DTMF begin ignored '3' on Dongle/dongle0-0100000000


It means that asterisk detected DTMF, but duration is of DTMF is too short. To resolve this issue edit dongle.conf file. Find the section [dongleX] where 'X' dongle's number, which receives call, and add or edit parameter mindtmfduration=0. Restart asterisk and make test call. Log file should look like:

[Apr 18 10:35:02] DTMF[2014]: channel.c:4062 __ast_read: DTMF begin '1' received on Dongle/dongle0-0100000002
[Apr 18 10:35:02] DTMF[2014]: channel.c:4066 __ast_read: DTMF begin ignored '1' on Dongle/dongle0-0100000002
[Apr 18 10:35:02] DTMF[2014]: channel.c:3977 __ast_read: DTMF end '1' received on Dongle/dongle0-0100000002, duration 63 ms


It means that asterisk received DTMF code and accepted it(because it shows the duration in the log). After that increase mindtmfduration parameter until you find that asterisk do not accept DTMF signals like it was before. Then decrease duration to last working value.