unispeech / unimrcp

Open source cross-platform implementation of MRCP protocol
http://www.unimrcp.org
Apache License 2.0
380 stars 167 forks source link

How to configure the service under a docker envirment? #260

Closed LinGeLin closed 4 years ago

LinGeLin commented 4 years ago

2020-01-02 21:18:57:378342 [NOTICE] Create MRCP Handle 0x7f0ba8000ce8 [uni2] 2020-01-02 21:18:57:378404 [INFO] Create Channel 0x7f0ba8000ce8 2020-01-02 21:18:57:378480 [INFO] Receive App Request 0x7f0ba8000ce8 [2] 2020-01-02 21:18:57:378574 [INFO] Add MRCP Handle 0x7f0ba8000ce8 2020-01-02 21:18:57:378625 [NOTICE] Add Control Channel 0x7f0ba8000ce8 new@speakverify 2020-01-02 21:18:57:380279 [INFO] Send Offer 0x7f0ba8000ce8 [c:1 a:1 v:0] to 172.16.91.50:8060 2020-01-02 21:18:57:380375 [INFO] Local SDP 0x7f0ba8000ce8 v=0 o=UniMRCPClient 0 0 IN IP4 xxx.xxx.xxx.xxx(client ip) s=- c=IN IP4 xxx.xxx.xxx.xxx(client ip) t=0 0 m=application 9 TCP/MRCPv2 1 a=setup:active a=connection:new a=resource:speakverify a=cmid:1 m=audio 4000 RTP/AVP 97 98 99 a=rtpmap:97 PCMU/16000 a=rtpmap:98 PCMA/16000 a=rtpmap:99 L16/16000 a=sendonly a=ptime:20 a=mid:1

2020-01-02 21:18:57:818558 [INFO] Receive SIP Event [nua_i_state] Status 0 INVITE sent [SIP-Agent-1] 2020-01-02 21:18:57:818617 [NOTICE] SIP Call State 0x7f0ba8000ce8 [calling] 2020-01-02 21:18:57:880245 [INFO] Receive SIP Event [nua_r_invite] Status 200 OK [SIP-Agent-1] 2020-01-02 21:18:57:884311 [INFO] Receive SIP Event [nua_i_state] Status 200 OK [SIP-Agent-1] 2020-01-02 21:18:57:884361 [NOTICE] SIP Call State 0x7f0ba8000ce8 [ready] 2020-01-02 21:18:57:884381 [INFO] Remote SDP 0x7f0ba8000ce8 v=0 o=UniMRCPServer 875586229928392296 109512906362458802 IN IP4 xxx.xxx.xxx.xxx(docker ip) s=- c=IN IP4 xxx.xxx.xxx.xxx(docker ip) t=0 0 m=application 1544 TCP/MRCPv2 1 a=setup:passive a=connection:new a=channel:6e97a66e2d6211ea@speakverify a=cmid:1 m=audio 5000 RTP/AVP 97 a=rtpmap:97 PCMU/16000 a=recvonly a=ptime:20 a=mid:1

2020-01-02 21:18:57:884580 [INFO] Receive SIP Event [nua_i_active] Status 200 Call active [SIP-Agent-1] 2020-01-02 21:18:57:884609 [INFO] Receive Answer 0x7f0ba8000ce8 [c:1 a:1 v:0] Status 200 2020-01-02 21:18:57:889515 [INFO] Enable RTP Session xxx.xxx.xxx.xxx(client ip):4000 2020-01-02 21:18:57:889592 [INFO] Open RTP Transmitter xxx.xxx.xxx.xxx(client ip):4000 -> xxx.xxx.xxx.xxx(docker ip):5000 2020-01-02 21:18:57:889614 [INFO] Media Path 0x7f0ba8000ce8 Source->[LPCM/16000/1]->Bridge->[LPCM/16000/1]->Encoder->[PCMU/16000/1]->Sink 2020-01-02 21:19:18:887527 [WARN] Failed to Establish TCP/MRCPv2 Connection 2020-01-02 21:19:18:887725 [INFO] Raise App Response 0x7f0ba8000ce8 <6e97a66e2d6211ea> [2] FAILURE [1]

It's so hard for me!!!!!!

I configured client only ;

client ip service ip
achaloyan commented 4 years ago

There is not too much specific to UniMRCP server.

In your Docker file, expose the port numbers (SIP, RTSP, MRCPv2, RTP range) and run the server for example as follows

CMD ["/opt/unimrcp/bin/unimrcpserver -r /opt/unimrcp -o 2 -w"]

evandrocoan commented 3 years ago

There is not name /opt/unimrcp/bin/unimrcpserver, but only /usr/local/unimrcp/bin/unimrcpserver (https://github.com/unispeech/unimrcp/issues/290).

achaloyan commented 3 years ago

Binary RPM and Deb packages are installed in /opt/unimrcp, whereas /usr/loca/unimrcp is used by default while building from source.