[UniMRCP] trying to get DTMF grammar item in the RECOG_RESULT

283 views
Skip to first unread message

assanta

unread,
Apr 21, 2010, 12:23:18 PM4/21/10
to UniMRCP
Hello

I'm using the "codecs= PCMU PCMA L16/96/8000 telephone-event/101/8000"

I'm trying to use DTMF in the MRCPRecog

exten => s,3,MRCPRecog(<?xml version=\\\"1.0\\\" encoding=\\
\"ISO-8859-1\\\"?><grammar xmlns=\\\"http://www.w3.org/2001/06/grammar\
\\" xml:lang=\\\"en-US\\\" version=\\\"1.0\\\" mode=\\\"dtmf\\\" root=\
\\"digit\\\" tag-format=\\\"semantics/1.0\\\"><rule id=\\\"digit\\
\"><one-of><item>1<tag>out="1"</tag></item><item>2<tag>out="2"</tag></
item><item>3<tag>out="3"</tag></item></one-of></rule></
grammar>,p=speech-loquendo-
mrcp1&i=any&t=5000&f=&b=1&nit=5000&sct=1000&sint=2000&dit=1000&dtt=2000)

I've tested with ASR engine barge-in=1 and also with Asterisk barge-
in=2, but the results are the same

When I press DTMF, Stop streaming and return DTMF value to the
dialplan

The question
Is possible to get an xml result when I press DTMF, I mean the same
result that it would be with an recognize in the ${RECOG_RESULT} ?

client RTSP
m=audio 10064 RTP/AVP 0 8 96 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:96 L16/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=recvonly
a=ptime:20

server RTSP
m=audio 10000 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000

in Asterisk log
app_unimrcp.c:4144 unimrcp_log: Source->[PCMU/8000/1]->Bridge->[PCMU/
8000/1]->Sink
app_unimrcp.c:2350 speech_on_channel_add: speech_on_channel_add
app_unimrcp.c:2359 speech_on_channel_add: (ASR-31) DTMF generator
created
app_unimrcp.c:2386 speech_on_channel_add: (ASR-31) RECOGNIZER channel
is ready, codec = PCMU, sample rate = 8000

Is not necessary to use "telephone-event" for DTMF?

Assanta

--
You received this message because you are subscribed to the Google Groups "UniMRCP" group.
To post to this group, send email to uni...@googlegroups.com.
To unsubscribe from this group, send email to unimrcp+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/unimrcp?hl=en.

Arsen Chaloyan

unread,
Apr 22, 2010, 9:08:25 AM4/22/10
to uni...@googlegroups.com
Assanta, you seem to be looking for the following option: i=none

------------------------
i - digits to allow the ASR to be interrupted with (set to none for DTMF grammars to allow DTMF to be sent to the MRCP server, otherwise if "any" or other digits specified, ASR will be interrupted and the digit will be returned in dialplan)
------------------------
--
Arsen Chaloyan
The author of UniMRCP
http://www.unimrcp.org

assanta

unread,
Apr 22, 2010, 9:47:51 AM4/22/10
to UniMRCP
You are right, thanks Arsen!

On 22 abr, 15:08, Arsen Chaloyan <achalo...@gmail.com> wrote:
> Assanta, you seem to be looking for the following option: i=none
>
> ------------------------
> i - digits to allow the ASR to be interrupted with (set to none for DTMF
> grammars to allow DTMF to be sent to the MRCP server, otherwise if "any" or
> other digits specified, ASR will be interrupted and the digit will be
> returned in dialplan)
> ------------------------
>
>
>
>
>
> On Wed, Apr 21, 2010 at 9:23 PM, assanta <assantas...@gmail.com> wrote:
> > Hello
>
> > I'm using the "codecs= PCMU PCMA L16/96/8000 telephone-event/101/8000"
>
> > I'm trying to use DTMF in the MRCPRecog
>
> > exten => s,3,MRCPRecog(<?xml version=\\\"1.0\\\" encoding=\\
> > \"ISO-8859-1\\\"?><grammar xmlns=\\\"http://www.w3.org/2001/06/grammar\<http://www.w3.org/2001/06/grammar%5C>
> > unimrcp+u...@googlegroups.com<unimrcp%2Bunsu...@googlegroups.com­>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/unimrcp?hl=en.
>
> --
> Arsen Chaloyan
> The author of UniMRCPhttp://www.unimrcp.org
>
> --
> You received this message because you are subscribed to the Google Groups "UniMRCP" group.
> To post to this group, send email to uni...@googlegroups.com.
> To unsubscribe from this group, send email to unimrcp+u...@googlegroups.com.
> For more options, visit this group athttp://groups.google.com/group/unimrcp?hl=en.- Ocultar texto de la cita -
>
> - Mostrar texto de la cita -

assanta

unread,
Apr 22, 2010, 11:05:13 AM4/22/10
to UniMRCP

another question, is possible to use at the same time voice and dtmf ?

I've tried several things, like mode="dtmf voice" or mode="all" or 2
grammars in the same MRCPRecog, one with mode="voice" and the other
with mode="dtmf", but no results....

Assanta
> > For more options, visit this group athttp://groups.google.com/group/unimrcp?hl=en.-Ocultar texto de la cita -

Arsen Chaloyan

unread,
Apr 23, 2010, 11:05:35 AM4/23/10
to uni...@googlegroups.com
Assanta,

On Thu, Apr 22, 2010 at 8:05 PM, assanta <assan...@gmail.com> wrote:

another question, is possible to use at the same time voice and dtmf ?

See the following section in the spec

http://www.w3.org/TR/speech-grammar/#S4.6
The specification does not define a mechanism by which a single grammar can mix modes: that is, a representation for a mixed "voice" and "dtmf" grammar is not defined. Moreover, it is illegal for a rule reference in one grammar to reference any grammar with a different mode.

Though, it's possible to define two separate grammars one for voice and other for DTMF and use both for a recognition request.

I've tried several things, like mode="dtmf voice" or mode="all" or 2
grammars in the same MRCPRecog, one with mode="voice" and the other
with mode="dtmf", but no results....

I'm not sure it's possible through MRCPRecog now.
Reply all
Reply to author
Forward
0 new messages