Hello,

 

usually this kind of routing is done by using the dispatcher module. If you need to match on a certain key of the SIP message, there are other possibilities, like the lcr module for example. It supports regular expression match from a database, that can be reloaded without Kamailio restart.

 

Cheers,

 

Henning

 

From: harneet singh <hbilling@gmail.com>
Sent: Donnerstag, 20. April 2023 14:48
To: Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org>
Subject: [SR-Users] Configuring dynamic Destination identification for Kamailio Routing

 


Hi Experts,

 

We have been using Kamailio as a sip proxy for a fair bit of time now(version 5.3.2 though) and do understand the native routing mechanism that can be instrumented through the kamailio cfg scripts.

We initially had only two sides, where the traffic could come from into Kamailio and it just passed through to the other side(ie Traffic from A was routed to B and that from B was routed to A). Off late, a few more sip elements have been introduced in the deployment and now there is a need for a more formal/robust mechanism to select the intended destination to forward an initial SIP INVITE to.

 

I believe that we could still keep all the logic in the native kamailio script and do the routing(for example, an incoming call where the From URI contains sip.elementA.com should be routed to destination sip.elementB.com, where as if the To URI contains sip.elementC.com, the request should be routed to sip.elementC.com). Since we have many sip elements like A,B.C,D,E etc where the requests might have to be routed to, based on certain different criteria, this logic would become cumbersome. What would be the best way to accommodate this? 

 

Would it be possible to rewire this routing logic at runtime(like in some csv file that can be reloaded) without a Kamailio restart? 

 

Regards,

Harneet Singh

 

--

"Once you eliminate the impossible, whatever remains, no matter how improbable, must be the truth" - Sir Arthur Conan Doyle