[asterisk-users] configure SRTP port range?

hw hw at gc-24.de
Sat Feb 23 08:14:20 CST 2019

On 2/23/19 2:39 PM, Social Boh wrote:
> *DIrect media with SRTP is not supported. All media when SRTP goes 
> through Asterisk.*
> So you have to open ports on your firewall and disable directmedia=yes 
> on your configuration.

directmedia is not explicitly enabled; I guess it's the default.

Joshua basically says there is no way to control which ports are being 
used for SRTP because that it is "up the endpoint".  Such endpoints, in 
this case, are mobile phones with software like csipsimple or gs-wave 
(or perhaps zoiper), and I see no way in these programs to define which 
ports to use for SRTP.

Since I have no way to define which ports endpoints use for SRTP, I 
would have to open all UDP ports in the firewall, and I don't want to do 

Nat is currently not involved yet.  I want to get this to work first and 
then look into nat issues.

> Only open a range of ports that you really use: for example is you have 
> maximum 10 simultaneous calls, open only 40 ports (4 ports for each 
> call, two for RTP and two for RTCP). Then change rtp.conf configuration 
> reflect the range of ports you using.

So how would I control which ports are being used for SRTP?  Some ports 
being open on the firewall doesn't mean the phones will automagically 
use them, does it?

> Other option is using another PBX/SWITCH that support SRTP flow direct 
> between endpoints.

Which one does that?  And does that work through foreign firewalls I 
have no control over and when NAT becomes involved?

More information about the asterisk-users mailing list