pgaval / unimrcp

Automatically exported from code.google.com/p/unimrcp
Apache License 2.0
0 stars 0 forks source link

RTSP parsing error if the RTSP packets are received several TCP block #86

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I had already see that before but it seems to me it was fixed (I didn't re-
find the corresponding mail)

I used the r1650

And in the unimrcpserver.log I can read :

2010-04-19 16:17:12:330363 3065600928 [INFO]   Receive RTSP Stream 
192.168.1.156:1554 <-> 192.168.1.34:1564 [1023 bytes]
ANNOUNCE rtsp://192.168.1.156:1554/speechrecognizer RTSP/1.0
CSeq: 81
Session: d303b61f185c4713
Content-Type: application/mrcp
Content-Length: 1041

DEFINE-GRAMMAR 72 MRCP/1.0
speech-language: fr-FR
Content-Id: grammar_1
Content-Type: application/grammar+xml
Content-Length: 904

<?xml version="1.0"?>
                <grammar xml:lang="fr-FR" mode="voice" 
version="1.0" root="commande">
                    <rule id="commande" scope="public">
                        <one-of>

<item><tag>out='sommaire,';</tag><ruleref uri="#sommaire"/></item>

<item><tag>out='aide,';</tag><ruleref uri="#aide"/></item>

<item><tag>out='accueil,';</tag><ruleref uri="#accueil"/></item>
                        </one-of>
                    </rule>
                    <rule id="sommaire" 
scope="private">
                        <one-of>

<item>sommaire</item>

<item>annuler</item>

<item>annulation</item>
                        </one-of>
                    </rule>
                    <rule id="aide" scope="private">
                        <one-of>
                            <item>mode 
d'emploi</item>
                            <item>aide</item>
                        </one-of>
                    </rule>
                    <rule id="accueil"
2010-04-19 16:17:12:330419 3065600928 [INFO]   Receive RTSP Stream 
192.168.1.156:1554 <-> 192.168.1.34:1564 [439 bytes]
 scope="private">
                        <one-of>
                            <!--
item>operatrice</item-->

<item>standard</item>

<item>accueil</item>
                        </one-of>
                    </rule>
                </grammar>
            ANNOUNCE rtsp://192.168.1.156:1554/speechrecognizer 
RTSP/1.0
CSeq: 82
Session: 03569fc56baa4ba2
Content-Type: application/mrcp
Content-Length: 112

RECOGNIZE 73 MRCP/1.0
Content-Type: text/uri-list
Content-Length: 38

session:grammar_0
session:grammar_1

2010-04-19 16:17:12:330525 3086588832 [INFO]   Process RECOGNIZE Request 
[73]

Then the DEFINE-GRAMMAR message is ignored

Anthony

Original issue reported on code.google.com by amasse.a...@gmail.com on 19 Apr 2010 at 3:07

GoogleCodeExporter commented 9 years ago
Hi Anthony,

I made a few changes in the trunk to handle TCP segmentation for RTSP and MRCP2
streams from one, common place and this caused the issue to show up again.
Fixed in r1657.

Thanks,
Arsen

Original comment by achalo...@gmail.com on 19 Apr 2010 at 5:00

GoogleCodeExporter commented 9 years ago
There is always an issue if the "START-LINE" is truncated

Ex : 

2010-04-20 11:10:56:749081 3065281440 [INFO]   Receive RTSP Stream 
192.168.1.156:1554 
<-> 192.168.1.34:4259 [1017 bytes]
t-Length: 113

RECOGNIZE 463 MRCP/1.0
Content-Type: text/uri-list
Content-Length: 38

session:grammar_0
session:grammar_1
ANNOUNCE rtsp://192.168.1.156:1554/speechrecognizer RTSP/1.0
CSeq: 540
Session: af52eefe84424af1
Content-Type: application/mrcp
Content-Length: 92

RECOGNIZE 464 MRCP/1.0
Content-Type: text/uri-list
Content-Length: 17

session:grammar_0ANNOUNCE rtsp://192.168.1.156:1554/speechrecognizer RTSP/1.0
CSeq: 541
Session: a75b7eda89694123
Content-Type: application/mrcp
Content-Length: 192

DEFINE-GRAMMAR 465 MRCP/1.0
speech-language: fr-FR
Content-Id: grammar_1
Content-Type: text/uri-list
Content-Length: 65

http://192.168.1.151:8080/users/amasse/grammar/abnf/CmdesGen.gramANNOUNCE 
rtsp://192.168.1.156:1554/speechrecognizer RTSP/1.0
CSeq: 542
Session: 7002dd338e024a11
Content-Type: application/mrcp
Content-Length: 92

RECOGNIZE 466 MRCP/1.0
Content-Type: text/uri-list
Content-Length: 17

session:grammar_0ANNOUNCE rtsp://192.168.1.156:1554/speechrecogni

2010-04-20 11:10:56:749531 3065281440 [WARN]   Failed to Parse RTSP Stream

2010-04-20 11:10:56:749644 3065281440 [INFO]   Receive RTSP Stream 
192.168.1.156:1554 
<-> 192.168.1.34:4259 [793 bytes]
zer RTSP/1.0

Original comment by amasse.a...@gmail.com on 20 Apr 2010 at 9:41

GoogleCodeExporter commented 9 years ago
Accepted! Also, I noticed one more weird issue later yesterday. So, I'll try to 
fix
them as soon as get a couple of minutes. 
Thanks.

Original comment by achalo...@gmail.com on 20 Apr 2010 at 11:02

GoogleCodeExporter commented 9 years ago
Fixed in r1663.

Original comment by achalo...@gmail.com on 21 Apr 2010 at 6:33

GoogleCodeExporter commented 9 years ago
Hi Arsen,

Another case : The request is truncated between the CR and LF

-----

2010-04-26 16:34:08:515236 3065166752 [INFO]   Receive RTSP Stream 
192.168.1.156:1554 
<-> 192.168.1.34:1217 [1023 bytes]
ANNOUNCE rtsp://192.168.1.156:1554/speechrecognizer RTSP/1.0
CSeq: 7889
Session: a55348f67b264609
Content-Type: application/mrcp
Content-Length: 114

RECOGNIZE 6769 MRCP/1.0
Content-Type: text/uri-list
Content-Length: 38

session:grammar_0
session:grammar_1
ANNOUNCE rtsp://192.168.1.156:1554/speechrecognizer RTSP/1.0
CSeq: 7890
Session: 003b3c30ff9d424d
Content-Type: application/mrcp
Content-Length: 114

RECOGNIZE 6770 MRCP/1.0
Content-Type: text/uri-list
Content-Length: 38

session:grammar_0
session:grammar_1
ANNOUNCE rtsp://192.168.1.156:1554/speechrecognizer RTSP/1.0
CSeq: 7891
Session: 269eac8b71cc4ed7
Content-Type: application/mrcp
Content-Length: 195

DEFINE-GRAMMAR 6771 MRCP/1.0
speech-language: fr-FR
Content-Id: grammar_0
Content-Type: text/uri-list
Content-Length: 67

http://192.168.1.151:8080/users/amasse/grammar/grxml/site_456.grxmlANNOUNCE 
rtsp://192.168.1.156:1554/speechrecognizer RTSP/1.0
CSeq: 7892
Session: 95404a612c57423d
Content-Type: application/mrcp
2010-04-26 16:34:08:515289 3065166752 [INFO]   Parsed Message Header [156 bytes]
ANNOUNCE rtsp://192.168.1.156:1554/speechrecognizer RTSP/1.0
CSeq: 7889
Session: a55348f67b264609
Content-Type: application/mrcp
Content-Length: 114

2010-04-26 16:34:08:515339 3065166752 [INFO]   Parsed Message Header [76 bytes]
RECOGNIZE 6769 MRCP/1.0
Content-Type: text/uri-list
Content-Length: 38

2010-04-26 16:34:08:515374 3065166752 [INFO]   Parsed Message Header [156 bytes]
ANNOUNCE rtsp://192.168.1.156:1554/speechrecognizer RTSP/1.0
CSeq: 7890
Session: 003b3c30ff9d424d
Content-Type: application/mrcp
Content-Length: 114

2010-04-26 16:34:08:515406 3065166752 [INFO]   Parsed Message Header [76 bytes]
RECOGNIZE 6770 MRCP/1.0
Content-Type: text/uri-list
Content-Length: 38

2010-04-26 16:34:08:515434 3065166752 [INFO]   Parsed Message Header [156 bytes]
ANNOUNCE rtsp://192.168.1.156:1554/speechrecognizer RTSP/1.0
CSeq: 7891
Session: 269eac8b71cc4ed7
Content-Type: application/mrcp
Content-Length: 195

2010-04-26 16:34:08:515466 3065166752 [INFO]   Parsed Message Header [128 bytes]
DEFINE-GRAMMAR 6771 MRCP/1.0
speech-language: fr-FR
Content-Id: grammar_0
Content-Type: text/uri-list
Content-Length: 67

2010-04-26 16:34:08:515520 3065166752 [INFO]   Partially Parsed Message Header 
[132 
bytes]
ANNOUNCE rtsp://192.168.1.156:1554/speechrecognizer RTSP/1.0
CSeq: 7892
Session: 95404a612c57423d
Content-Type: application/mrcp
2010-04-26 16:34:08:515548 3065166752 [INFO]   Receive RTSP Stream 
192.168.1.156:1554 
<-> 192.168.1.34:1217 [138 bytes]

Content-Length: 114

RECOGNIZE 6772 MRCP/1.0
Content-Type: text/uri-list
Content-Length: 38

session:grammar_0
session:grammar_1

2010-04-26 16:34:08:515567 3065166752 [INFO]   Parsed Message Header [1 bytes]

2010-04-26 16:34:08:515588 3065166752 [WARN]   Failed to Handle Message 
<95404a612c57423d>

Original comment by amasse.a...@gmail.com on 26 Apr 2010 at 3:02

GoogleCodeExporter commented 9 years ago
Hi Anthony,

Thanks for the help testing this stuff over again. Should be fixed in r1668.

Original comment by achalo...@gmail.com on 27 Apr 2010 at 12:00