Closed franzene closed 5 years ago
It seems like the problem could be that app is expecting to get a request uri that has a destination phone number, and the INVITE from opensips does not have that. Just a guess, but can you show me what the INVITE from opensips looks like?
Invite as logged by drachtio.
drachtio_1 | 2018-12-06 00:04:16.299278 recv 2155 bytes from udp/[172.18.0.3]:5060 at 00:04:16.298718:
drachtio_1 | INVITE sip:drachtio:5062 SIP/2.0
drachtio_1 | Via: SIP/2.0/UDP 172.18.0.3:5060;branch=z9hG4bK9332.cddce4a1.0
drachtio_1 | To: sip:drachtio:5062
drachtio_1 | From: <sip:drachtio:5062>;tag=8001af8a579bb7e1a4c5a353eb991891-ce21
drachtio_1 | CSeq: 2 INVITE
drachtio_1 | Call-ID: B2B.312.4343432.1544047925
drachtio_1 | Max-Forwards: 70
drachtio_1 | Content-Length: 1713
drachtio_1 | User-Agent: OpenSIPS (2.4.3 (x86_64/linux))
drachtio_1 | Require: siprec
drachtio_1 | Content-Type: multipart/mixed;boundary=OSS-unique-boundary-42
drachtio_1 | Contact: <sip:172.18.0.3:5060>
drachtio_1 |
drachtio_1 | --OSS-unique-boundary-42
drachtio_1 | Content-Type: application/sdp
drachtio_1 |
drachtio_1 | v=0
drachtio_1 | o=- 1544054656 0 IN IP4 0.0.0.0
drachtio_1 | s=-
drachtio_1 | t=0 0
drachtio_1 | c=IN IP4 127.0.0.1
siprec_1 | {"level":30,"time":1544054656301,"msg":"received SIPREC invite: sip:drachtio:5062","pid":8,"hostname":"siprec","callid":"B2B.312.4343432.1544047925","v":1}
drachtio_1 | m=audio 35038 RTP/AVP 0 8 101
drachtio_1 | a=ice-pwd:510311ca4b405cfc3eae7726
drachtio_1 | a=ice-ufrag:d7bf8500
drachtio_1 | a=rtcp-xr:rcvr-rtt=all:10000 stat-summary=loss,dup,jitt,TTL voip-metrics
drachtio_1 | a=rtpmap:101 telephone-event/8000
drachtio_1 | a=rtcp:60404
drachtio_1 | a=candidate:1 1 UDP 2130706431 192.168.0.10 60378 typ host
drachtio_1 | a=candidate:1 2 UDP 2130706430 192.168.0.10 60404 typ host
drachtio_1 | a=candidate:2 1 UDP 1694498815 216.15.122.191 60378 typ srflx raddr 192.168.0.10 rport 60378
drachtio_1 | a=candidate:2 2 UDP 1694498814 216.15.122.191 60404 typ srflx raddr 192.168.0.10 rport 60404
drachtio_1 | a=rtcp-fb:* trr-int 5000
drachtio_1 | a=rtcp-fb:* ccm tmmbr
drachtio_1 | a=label:1
drachtio_1 | a=sendonly
drachtio_1 | m=audio 35039 RTP/AVP 0 101
drachtio_1 | a=rtpmap:0 PCMU/8000
drachtio_1 | a=rtpmap:101 telephone-event/8000
drachtio_1 | a=fmtp:101 0-16
drachtio_1 | a=maxptime:150
drachtio_1 | a=label:2
drachtio_1 | a=sendonly
drachtio_1 |
drachtio_1 | --OSS-unique-boundary-42
drachtio_1 | Content-Type: application/rs-metadata+xml
drachtio_1 | Content-Disposition: recording-session
drachtio_1 |
drachtio_1 | <?xml version="1.0" encoding="UTF-8"?>
drachtio_1 | <recording xmlns='urn:ietf:params:xml:ns:recording:1'>
drachtio_1 | <datamode>complete</datamode>
drachtio_1 | <session session_id="XoM2pKdFR8C3eX33qJKcww==">
drachtio_1 | <sipSessionID>hvij5wK4Wx</sipSessionID>
drachtio_1 | </session>
drachtio_1 | <participant participant_id="omFyWlFETEyFz/KXNLe4iQ==">
drachtio_1 | <nameID aor="sip:6001@localhost"/>
drachtio_1 | </participant>
drachtio_1 | <participant participant_id="fLbZzLMgRXGp+F5w0hOt6w==">
drachtio_1 | <nameID aor="sip:101@localhost"/>
drachtio_1 | </participant>
drachtio_1 | <stream stream_id="1LiAtnDVR9m469/0L4bwCA==" session_id="XoM2pKdFR8C3eX33qJKcww==">
drachtio_1 | <label>1</label>
drachtio_1 | </stream>
drachtio_1 | <stream stream_id="WJgj5uxeRH+nwUah02dWqg==" session_id="XoM2pKdFR8C3eX33qJKcww==">
drachtio_1 | <label>2</label>
drachtio_1 | </stream>
drachtio_1 | </recording>
drachtio_1 | --OSS-unique-boundary-42--
drachtio_1 | 2018-12-06 00:04:16.299568 send 263 bytes to udp/[172.18.0.3]:5060 at 00:04:16.299453:
drachtio_1 | SIP/2.0 100 Trying
drachtio_1 | Via: SIP/2.0/UDP 172.18.0.3:5060;branch=z9hG4bK9332.cddce4a1.0;rport=5060
drachtio_1 | From: <sip:drachtio:5062>;tag=8001af8a579bb7e1a4c5a353eb991891-ce21
drachtio_1 | To: <sip:drachtio:5062>
drachtio_1 | Call-ID: B2B.312.4343432.1544047925
drachtio_1 | CSeq: 2 INVITE
drachtio_1 | Content-Length: 0
drachtio_1 |
siprec_1 | {"level":50,"time":1544054656312,"msg":"Error connecting call: TypeError: Cannot read property 'user' of undefined","pid":8,"hostname":"siprec","callid":"B2B.312.4343432.1544047925","v":1}
The network im setting up looks like this: The readme says this should work with opensips, I originally tried to set this up without rtpproxy and use rtpengine only but the opensips siprec module only supports rtpproxy.
Yes, ok I think the issue is that I was expecting to have the dialed number in the Request-URI and To header, and it is missing in both:
INVITE sip:drachtio:5062
To: sip:drachtio:5062
I can look into making a fix for this case. If I create a branch with a fix, would you be able to test it?
Yes, Ill be able to test it!
can you test with the 'opensips-fix' branch?
Great it seems to work now, rtpengine is receiving recording requests now. Thanks!
great! I merged this fix into the master branch
I have a system with openSIPS and rtpproxy infront of asterisk. Ive now setup drachtio, drachtio-siprec and rtpengine to record calls but drachtio-siprec is throwing the following type error.
{"level":50,"time":1544045350298,"msg":"Error connecting call: TypeError: Cannot read property 'user' of undefined","pid":8,"hostname":"siprec","callid":"B2B.312.2851794.1544045349","v":1}
Is this an issue with the siprec server or the data being passed during the sip invite by the opensips siprec module?