florian-h05 / webrtc-sip-gw Goto Github PK
View Code? Open in Web Editor NEWA WebRTC-SIP gateway for AVM Fritz!Box based on Kamailio and rtpengine.
License: MIT License
A WebRTC-SIP gateway for AVM Fritz!Box based on Kamailio and rtpengine.
License: MIT License
i try to use this docker container with a fritzbox and jssip softphone..
the docker container is on a diffrent pc and without a ssl-cert.
i test the script without encryption, the normal ws:// ... But I have the problem that I can call other phones with my Jssip-Phone and everything works fine. But when I call the Jssip-Phone from another device, it rings, but the moment I pick up, the whole thing throws me an error. Do you have any idea what could be the reason for this ?
Is it maybe because of the missing certificate? I read that this would be necessary? Do you have an working javascript softphone code, as an example for me?
REGISTER sip:fritz.box SIP/2.0
Via: SIP/2.0/WS 22med1ou7ji1.invalid;branch=z9hG4bK4090291
Max-Forwards: 69
To: sip:[email protected]
From: "VISU" sip:[email protected];tag=uhstlr3r01
Call-ID: b7s2rh2kb3rjmkv84njdu4
CSeq: 3 REGISTER
Authorization: Digest algorithm=MD5, username="smartvisupanel2", realm="fritz.box", nonce="15738E3F9DFE4A4B", uri="sip:fritz.box", response="95f2c87b1e5ef94956abce6452d6f4b5"
Contact: sip:[email protected];transport=ws;+sip.ice;reg-id=1;+sip.instance="urn:uuid:59613d40-1aab-4f65-80d5-eff865a3d7de";expires=600
Expires: 600
Allow: INVITE,ACK,CANCEL,BYE,UPDATE,MESSAGE,OPTIONS,REFER,INFO,NOTIFY
Supported: path,gruu,outbound
User-Agent: JsSIP 3.10.0
Content-Length: 0
SIP/2.0 200 OK
Via: SIP/2.0/WS 22med1ou7ji1.invalid;rport=57665;received=192.168.178.27;branch=z9hG4bK4090291
From: "VISU" sip:[email protected];tag=uhstlr3r01
To: sip:[email protected];tag=29F62F8CA505B636
Call-ID: b7s2rh2kb3rjmkv84njdu4
CSeq: 3 REGISTER
Contact: sip:[email protected]:5060;expires=300
User-Agent: AVM FRITZ!Box 7430 146.07.31 (Sep 2 2023)
Supported: 100rel,replaces,timer
Allow-Event: telephone-event,refer,reg
Allow: INVITE,ACK,OPTIONS,CANCEL,BYE,UPDATE,PRACK,INFO,SUBSCRIBE,NOTIFY,REFER,MESSAGE,PUBLISH
Accept: application/sdp, multipart/mixed
Accept-Encoding: identity
Content-Length: 0INVITE sip:[email protected];transport=ws SIP/2.0
Record-Route: sip:192.168.178.57:8090;transport=ws;r2=on;lr=on;rtp=bridge;rtp=ws
Record-Route: sip:192.168.178.57;r2=on;lr=on;rtp=bridge;rtp=ws
Via: SIP/2.0/WS 192.168.178.57:8090;branch=z9hG4bK74ac.876ea268bd98b50c2832ef50bc754269.0
Via: SIP/2.0/UDP 192.168.178.1:5060;rport=5060;branch=z9hG4bK70B5F82BA0823D4D
From: "Mobilteil 1" sip:**[email protected];tag=7D692FA76198203C
To: sip:[email protected]:5060
Call-ID: [email protected]
CSeq: 55 INVITE
Contact: sip:[email protected];alias=192.168.178.1~5060~1
Max-Forwards: 69
P-Called-Party-ID: sip:**[email protected]
Expires: 120
Session-Expires: 600;refresher=uac
Min-SE: 90
User-Agent: AVM FRITZ!Box 7430 146.07.31 (Sep 2 2023)
Supported: 100rel,replaces,timer
Allow-Events: telephone-event,refer
Allow: INVITE,ACK,OPTIONS,CANCEL,BYE,UPDATE,PRACK,INFO,SUBSCRIBE,NOTIFY,REFER,MESSAGE,PUBLISH
Content-Type: application/sdp
Accept: application/sdp, multipart/mixed
Accept-Encoding: identity
Content-Length: 864
P-hint: outbound
v=0
o=user 12342376 12342376 IN IP4 192.168.178.57
s=call
c=IN IP4 192.168.178.57
t=0 0
m=audio 23454 RTP/SAVPF 9 8 0 2 102 100 99 101 97 120 121
a=mid:1
a=rtpmap:9 G722/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:2 G726-32/8000
a=rtpmap:102 G726-32/8000
a=rtpmap:100 G726-40/8000
a=rtpmap:99 G726-24/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=rtpmap:97 iLBC/8000
a=fmtp:97 mode=30
a=rtpmap:120 PCMA/16000
a=rtpmap:121 PCMU/16000
a=sendrecv
a=rtcp:23455
a=rtcp-mux
a=setup:actpass
a=fingerprint:sha-256 FD:3B:9D:7E:85:1B:1C:9C:2F:DC:1D:53:2D:5E:26:23:12:19:0A:EC:8F:BE:8B:68:B1:DB:CD:10:26:78:49:3D
a=ice-ufrag:eNAfBzci
a=ice-pwd:cj1LbH46AkKhdhcffMP1Ghwi9J
a=candidate:7OpuYiObkcXO7RiN 1 UDP 2130706431 192.168.178.57 23454 typ host
a=candidate:7OpuYiObkcXO7RiN 2 UDP 2130706430 192.168.178.57 23455 typ hostSIP/2.0 100 Trying
Via: SIP/2.0/WS 192.168.178.57:8090;branch=z9hG4bK74ac.876ea268bd98b50c2832ef50bc754269.0
Via: SIP/2.0/UDP 192.168.178.1:5060;rport=5060;branch=z9hG4bK70B5F82BA0823D4D
To: sip:[email protected]:5060
From: "Mobilteil 1" sip:**[email protected];tag=7D692FA76198203C
Call-ID: [email protected]
CSeq: 55 INVITE
Supported: timer,ice,replaces,outbound
Content-Length: 0SIP/2.0 180 Ringing
Record-Route: sip:192.168.178.57:8090;transport=ws;r2=on;lr=on;rtp=bridge;rtp=ws
Record-Route: sip:192.168.178.57;r2=on;lr=on;rtp=bridge;rtp=ws
Via: SIP/2.0/WS 192.168.178.57:8090;branch=z9hG4bK74ac.876ea268bd98b50c2832ef50bc754269.0
Via: SIP/2.0/UDP 192.168.178.1:5060;rport=5060;branch=z9hG4bK70B5F82BA0823D4D
To: sip:[email protected]:5060;tag=qfqfjnnui0
From: "Mobilteil 1" sip:**[email protected];tag=7D692FA76198203C
Call-ID: [email protected]
CSeq: 55 INVITE
Contact: sip:[email protected];transport=ws
Supported: timer,ice,replaces,outbound
Content-Length: 0INVITE sip:[email protected]:5060 SIP/2.0
Record-Route: sip:192.168.178.57:8090;transport=ws;r2=on;lr=on;nat=yes;rtp=bridge
Record-Route: sip:192.168.178.57;r2=on;lr=on;nat=yes;rtp=bridge
Via: SIP/2.0/WS 192.168.178.57:8090;branch=z9hG4bK74ac.876ea268bd98b50c2832ef50bc754269.1
Via: SIP/2.0/UDP 192.168.178.1:5060;rport=5060;branch=z9hG4bK70B5F82BA0823D4D
From: "Mobilteil 1" sip:**[email protected];tag=7D692FA76198203C
To: sip:[email protected]:5060
Call-ID: [email protected]
CSeq: 55 INVITE
Contact: sip:[email protected];alias=192.168.178.1~5060~1
Max-Forwards: 69
P-Called-Party-ID: sip:**[email protected]
Expires: 120
Session-Expires: 600;refresher=uac
Min-SE: 90
User-Agent: AVM FRITZ!Box 7430 146.07.31 (Sep 2 2023)
Supported: 100rel,replaces,timer
Allow-Events: telephone-event,refer
Allow: INVITE,ACK,OPTIONS,CANCEL,BYE,UPDATE,PRACK,INFO,SUBSCRIBE,NOTIFY,REFER,MESSAGE,PUBLISH
Content-Type: application/sdp
Accept: application/sdp, multipart/mixed
Accept-Encoding: identity
Content-Length: 491
P-hint: outbound
v=0
o=user 12342376 12342376 IN IP4 192.168.178.57
s=call
c=IN IP4 192.168.178.57
t=0 0
m=audio 23476 RTP/AVP 9 8 0 2 102 100 99 101 97 120 121
a=rtpmap:9 G722/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:2 G726-32/8000
a=rtpmap:102 G726-32/8000
a=rtpmap:100 G726-40/8000
a=rtpmap:99 G726-24/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=rtpmap:97 iLBC/8000
a=fmtp:97 mode=30
a=rtpmap:120 PCMA/16000
a=rtpmap:121 PCMU/16000
a=sendrecv
a=rtcp:23477SIP/2.0 482 Loop Detected
Via: SIP/2.0/WS 192.168.178.57:8090;branch=z9hG4bK74ac.876ea268bd98b50c2832ef50bc754269.1
Via: SIP/2.0/UDP 192.168.178.1:5060;rport=5060;branch=z9hG4bK70B5F82BA0823D4D
To: sip:[email protected]:5060;tag=cekqukbrbm
From: "Mobilteil 1" sip:**[email protected];tag=7D692FA76198203C
Call-ID: [email protected]
CSeq: 55 INVITEACK sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/WS 192.168.178.57:8090;branch=z9hG4bK74ac.876ea268bd98b50c2832ef50bc754269.1
From: "Mobilteil 1" sip:**[email protected];tag=7D692FA76198203C
To: sip:[email protected]:5060;tag=cekqukbrbm
Call-ID: [email protected]
CSeq: 55 ACK
Max-Forwards: 69
Content-Length: 0SIP/2.0 488 Not Acceptable Here
Via: SIP/2.0/WS 192.168.178.57:8090;branch=z9hG4bK1368.414027032cc6771048fda7b823d6e3e5.0
Via: SIP/2.0/UDP 192.168.178.1:5060;rport=5060;branch=z9hG4bKA800366E8E9B37F8
To: sip:[email protected]:5060;tag=7vblfd2r18
From: "Mobilteil 1" sip:**[email protected];tag=D33AF1BB22DB324D
Call-ID: [email protected]
CSeq: 56 INVITE
Supported: timer,ice,replaces,outbound
Content-Length: 0JsSIP:WARN:RTCSession emit "peerconnection:setremotedescriptionfailed" [error:DOMException: Illegal audio/video payload type "2" at level 0
JsSIP:Transport received text message:
ACK sip:[email protected];transport=ws SIP/2.0
Via: SIP/2.0/WS 192.168.178.57:8090;branch=z9hG4bK1368.414027032cc6771048fda7b823d6e3e5.0
From: "Mobilteil 1" sip:**[email protected];tag=D33AF1BB22DB324D
To: sip:[email protected]:5060;tag=7vblfd2r18
Call-ID: [email protected]
CSeq: 56 ACK
Max-Forwards: 69
Content-Length: 0
Hello @florian-h05
Do you have an ides how I can solve the issue "required headers not present" ? I try to user your gw for registring at a starface-pbx......Can you help?
Thanks a lot
René
webrtc-sip-gw | 1(19) INFO: <script>: Setting new Contact header: sip:[email protected]:5060;alias=192.168.105.10~5060~1
webrtc-sip-gw | 9(27) INFO: <script>: HTTP Request Received
webrtc-sip-gw | 9(27) WARNING: websocket [ws_handshake.c:271]: ws_handle_handshake(): required headers not present
Really nice project. Works like a charm. But unfortunately not on my raspbian where also openHABian is running :)
Would it be possible to create an image for this architecture?
The current health check is "pinging" Kamilio which leads to confusing log messages.
This should be improved.
An option would be to use kamctl monitor
or other kamctl
commands.
Those however require the mi_fifo
module:
loadmodule "mi_fifo.so"
and also see https://kamailio.org/docs/modules/4.4.x/modules/mi_fifo.html.
Hi Nanosonde,
I'm somewhat struggling with the overhead of SIP Hass-Card (asterisk and co) with my doorbird intercom and I already had it working with my Fritzbox. Is there any chance you could post a quick howto on how to get this gateway working by any chance? :)
Thanks in advance,
Stephan
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.