itsbc icon indicating copy to clipboard operation
itsbc copied to clipboard

Network validation bugged since in-script-route implementation

Open zetagor opened this issue 6 years ago • 1 comments

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 ;)

zetagor avatar May 01 '18 14:05 zetagor

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:

  1. Make domain, incoming ip, incoming port, incoming transport and metric a database unique.
  2. Rewrite opensips script to iterate through rules until one fulfills origin network filter.

cruzccl avatar May 29 '18 15:05 cruzccl