select * from address order by mask;
+----+-----+---------------+------+------+----------+
| id | grp | ip_addr | mask | port | tag |
+----+-----+---------------+------+------+----------+
| 20 | 1 | 123.17.0.0 | 23 | 5061 | Testing |
| 22 | 1 | 123.17.0.0 | 23 | 5062 | Testing |
| 23 | 1 | 123.17.0.0 | 23 | 5063 | Testing |
| 24 | 1 | 123.17.0.0 | 23 | 5064 | Testing |
| 1 | 1 | 123.17.0.0 | 23 | 5060 | |
| 4 | 1 | 20.5.176.0 | 24 | 5060 | |
| 21 | 1 | 123.17.1.235 | 32 | 5060 | Override |
| 46 | 2 | 123.17.29.201 | 32 | 5060 | customer |
+----+-----+---------------+------+------+----------+