itsbc
itsbc copied to clipboard
Network validation bugged since in-script-route implementation
Latest changes (prior to Github, our Gitlab) makes IP validation breaks in sequential rule validation. Just prior to fly to the open we have moved IP/Net validation from the SQL Query (it's already very ugly) to a custom route (witch is working, it really works). But the problem is we just get one route and we don't loop each one to validate network ...
We need to think better, then implement less ;)
My 2 cents:
Routing criterias:
- Domain
- Incoming IP
- Incoming port
- Incoming protocol
Those 4 and metric should conform a database unique.
OpenSIPS logic should perform a search with those 4 criterias, order then by metric, and evaluate Origin network until one matches.
When one matches, it should send the request to next hop (or to registrar server) using the outgoing interface defined in the rule.
Steps:
- Make domain, incoming ip, incoming port, incoming transport and metric a database unique.
- Rewrite opensips script to iterate through rules until one fulfills origin network filter.