Permit and deny in iax trunks

I want to restrict an iax trunk using deny=0.0.0.0/0.0.0.0 followed by permit=address/range but I have a problem. When I submit the trunk configuration FreePBX changes the order of the directives. Even more confusing, the order of the directives shown in the trunk configuration page is the reverse of that written to iax_additional.conf so while it appears that the deny is before the permit when looking at the trunk config page, in the actual file the permit comes before the deny, so all access is blocked. Putting the permit before the deny on the config page is no help because it is reordered on submit.

Is this a bug or am I doing something wrong? I found this while using 2.3 beta with online updates on Friday, but 2.2.2 seems to have the same behaviour. Both are on trixbox 2.2.

does the order matter for asterisk? I haven’t looked at this in a while. Can you change the order in the iax_additional.conf file? If the correct order fixes your issue then please by all means report a bug to the tracker.