[SR-Users] how to achive destination number based routing before falling back to dispatcher-module

Christoph Russow russow at emtex.de
Thu Jul 23 15:30:02 CEST 2020


Hi,

wow that was fast. thank you it seems to be exactly what i was looking for.

it was just an idea of what might come so right now i won't implement it 
but maybe need to in the future.

also what comes to mind it might help with the migration from the old 
systems. i could just dump all numbers in the lookup table and rout all 
calls to the old systems and then just remove number by number as we 
migrate them to the new systems.

thank you again for the fast answer!

best regards
Christoph

Am 23.07.20 um 15:08 schrieb Alex Balashov:
> 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 at lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
> 



More information about the sr-users mailing list