Coder Social home page Coder Social logo

rolandgenske / fapfon-proxy Goto Github PK

View Code? Open in Web Editor NEW
6.0 6.0 1.0 49 KB

Workaround for FRITZ!App Fon SIP via VPN

License: GNU General Public License v2.0

C 97.75% Shell 1.92% Makefile 0.33%
fritz fritzapp fritzbox fritzfon openvpn proxy sip telephony vpn

fapfon-proxy's People

Contributors

rolandgenske avatar soulianis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

liphis

fapfon-proxy's Issues

Problems with incoming call

Hello,

at first: thanks for this great project. Wondering why it hasn't got more attention yet.
I've setup it in order to use Fritz!App Fon over a Wireguard VPN. Outgoing calls now work fine, but I'm struggling with incoming calls. They don't reach the Fritz!App Fon. According to the tcpdump logs below, it seems like the NOTIFY and INVITE SIP-messages have the wrong destination IP-Address.

Addresses

IPv4 Host
10.5.1.51 VPN Server
10.5.1.11 Fritz!Box
10.5.10.10 Fritz!App Fon vpn address
192.168.1.101 Fritz!App Fon local address

Logs

fapfon-proxy
Apr 01 16:47:01 wireguard fapfon-proxy[7822]: 200401 164701 V3 Box address 10.5.1.11:5060
Apr 01 16:47:01 wireguard fapfon-proxy[7822]: 200401 164701 V3 TCP: Server SIP port 5060
Apr 01 16:47:01 wireguard fapfon-proxy[7822]: 200401 164701 V3 UDP: Server SIP port 5060
Apr 01 16:47:01 wireguard fapfon-proxy[7822]: 200401 164701 V1 Start fapfon-proxy version 0.3.1221
Apr 01 16:47:31 wireguard fapfon-proxy[7822]: 200401 164731 V3 [1] Connect 10.5.10.10:59484/udp, contact 'JulnsiPhone_WIGI45ak'
REGISTER, SUBSCRIBE, NOTIFY tcpdump
IP 10.5.1.51.59741 > 10.5.1.11.5060: UDP, length 563
E..O.V@[email protected].
..3
....]...;..REGISTER sip:fritz.box SIP/2.0
Via: SIP/2.0/UDP 192.168.1.101:63346;rport;branch=z9hG4bKPjUh8D15qIqUsW7IFIVwvOCClSqsT.5jsU
Max-Forwards: 70
From: <sip:[email protected]>;tag=Wek6GoxtDZR92wpGs6MDK9Ye7ocjvBUn
To: <sip:[email protected]>
Call-ID: vnZTMwW3Cg0CynbSbFkHAvAyEHlSUtIe
CSeq: 2013 REGISTER
User-Agent: FRITZ!AppFon/2460 sip/2.8
Contact: <sip:[email protected]:63346;ob>
Expires: 3600
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Content-Length: 0


IP 10.5.1.11.5060 > 10.5.1.51.59741: UDP, length 465
E.......@...
...
..3...]....SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.1.101:63346;rport=59741;branch=z9hG4bKPjUh8D15qIqUsW7IFIVwvOCClSqsT.5jsU;received=10.5.1.51
From: <sip:[email protected]>;tag=Wek6GoxtDZR92wpGs6MDK9Ye7ocjvBUn
To: <sip:[email protected]>;tag=584AD20568DEA182
Call-ID: vnZTMwW3Cg0CynbSbFkHAvAyEHlSUtIe
CSeq: 2013 REGISTER
WWW-Authenticate: <redacted>
User-Agent: FRITZ!OS
Content-Length: 0


IP 10.5.1.51.59741 > 10.5.1.11.5060: UDP, length 725
E....Y@[email protected][
..3
....].....gREGISTER sip:fritz.box SIP/2.0
Via: SIP/2.0/UDP 10.5.1.51:63346;rport;branch=z9hG4bKPj3yC9S0Zy-lL8Ka9Y2FpmE7xo11JjVaW1
Max-Forwards: 70
From: <sip:[email protected]>;tag=Wek6GoxtDZR92wpGs6MDK9Ye7ocjvBUn
To: <sip:[email protected]>
Call-ID: vnZTMwW3Cg0CynbSbFkHAvAyEHlSUtIe
CSeq: 2014 REGISTER
User-Agent: FRITZ!AppFon/2460 sip/2.8
Contact: <sip:[email protected]:63346;ob>
Expires: 3600
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Authorization: <redacted>
Content-Length: 0


IP 10.5.1.11.5060 > 10.5.1.51.59741: UDP, length 854
E..r....@...
...
..3...].^.LSIP/2.0 200 OK
Via: SIP/2.0/UDP 10.5.1.51:63346;rport=59741;branch=z9hG4bKPj3yC9S0Zy-lL8Ka9Y2FpmE7xo11JjVaW1
From: <sip:[email protected]>;tag=Wek6GoxtDZR92wpGs6MDK9Ye7ocjvBUn
To: <sip:[email protected]>;tag=CAEA059669F625E9
Call-ID: vnZTMwW3Cg0CynbSbFkHAvAyEHlSUtIe
CSeq: 2014 REGISTER
Contact: <sip:[email protected]:64053;ob>;expires=2468
Contact: <sip:[email protected]:59484;ob>;expires=3009
Contact: <sip:[email protected]:63346;ob>;expires=3600
User-Agent: AVM FRITZ!Box 7490 113.07.12 (Jul  3 2019)
Supported: 100rel,replaces,timer
Allow-Events: 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: 0


IP 10.5.1.51.59741 > 10.5.1.11.5060: UDP, length 649
E....`@[email protected].
..3
....]......SUBSCRIBE sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 10.5.1.51:63346;rport;branch=z9hG4bKPjkCp4PT3SDJLWE1rjbUPp0cgp51Fk4U05
Max-Forwards: 70
From: <sip:[email protected]>;tag=FI3m7cFpVlduMY0SDxyL4uNMhFDrxeZ3
To: <sip:[email protected]>
Contact: <sip:[email protected]:63346;ob>
Call-ID: I8QKBFAzYIvNuN8PKQFUmx6DZoZlgz7E
CSeq: 26407 SUBSCRIBE
Event: message-summary
Expires: 3600
Supported: replaces, 100rel, timer, norefersub
Accept: application/simple-message-summary
Allow-Events: presence, message-summary, refer
User-Agent: FRITZ!AppFon/2460 sip/2.8
Content-Length: 0


IP 10.5.1.11.5060 > 10.5.1.51.59741: UDP, length 444
E.......@...
...
..3...]....SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 10.5.1.51:63346;rport=59741;branch=z9hG4bKPjkCp4PT3SDJLWE1rjbUPp0cgp51Fk4U05
From: <sip:[email protected]>;tag=FI3m7cFpVlduMY0SDxyL4uNMhFDrxeZ3
To: <sip:[email protected]>;tag=661836827C13CA6A
Call-ID: I8QKBFAzYIvNuN8PKQFUmx6DZoZlgz7E
CSeq: 26407 SUBSCRIBE
WWW-Authenticate: <redacted>
User-Agent: FRITZ!OS
Content-Length: 0


IP 10.5.1.51.59741 > 10.5.1.11.5060: UDP, length 836
E..`.d@[email protected].
..3
....]...L..SUBSCRIBE sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 10.5.1.51:63346;rport;branch=z9hG4bKPj2Sp4DhU52t-cksw9Amk4JMBgIdzmrG.N
Max-Forwards: 70
From: <sip:[email protected]>;tag=FI3m7cFpVlduMY0SDxyL4uNMhFDrxeZ3
To: <sip:[email protected]>
Contact: <sip:[email protected]:63346;ob>
Call-ID: I8QKBFAzYIvNuN8PKQFUmx6DZoZlgz7E
CSeq: 26408 SUBSCRIBE
Event: message-summary
Expires: 3600
Supported: replaces, 100rel, timer, norefersub
Accept: application/simple-message-summary
Allow-Events: presence, message-summary, refer
User-Agent: FRITZ!AppFon/2460 sip/2.8
Authorization: <redacted>
Content-Length: 0


IP 10.5.1.11.5060 > 10.5.1.51.59741: UDP, length 413
E.......@...
...
..3...]....SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.5.1.51:63346;rport=59741;branch=z9hG4bKPj2Sp4DhU52t-cksw9Amk4JMBgIdzmrG.N
From: <sip:[email protected]>;tag=FI3m7cFpVlduMY0SDxyL4uNMhFDrxeZ3
To: <sip:[email protected]>;tag=EDB7DB8D63E63FB4
Call-ID: I8QKBFAzYIvNuN8PKQFUmx6DZoZlgz7E
CSeq: 26408 SUBSCRIBE
Expires: 3600
User-Agent: AVM FRITZ!Box 7490 113.07.12 (Jul  3 2019)
Content-Length: 0


IP 10.5.1.11.5060 > 192.168.1.101.63346: UDP, length 627
E.......@...
......e...r.{.nNOTIFY sip:[email protected]:63346;ob SIP/2.0
Via: SIP/2.0/UDP 10.5.1.11:5060;branch=z9hG4bK38EBE33FB3E47D6E
From: <sip:[email protected]>;tag=EDB7DB8D63E63FB4
To: <sip:[email protected]>;tag=FI3m7cFpVlduMY0SDxyL4uNMhFDrxeZ3
Call-ID: I8QKBFAzYIvNuN8PKQFUmx6DZoZlgz7E
CSeq: 26409 NOTIFY
Contact: <sip:[email protected]>
Event: message-summary
Subscription-State: active;expires=3600
Max-Forwards: 70
User-Agent: AVM FRITZ!Box 7490 113.07.12 (Jul  3 2019)
Content-Type: application/simple-message-summary
Content-Length:    22

Messages-Waiting: no
INVITE tcpdump
IP 10.5.1.11.5060 > 192.168.1.101.64053: UDP, length 1191
[email protected]
......e...5....INVITE sip:[email protected]:64053;ob SIP/2.0
Via: SIP/2.0/UDP 10.5.1.11:5060;branch=z9hG4bK44DCAD7B042159A1
From: "Julian Neureuther" <sip:[email protected]>;tag=2E72CAD7107ABBB3
To: <sip:[email protected]:64053;ob>
Call-ID: [email protected]
CSeq: 8 INVITE
Contact: <sip:[email protected]>
Max-Forwards: 70
P-Called-Party-ID: <sip:[email protected]>
Expires: 120
Session-Expires: 600;refresher=uac
Min-SE: 90
User-Agent: AVM FRITZ!Box 7490 113.07.12 (Jul  3 2019)
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:   351

v=0
o=user 9358401 9358401 IN IP4 10.5.1.11
s=call
c=IN IP4 10.5.1.11
t=0 0
m=audio 7082 RTP/AVP 8 0 2 102 100 99 97 101
a=sendrecv
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:97 iLBC/8000
a=fmtp:97 mode=30
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=rtcp:7083

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.