Content-type and grammar.xml

134 views
Skip to first unread message

Hurdman

unread,
Oct 20, 2010, 5:11:33 PM10/20/10
to UniMRCP
Hi,
i'm new into that group, so hello every body.
I'm french and a C developper, i work on asterisk ( module
developpement and over things ) since 6 month. Perhaps have you ever
seen me into the asterisk chan ;)

I test the unimrcp plugin / client and i try to connect an ASR server
using rtsp.
During the connexion between unimrcp and the server, there something
like that :

DEFINE-GRAMMAR 2 MRCP/1.0
Content-Type: application/srgs+xml
Content-Id: number
Content-Length: 477

I have tried a lot of things the last three days, but i can't change
the content type to grammar+xml ...

Have you got any idea, doc for me ?
My versions are :
asterisk : Asterisk 1.6.2.9 built
unimrcp : uni-ast-package-0.3.0

Thanks for your great work !
I just discover unimrcp but if i can help in the futur, it 'll be a
pleasure ;)

regards
yves aka hurdman

Christopher Rienzo

unread,
Oct 20, 2010, 11:04:17 PM10/20/10
to uni...@googlegroups.com
Hello Yves,

I haven't tried this with app_unimrcp, but the code suggests it will work.  In your mrcp profile, set:
<param name="srgs-xml-mime-type" value="application/grammar+xml"/>

Chris




--
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.


Abigaël Hurdmann

unread,
Oct 21, 2010, 6:02:44 AM10/21/10
to uni...@googlegroups.com
Hi,
many thanks for your quick response !
I have try to add the ligne
<param name="srgs-xml-mime-type" value="application/grammar+xml"/>
into file :
./client-profiles/unimrcp.xml

<mrcpv1-profile id="uni1">
      <rtsp-uac>RTSP-Agent-1</rtsp-uac>
      <media-engine>Media-Engine-1</media-engine>
      <rtp-factory>RTP-Factory-1</rtp-factory>
      <rtsp-settings>UniMRCP-RTSP-Settings</rtsp-settings>
      <rtp-settings>RTP-Settings-1</rtp-settings>

      <param name="srgs-xml-mime-type" value="application/grammar+xml"/>
</mrcpv1-profile>

and
ever the same problem :'(
Perhaps it's not the good way ?



DEFINE-GRAMMAR 2 MRCP/1.0
Content-Type: application/srgs+xml
Content-Id: number
Content-Length: 541

<?xml version="1.0" ?> 
<grammar xml:lang="fr-FR" version="1.0"> 
    <rule id="number"> 
        <one-of> 
            <item xml:lang="fr-FR">un</item> 
            <item xml:lang="fr-FR">deux</item> 
            <item xml:lang="fr-FR">trois</item> 
            <item xml:lang="fr-FR">quatre</item> 
            <item xml:lang="fr-FR">cinq</item> 
            <item xml:lang="fr-FR">six</item> 
            <item xml:lang="fr-FR">sept</item> 
            <item xml:lang="fr-FR">huit</item> 
            <item xml:lang="fr-FR">neuf</item> 
            <item xml:lang="fr-FR">zero</item> 
        </one-of> 
    </rule> 
</grammar> 

Probably pebkac, i continue to search ;)
thanks
Yves


2010/10/21 Christopher Rienzo <cmri...@gmail.com>

Christopher Rienzo

unread,
Oct 21, 2010, 9:59:29 AM10/21/10
to uni...@googlegroups.com
You could always hack the app_unimrcp.c to change application/srgs+xml to application/grammar+xml.

I don't have time to figure it out the configuration at the moment, but I can look later if no one else has an answer for you.



2010/10/21 Abigaël Hurdmann <hurd...@gmail.com>

Abigaël Hurdmann

unread,
Oct 21, 2010, 10:02:56 AM10/21/10
to uni...@googlegroups.com
Ok,
i'll do that ;)
thanks! 

2010/10/21 Christopher Rienzo <cmri...@gmail.com>
Reply all
Reply to author
Forward
0 new messages