I have a service entry like this on my voip box.
The UDPPort or UDPPorts entry will get generated into masq firewall rules
freepbx=service
AllowHosts=some.ip.adresses
UDPPorts=5060,4569,10000:20000
Someotherkeys=otherstuff
access=public
status=enabled
Eg something like this should do it.
config set voipservice service UDPPorts 50506,4569,10000:20000 AllowHosts 1.2.3.4 access public status enabled
signal-event remoreaccess-update
Search the wiki page for UDPPort for more info.
(Not bad doing this on my mobile phone on holiday using a vpn to the voip box to check the config !!!!)