Hi,
If you are looking for a simple packaged solution that already
incorporates a database table, then the `alias_db` module is your best bet:
https://kamailio.org/docs/modules/5.3.x/modules/alias_db.html
The number can be translated to a SIP Request URI domain via
alias_db_lookup(), and that domain will of course be consumed when you
forward the request, absent other next-hop overrides.
If alias_db_lookup() returns false, then you can fall back to a
dispatcher election.
The major downside of this approach is that if your intent is to divert
only a small amount of numbers out of your load balancer, this, as all
other database-bound approaches, incurs an unnecessary database lookup
for every single call. However, this is not a significant factor in most
cases. It deserves some attention for very high CPS (Calls Per Second)
operators, though.
-- Alex
On 7/23/20 9:01 AM, Christoph Russow wrote:
Hi all,
im fairly new to Kamailio and currently setting up our new sip-server
systems so, hello everyone!
right now i have a Kamailio SBC which routes all calls using the
dispatcher module to our internally setup application servers (freeswitch).
i just got the idea that we might want specific routing based on
destination phone number in addition to simple loadbalancing.
can anyone point me in the right direction where i should look for
something i can place before the dispatcher routing to route calls based
on some entries in a database like destination number XYZ goes to server
A, number ABC goes to server Z and so on.
Or is there a way to select the dispatcher group id from the database
based on destination number?
best regards
Christoph
_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users(a)lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
--
Alex Balashov | Principal | Evariste Systems LLC
Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
Web:
http://www.evaristesys.com/,
http://www.csrpswitch.com/