From 2f3551e643bd15bc5b37e939c4a590459d6bc734 Mon Sep 17 00:00:00 2001 From: Sukru Senli Date: Wed, 21 Aug 2019 10:07:19 +0200 Subject: [PATCH] voice-client: firewall.sip: do not hardcode rtp ports --- voice-client/files/etc/firewall.sip | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/voice-client/files/etc/firewall.sip b/voice-client/files/etc/firewall.sip index f09f7b642..5715b4b2c 100644 --- a/voice-client/files/etc/firewall.sip +++ b/voice-client/files/etc/firewall.sip @@ -1 +1,6 @@ -iptables -I zone_wan_input 4 -m udp -p udp --dport 10000:20000 -m comment --comment "!fw3: Allow-RTP" -j ACCEPT +rtpstart=$(uci -q get voice_client.SIP.rtpstart) +rtpstart=${rtpstart:-10000} +rtpend=$(uci -q get voice_client.SIP.rtpend) +rtpend=${rtpend:-20000} + +iptables -I zone_wan_input -m udp -p udp --dport $rtpstart:$rtpend -m comment --comment "!fw3: Allow-RTP" -j ACCEPT