Igor, have you tried using the Asterisk CLI to watch the connection being made? Obviously, something is not allowing your packets to flow in and out. My first guess is the port forwarding but I’d start by checking the Asterisk CLI for clues.
Since your connection is External SIP ? there are several things that may be causing loss of audio.
But the first may be the firewall.
Using cell input, you have a different IP than your local network.
Also, your sip config may not be properly NATed as well.
I bet you are running into the problem where either the RTp source or destination address is incorrect. It’s been a long time since I’ve played with SIP, but I remember, several times, dealing with a thing where the PBX was sending packets from what appeared to be a local address rather than the public IP. This would result in a connection being established, but either no audio at all, or only audio in one direction.
Unfortunately, I’m not up on that stuff anymore, and things have changed in 20 years.
I think if you google a bit on it, you will find an answer path to follow.
More common issue with asterisk than you might think.
Not a app_rpt/ASL issue. Sip-NAT/Firewall
Mike you are right there are a lot of topic, but i don’t know which one to follow.
I would like if somebody could write here directly what i should change and how.
I’m assuming that what you mean by “VoIP Phone” is you’re using chan_pjsip to bring in SIP-connected devices and/or softphones and creating them as extensions that work with app_rpt.
Since you’re not seeing errors and it works on your own network, then the issue is your firewall and not Asterisk. Make sure that your firewall supports SIP-based communications in that it has a tracking or helper module for it. The SIP protocol is only a signalling protocol used (commonly) on UDP/5060 for metadata about extensions and calls. However the SIP protocol does not itself carry the audio or video for a SIP-initiated connection. The SIP protocol hands off to a RTP-based connection for the actual two-way audio to flow. Since your firewall is the “server” side of the firewall, it needs configuration (usually via some sort of module or “helper”) to know the related dynamic port that will be used for RTP based on the SIP protocol data. If your firewall can’t do this, you’re going to have a very challenging time with an external SIP connection into your Asterisk server.
I’m not expert but i try to show you what i have done, in order to give you a more complete context.
I disactivated the firewall and used dmz on my modem and the situation doesn’t change.
I tried to use the same phone in an other location where they usually use “voip” (where i suppose their modem has been configured for that) but nothing changed.
Inside my lan i used as ip server my ddns in order to check if i could go out and then come back and, with this configuration, problem.
As Mike suggested, i surfed on internet and it seems the issue is quite common, but i don’t know which suggestion follow.
I forwarded, moreover, port tcp/udp from 10000:20000 to 10000:20000 to my local server (i checked in sip.conf the port range).
Moreover, with the “normal” configuration i wasn’t able to use my phone, but thanks to @tsalzer who gave me the trick to change the “official” configuration, it worked. This is why i was guessing if i should change something else. I don’t know if i have to configure some NAT parameter on allstarlink
At this point – and if it was me! – I’d probably try using Tailscale or ZeroTier to try to get through the firewall from the outside. I have not tried this. You’d have to change the IP address of the node to the Tailscale or ZeroTier address. I think the phone’s IP address would stay the same.