Using Wireshark
Wireshark or tcpdump can be used to capture session on the machine running MRCP-Proxy.
The image below shows SIP protocol interaction for correctly executed MRCP session. (To see the details you may have to right-click on the image and chose "Open in a new Tab".)
From the MRCP and MRCP-Proxy Logs
The logs show establishment of new MRCP v2 session. Note: some of the logs are URL Encoded (to keep multiline messages together. You will have to URL Decode them to read, e.g. using https://meyerweb.com/eric/tools/dencoder/)
Initial SIP invite
[INFO] Receive SIP Event [nua_i_invite] Status 100 Trying [SIP-Agent-1]
[INFO] Receive SIP Event [nua_i_state] Status 100 Trying [SIP-Agent-1]
[INFO]SessionLifeEvent: sname=0x7f5aa8001b18 sid=new type=SDP mode=Server act=Remote-Receive msg=::>>
v=0
o=-+2850393+2850393+IN+IP4+192.168.2XX.219
s=voxeo.19.1.0.6.93607
c=IN+IP4+192.168.2XX.219
t=0+0
m=audio+10000+RTP/AVP+0+8+101
a=rtpmap:0+PCMU/8000
a=rtpmap:8+PCMA/8000
a=rtpmap:101+telephone-event/8000
a=fmtp:101+0-15
a=ptime:20
m=application+9+TCP/MRCPv2+1
a=setup:active
a=connection:new
a=resource:speechrecog
a=cmid:1
<<::
Setup of RTP connection:
[INFO] Enable RTP Session 192.168.192.3:5017
[INFO] Open RTP Receiver 192.168.192.3:5017 <- 192.168.2XX.219:10000 playout [50 ms] bounds [0 - 600 ms] adaptive [1] skew detection [1]
[INFO] Media Path 0x7f5aa8001b18 Source->[PCMU/8000/1]->Decoder->[LPCM/8000/1]->Bridge->[LPCM/8000/1]->Sink
Reserving ASR resource and connecting to it:
[DEBUG] Established connection to REX server: 192.168.192.3:42400 <-> 192.168.192.2:8080
[INFO] Requesting resource for sid="122e673a59ce11ea" and model="*"
[INFO]ReceivedresponsefromREXResourceManager[143bytes]::>>
HTTP/1.1+200+
Content-Type:+text/plain;charset=UTF-8
Content-Length:+29
Date:+Fri,+28+Feb+2020+02:00:19+GMT
d6052db7d94e+12001+12002+8080
<<::
[INFO] Connect to REX: rexcontrol
[DEBUG] Established connection to REX server: 192.168.192.3:55418 <-> 192.168.192.2:12001
[INFO] Connect to REX: rexaudio
[DEBUG] Established connection to REX server: 192.168.192.3:46276 <-> 192.168.192.2:12002
[INFO]SessionLifeEvent: sname=0x7f5aa8001b18 sid=122e673a59ce11ea type=SDP mode=Server act=Local-Answer msg=::>>
v=0
o=UniMRCPServer+0+0+IN+IP4+192.168.2XX.205
s=-
c=IN+IP4+192.168.2XX.205
t=0+0
m=audio+5017+RTP/AVP+0+101
a=rtpmap:0+PCMU/8000
a=rtpmap:101+telephone-event/8000
a=fmtp:101+0-15
a=sendrecv
a=ptime:20
a=mid:0
m=application+1544+TCP/MRCPv2+1
a=setup:passive
a=connection:new
a=channel:122e673a59ce11ea@speechrecog
a=cmid:1
<<::
Completing SIP handshake:
[INFO] Receive SIP Event [nua_i_state] Status 200 OK [SIP-Agent-1]
[NOTICE] Accepted TCP/MRCPv2 Connection 192.168.192.3:1544 <-> 192.168.192.1:34018
[INFO] Receive SIP Event [nua_i_ack] Status 200 OK [SIP-Agent-1]
[INFO] Receive SIP Event [nua_i_state] Status 200 OK [SIP-Agent-1]
[NOTICE] SIP Call State 0x7f5aa8001b18 [ready]
[INFO] Receive SIP Event [nua_i_active] Status 200 Call active [SIP-Agent-1]
First messages in MRCP session:
[INFO]SessionLifeEvent: sid=122e673a59ce11ea stype=speechrecog type=MRCPv2 mode=Server act=Receive src=192.168.192.1:34018dst=192.168.192.3:1544 len=89 msg=::>>
MRCP/2.0+0000000089+SET-PARAMS+2000
Channel-Identifier:+122e673a59ce11ea@speechrecog
<<::
[INFO]SessionLifeEvent: sid=122e673a59ce11ea stype=speechrecog type=MRCPv2 mode=Server act=Send src=192.168.192.3:1544 dst=192.168.192.1:34018 len=83 msg=::>>
MRCP/2.0+83+2000+200+COMPLETE
Channel-Identifier:+122e673a59ce11ea@speechrecog
<<::
If recognition is running correctly you should see the recognition results in the logs, like this one
unimrcp_1 | 2021-03-29T17:30:06.331467 [INFO] SessionLifeEvent: sid=64cfffbc90b411eb stype=speechrecog type=MRCPv2 mode=Server act=Send src=172.20.0.3:1544 dst=34.74.129.158:36172 len=608 msg=::>>MRCP%2f2.0+608+RECOGNITION-COMPLETE+2+COMPLETE%0d%0aChannel-Identifier%3a+64cfffbc90b411eb%40speechrecog%0d%0aCompletion-Cause%3a+000+success%0d%0aWaveform-URI%3a+%3chttps%3a%2f%2fapi.voicegain.ai%2fv1%2fivr%2fproxy%2futterances%3fkey%3d1fc1c42788b136ff9e999bc5f8d60088a756dbf015880185e94d9af9fdd48b60%3e%3bsize%3d47360%3bduration%3d2960%0d%0aContent-Type%3a+application%2fnlsml%2bxml%0d%0aContent-Length%3a+261%0d%0a%0d%0a%3c%3fxml+version%3d%221.0%22+encoding%3d%22UTF-8%22%3f%3e%0d%0a%3cresult%3e%0d%0a%09%3cinterpretation+grammar%3d%22session%3arequest1%40form-level%22+confidence%3d%220.70%22%3e%0d%0a%09%09%3cinput+mode%3d%22speech%22%3eseven+four+oh+one+seven%3c%2finput%3e%0d%0a%09%09%3cinstance%3e%0d%0a%09%09%09%3czip%3e74017%3c%2fzip%3e%0a%09%09%3c%2finstance%3e%0d%0a%09%3c%2finterpretation%3e%0d%0a%3c%2fresult%3e%0d%0a<<::
You can url decode it to:
unimrcp_1|2021-03-29T17:30:06.331467[INFO]SessionLifeEvent:sid=64cfffbc90b411ebstype=speechrecogtype=MRCPv2mode=Serveract=Sendsrc=172.20.0.3:1544dst=34.74.129.158:36172len=608msg=::>>MRCP/2.0+608+RECOGNITION-COMPLETE+2+COMPLETE
Channel-Identifier:+64cfffbc90b411eb@speechrecog
Completion-Cause:+000+success
Waveform-URI:+<https://api.voicegain.ai/v1/ivr/proxy/utterances?key=1fc1c42788b136ff9e999bc5f8d60088a756dbf015880185e94d9af9fdd48b60>;size=47360;duration=2960
Content-Type:+application/nlsml+xml
Content-Length:+261
<?xml+version="1.0"+encoding="UTF-8"?>
<result>
<interpretation+grammar="session:request1@form-level"+confidence="0.70">
<input+mode="speech">seven+four+oh+one+seven</input>
<instance>
<zip>74017</zip>
</instance>
</interpretation>
</result>
<<::
Troubleshooting problems
If you see Status 408 ACK Timeout like in the log below it may be because you did not specify the correct IP when requesting the MRCP Proxy download URL:
unimrcp_1 | 2021-03-29T16:49:46.268599 [INFO] Receive SIP Event [nua_i_error] Status 408 ACK Timeout [SIP-Agent-1]
unimrcp_1 | 2021-03-29T16:49:46.269067 [INFO] Receive SIP Event [nua_i_state] Status 0 ACK Timeout [SIP-Agent-1]
unimrcp_1 | 2021-03-29T16:49:46.269078 [NOTICE] SIP Call State 0x7fd4f4001b18 [terminating]
unimrcp_1 | 2021-03-29T17:00:08.168029 [INFO] SessionLifeEvent: sname=0x7fd4f4003e38 sid=3744512890b011eb type=SDP mode=Server act=Local-Answer msg=::>>v%3d0%0d%0ao%3dUniMRCPServer+0+0+IN+IP4+3.21.39.14%0d%0as%3d-%0d%0ac%3dIN+IP4+3.21.39.14%0d%0at%3d0+0%0d%0am%3dapplication+1544+TCP%2fMRCPv2+1%0d%0aa%3dsetup%3apassive%0d%0aa%3dconnection%3anew%0d%0aa%3dchannel%3a3744512890b011eb%40speechrecog%0d%0aa%3dcmid%3a1%0d%0am%3daudio+5041+RTP%2fAVP+0+101%0d%0aa%3drtpmap%3a0+PCMU%2f8000%0d%0aa%3drtpmap%3a101+telephone-event%2f8000%0d%0aa%3dfmtp%3a101+0-15%0d%0aa%3drecvonly%0d%0aa%3dptime%3a20%0d%0aa%3dmid%3a1%0d%0a<<::
unimrcp_1 | 2021-03-29T17:00:08.168057 [DEBUG] Wait for Messages [MRCP Server]
unimrcp_1 | 2021-03-29T17:00:08.168538 [INFO] Receive SIP Event [nua_i_state] Status 200 OK [SIP-Agent-1]
unimrcp_1 | 2021-03-29T17:00:08.168549 [NOTICE] SIP Call State 0x7fd4f4003e38 [completed]
unimrcp_1 | 2021-03-29T17:00:24.072935 [INFO] Receive SIP Event [nua_i_error] Status 408 ACK Timeout [SIP-Agent-1]
unimrcp_1 | 2021-03-29T17:00:24.073151 [INFO] Receive SIP Event [nua_i_state] Status 0 ACK Timeout [SIP-Agent-1]
Comments
0 comments
Please sign in to leave a comment.