Hello,
I’m working on building an RTP Proxy which will allow both regular SIP to SIP transactions and WebRTC to SIP transactions to an Asterisk Server.
SIP UAC < ---UDP/SIP --- > Kamailio/RTPEngine Proxy < ---UDP/SIP----- > Asterisk Server
AND
WebRTC UAC < ---WSS--- > Kamailio/RTPEngine Proxy < ---UDP/SIP----- > Asterisk Server
The Kamailio/RTPEngine Proxy is stateless (does not use the tm or registerer modules), and uses the Path module to replace the Route header with a Path header.
It works grep for SIP/UDP to SIP/UDP transactions.
HOWEVER… It only partially works for WSS to SIP/UDP transactions. The REGISTER/401(Unauthorized), REGISTER/200(OK) transaction works well.
When the Asterisk server sends a SIP Options message, I get the following error:
Jun 25 15:47:03 VRTPENGINE kamailio[4953]: INFO: <script>: => OPTIONS <
sip:l4umfumh@192.0.2.97;transport=ws;alias=209.141.117.212~59751~6 -> <null> (IP:172.16.0.48:sp)
Jun 25 15:47:03 VRTPENGINE kamailio[4953]: WARNING: <core> [core/msg_translator.c:2815]: via_builder(): TCP/TLS connection (id: 0) for WebSocket could not be found
Jun 25 15:47:03 VRTPENGINE kamailio[4953]: ERROR: <core> [core/msg_translator.c:2003]: build_req_buf_from_sip_req(): could not create Via header
Jun 25 15:47:03 VRTPENGINE kamailio[4953]: ERROR: <core> [core/forward.c:550]: forward_request(): building failed
Jun 25 15:47:03 VRTPENGINE kamailio[4953]: WARNING: <core> [core/receive.c:425]: receive_msg(): error while trying script
It appears that the WebSocket corresponding to the WSS leg cannot be located when the request is initiated from the Asterisk Server.
Any thoughts on how I can get this to work in the other direction (Asterisk to Kamailio)? I’ve been looking at the WebRTC to SIP Client and Server (https://github.com/havfo/WEBRTC-to-SIP),
but that doesn’t quite do what I want it to do (i.e. it appears to act as a registrar server and doesn’t forward REGISTER requests on to another registrar).
Thanks and regards,
Peter H. Manley, Ph.D.
Chief Software Architect
KomBea Corporation
3400
North Ashton Blvd, Suite 470
Office:+1.801.610.5808
Mobile +1.801.243.7773