I am experiencing problems with DTMF grammars expecting multiple DTMF digits

687 views
Skip to first unread message

dcr...@amtelco.com

unread,
Jul 24, 2017, 3:25:28 PM7/24/17
to UniMRCP
We are performing the MRCPRecog command through Asterisk AMI interface.  We have no problem with voice grammars or grammars expecting a single DTMF digit.  MRCP is through the Nuance Speech Server and Nuance Recognizer.

I have tried several different settings for the MRCPRecog parameters, but it's still failing.

EXEC MRCPRecog builtin:grammar/number^file://c:/grammars/dtmf_digits.grxml,p=1&gd=^&f=/var/lib/asterisk/sounds/mrcp/IS/199782&b=1&sw=false&nac=false&cdb=true&enm=false&epe=0&uer=0&sit=false&spl=en-US&rm=normal&nit=2500&t=7000&sl=0.5&ct=0.7&sct=30000&sint=30000&dit=5000&dtt=10000&nb=10&sva=0.5&i=none

The file dtmf_digits.grxml is a file provided by Nuance Communications, Inc as part of their packages.  It provides an example of multipe digits.
The file IVRDTMF.grxml is a file from a legacy PSTN Speech Recognition system using Nuance Recognizer 9 and works for DTMF detection (multiple digits).

For the first file dtmf_digits.grxml, I receieve a successful result immediately after pressing the first digit.  It doesn't give me a chance to enter a second digits.

For the IVRDTMF.grxml, I receive a failure after pressing the first DTMF digit.  Even when I try to press digits very quickly, it seems to be failing before I press the second DTMF.


Am I sending some parameter to MRCPRecog incorrectly for DTMF grammars with multiple digits?

Here is an example using two builtin grammars (one with voice and one with DTMF (single digit)).  This one succeeds after the digit is pressed.
EXEC MRCPRecog builtin:grammar/number^builtin:dtmf/number,p=1&gd=^&f=/var/lib/asterisk/sounds/mrcp/IS/199781&b=1&sw=false&nac=false&cdb=true&enm=false&epe=0&uer=0&sit=false&spl=en-US&rm=normal&nit=2500&t=7000&sl=0.5&ct=0.7&dit=5000&dtt=10000&nb=10&sva=0.5&i=none

Have a great day!

Dan




dtmf_digits.grxml

dcr...@amtelco.com

unread,
Jul 24, 2017, 3:40:12 PM7/24/17
to UniMRCP
Here is the second file IVRDTMF.grxml
IVRDTMF.grxml

Arsen Chaloyan

unread,
Jul 25, 2017, 12:38:57 AM7/25/17
to UniMRCP
Just tried your grammars dtmf_digits.grxml and IVRDTMF.grxml with NSS 5 NR 9, and in both cases was able to input multiple digits with subtle grammar-dependent differences.

However, I do remember a very similar case, where NSS completed/terminated recognition after receiving a very first digit, but unfortunately do not recall what was the problem in exactly.


> For the first file dtmf_digits.grxml, I receieve a successful result immediately after pressing the first digit.  It doesn't give me a chance to enter a second digits.
> For the IVRDTMF.grxml, I receive a failure after pressing the first DTMF digit.  Even when I try to press digits very quickly, it seems to be failing before I press the second DTMF.

I am pretty sure the recognition completed after you pressed a digit in both cases. The only reason you got a failure in the second case is because of your IVRDTMF.grxml grammar, which doesn't accept a 1-digit input, whereas dtmf_digits.grxml does.

If you can make a network capture between Asterisk and NSS, that may reveal what is actually going wrong...


On Mon, Jul 24, 2017 at 12:40 PM, <dcr...@amtelco.com> wrote:
Here is the second file IVRDTMF.grxml

--
You received this message because you are subscribed to the Google Groups "UniMRCP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to unimrcp+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Arsen Chaloyan
Author of UniMRCP
http://www.unimrcp.org

Dan Cropp

unread,
Jul 25, 2017, 12:19:07 PM7/25/17
to UniMRCP
Hi Arsen,

I am working with another developer and he did the captures.  Here are four captures and his descriptions.

Here’s some captures from Wireshark running on the Nuance server.  Its only capturing traffic from the Genesis server (192.168.8.55).

Test procedure went like this:

-          Restarted Genesis and Nuance servers.

-          Placed call into genesis.

-          Did speech rec for file://C:/Grammars/dtmf_digits.grxml (Nuance sample to capture multiple DTMF digits)

-          Pressed 1 2 3 4.  1 returned.  This is test1.pcapng

-          Did speech rec for file://C:/Grammars/dtmf_digits.grxml

-          Pressed 1 2 3 4.  RECOG_COMPLETION_CAUSE = 002 for no input This is test2.pcapng

-          Ended call

-          Placed another call into Genesis (to rule out a problem with multiple MRCP calls for a Genesis call causing problems.

-          Did speech rec for file://C:/Grammars/dtmf_digits.grxml

-          Pressed 1 2 3 4.  RECOG_COMPLETION_CAUSE = 002 for no input  This is test3.pcapng

-          Ended call

-          Restarted Genesis

-          Placed call into Genesis (to rule out a problem with multiple MRCP calls for a Genesis call causing problems.

-          Did speech rec for file://C:/Grammars/dtmf_digits.grxml

-          Pressed 1 2 3 4.  RECOG_COMPLETION_CAUSE = 002 for no input  This is test4.pcapng

-          Ended call


Have a great day!
Dan


test1.pcapng
test2.pcapng
test3.pcapng
test4.pcapng

Dan Cropp

unread,
Jul 25, 2017, 12:20:55 PM7/25/17
to UniMRCP
HI Arsen,

Here is some additional notes the other developer sent me...

Interesting stuff I noticed in the captures (though I’ll admit that I’m no pro at reading SIP/RTP out of a wireshark capture):
-          In test1, at 4.389, it captures RTP events for DTMF 1 start and end.  At 5.329, it captures an RTP event for DTMF 2 start, but no end.  And the DTMF 2 is after a RTCP Goodbye (whatever that is, but I assume it means the end of the MRCP call), and the MRCP completion.
-          Test2 and test3 don’t see any RTP events for DTMF, which jives with the CauseNoInput results.
-          Test4 sees RTP events for DTMF start 1, after the RTCP Goodbye, and no RTP events for DTMF end, which also jives with the CauseNoInput results.


Have a great day!
Dan

On Monday, July 24, 2017 at 2:25:28 PM UTC-5, dcr...@amtelco.com wrote:

Dan Cropp

unread,
Jul 25, 2017, 12:25:05 PM7/25/17
to UniMRCP
Hi Arsen,

My co-worker did another test using only a speech grammar.  He pressed a digit, which we don't think should stop the recognition.  Audio keeps playing to the call, but Wireshark shows the portion to NSS with a Goodbye.

Here is capture of a call doing a speech grammar.  I press a DTMF 1 at about 3ish seconds in, and it disconnects the MRCP call.

NOTE: we are issuing the MRCPRecog command via the AMI interface, not through the standard extensions.conf dial plan.

Have a great day!
Dan
 


On Monday, July 24, 2017 at 2:25:28 PM UTC-5, dcr...@amtelco.com wrote:

Dan Cropp

unread,
Jul 25, 2017, 12:50:56 PM7/25/17
to UniMRCP
I forgot to include test5.pcapng before posting the previous message.


On Monday, July 24, 2017 at 2:25:28 PM UTC-5, dcr...@amtelco.com wrote:
test5.pcapng

Arsen Chaloyan

unread,
Jul 25, 2017, 1:02:14 PM7/25/17
to UniMRCP
Hi Dan,

Thanks for the detailed report.

I could not remember what the problem was, but I knew it was a network capture that helped me identify the problem, and here it is.

In brief: disable RTCP BYE (rtcp-bye=0) or RTCP altogether (rtcp=0) from mrcp.conf, and your problem will be solved.

In more details, Nuance treats an RTCP BYE message as an end of utterance, which is not the case here. BTW, the RTCP BYE message is sent implicitly by the RTP stack, once there is no audio data from user application for a certain period of time. This period may need to be adjusted in general. In my attempts, RTCP BYE is sent at the very end, when all the DTMFs are transmitted; whereas in your network captures, I see that there is a gap in RTP stream, which causes a false RTCP BYE be sent earlier.

Have a great day you too.

--
You received this message because you are subscribed to the Google Groups "UniMRCP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to unimrcp+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Dan Cropp

unread,
Jul 26, 2017, 4:53:35 PM7/26/17
to UniMRCP
Thank you Arsen.

That solved the problem.

Have a great day!
Dan

On Monday, July 24, 2017 at 2:25:28 PM UTC-5, dcr...@amtelco.com wrote:
Reply all
Reply to author
Forward
0 new messages