Pjsip over ipv6 tunnel not ringing

Hello,
I configured a small FreePBX system on my Raspberry pi 4 (raspbx). It works fine, but I want to use my softphones outside of my network too (from the internet). Due to DS Lite, I don’t have an IPv4 address. Therefore I configured IPv6 for pjsip and opened the 5060 port on my router. But when I am connected to the mobile internet my device has no IPv6 and because IPv4 and IPv6 are not compatible I cannot reach my SIP. I searched the Internet for the solution and I found one: IPv4 to IPv6 tunnel with socat. I bought a small server and configured the tunnel. After some try and error my Softphone registered successfully over my servers IPv4 to the PBX.

I can make calls to the system, but the softphones do not ring if I call them. Does anybody have an idea?

My tunnel: socat UDP4-LISTEN:5060,fork,su=nobody UDP6:[…]:5060
My IPv6 configuration (pjsip.transport_customs):
[ipv6-udp]
type=transport
protocol=udp
bind=[::]:5060
allow_reload=no
tos=cs3
cos=3

I don’t know how SIP works, but maybe FreePBX registers the server as the requesting device (instead of the softphone, because the traffic goes through the server) and trys to communicate back when calling the extension.

I would appreciate some help. Jonas

is pjsip setup on 5060 on your freepbx server? Dependng on the version, the default can sometimes be chan_sip = 5060.

We could guess until we get it right, but your logs would most likely shed light on what is occurring.
https://wiki.freepbx.org/display/SUP/Providing+Great+Debug

Thanks for you answer. I checked the logs and I think my thesis is right.

When I register the extension:
res_pjsip/pjsip_options.c: Contact 101/sip:101@[2001:8d8:1801:835b::1]:43458 is now Reachable. RTT: 45.626 msec

And when I try to call the extension:
app_dial.c: Called PJSIP/101/sip:101@[2001:8d8:1801:835b::1]:43458

The IP “2001:8d8:1801:835b::1” is the IP of my Tunnel Server. After thinking a bit it is quiet logical, because the traffic passes through the Tunnel and the Tunnel is making the request to FreePBX. Is is possible to pass through the IP of the my softphone to the server (as to be IPv4) ?

Maybe there is also an other way to do it. Maybe OpenVPN makes to job, but I cant find good tutorials / explanations. What do you think ?

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.