Extension trough tunnel without audio

hello!

I´m using Freepbx for almost two weeks now and everything works fine when using at the local LAN.
I´m trying to setup an extension to our new store, and I´m using a tunnel to make the connection.

The softphone (microsip) connects to freepbx, but without audio. I can call extensions and outside numbers, but the result is always the same, no audio for both sides.

Going trough the logs, I found this difference between the connections:

[2024-05-15 18:13:47] WARNING[25933] res_pjsip_pubsub.c: No registered publish handler for event presence from 122

The test:
First, I connected the extension on the same LAN but trough the tunnel, and everything works.

[2024-05-15 18:16:45] VERBOSE[20599] res_pjsip/pjsip_configuration.c: Endpoint 122 is now Reachable
[2024-05-15 18:16:45] VERBOSE[20599] res_pjsip/pjsip_options.c: Contact 122/sip:[email protected]:62032;ob is now Reachable. RTT: 2.679 msec

Second, using my mobile data plan, I connect outside the LAN, trough the Tunnel and the same extension show this warning.

46388 [2024-05-15 18:13:47] VERBOSE[20599] res_pjsip/pjsip_configuration.c: Endpoint 122 is now Reachable
46389 [2024-05-15 18:13:47] VERBOSE[20599] res_pjsip/pjsip_options.c: Contact 122/sip:[email protected]:49140;transport=udp is now Reachable. RTT: 114.954 msec
46390 [2024-05-15 18:13:47] WARNING[25933] res_pjsip_pubsub.c: No registered publish handler for event presence from 122

What am I missing?!
I already tried so many things and still it doesn´t work!

Any help is very much appreciated!

Did you added the subnet of the VPN to the NAT settings as a local network (Settings > Asterisk SIP Settings > Local Networks)?

Thank you for your reply!

I’m using localto.net p2p tunnel, and the only thing it shows me is the address and port to connect.
Connecting to this address (br2.localto.net:XXXX) and running the server in the same machine as the Freepbx, the tunnel works fine, but I don’t have any information of IP and subnet from this tunneling.
I tried adding this address to the Local Networks area, but didn’t work.

I also bought and tried to make it work, the native VPN server buil it Freepbx, but had no success.
This is still an option.

EDIT: I don’t have a fixed public IP.

When you connect to your VPN your device will get a local IP address from your VPN server. Take a look at your VPN server settings. You can also check the local IP address of your device when connected to the VPN server.