Session establishment in MRCP v.2

There are no MRCP communications before SIP session is established. In order to create SIP session a client must send SIP INVITE and assign at least one control stream. The following example shows SDP parameters for SIP INVITE which is send by a client to establish MRCP control media session and audio stream to the recognizer resources.

v=0
o=user_example 2890754161 2890782611 IN IP4 192.168.255.2
s=some_session_name
m=application 9000 TCP/MRCPv2
c=IN IP4 192.168.255.2
a=setup:active
a=connection:new
a=resource:speechrecog
a=cmid:1
m=audio 32773 RTP/AVP 0
c=IN IP4 192.168.255.1
a=rtpmap:0 pcmu/8000
a=sendonly
a=mid:1

Server replies with SIP OK and the following SDP

v=0
o=- 1190241158 1190241158 IN IP4 192.168.255.1
s=MRCP session
c=IN IP4 192.168.255.1
t=0 0
m=application 6075 TCP/MRCPv2
a=channel:1@speechrecog
a=cmid:1
a=connection:new
a=setup:passive
m=audio 7892 RTP/AVP 0
a=mid:1
a=recvonly
a=rtpmap:0 pcmu/8000

After client sends SIP ACK we have opened MRCP control connection and one audio media connection to the MRCP recognizer server. MRCP messages will reference channel ID which has been given back by the server in “a=channel:1@speechrecog” line. This is MRCP session ID or in other words control session identifier.

Later client can associate the existing media connection with another MRCP resource by sending new SIP INVITE. For example client can add new control connection to the server for the speech synthesizer resource and update the existing audio stream to send and receive mode. For these features SDP parameters “a=cmid:1″, “a=mid:1″ and “a=connection:existing” are used. They allow to bind media to control connections. Check RFC for such examples.

Deallocation of arbitrary connections can be made by using 0 port as SDP specs say.

If SIP ACK is sent, it is then clear to send MRCP control messages through the control connection to the server.

MRCP/2.0 91 GET-PARAMS 51
Channel-Identifier: 1@speechrecog
Confidence-Threshold:

where

91: size of the message in bytes.

51: request ID. Client must choose first request ID and increase the value for each subsequent request.

Server replies:

MRCP/2.0 97 51 200 COMPLETE
Channel-Identifier: 1@speechrecog
Confidence-Threshold: 0.5

where

91: size of the message in bytes.

51: request ID for this response

When client wants to deallocate all session associated resources and close the connection it sends SIP BYE to the server and server responses with SIP OK.

Leave a Reply