Hi,
I'd like to build an LCR solution that routes on both CLI & destination e.g.
CLI matches ^+49*, destinations matches ^+44* => route to gateway 5
for a large rule set (~ tens of thousands). Any recommendations for which modules to use? Can kamailio perform this particular task well or should I look at another solution? I'd be very grateful to hear about any experience of doing this. Many Thanks.
Regards, John
SQLOPS would work. The difficulty is in writing your rules in your query. Implementing the query and getting results in Kamailio is trivial if that's done. If your rules are strictly based on matching prefixes (which is pretty common in telephony) and you're using postgres, the prefix opclass is pretty helpful in making the queries more efficient:
https://github.com/dimitri/prefix
Kaufman
From: John Cahill John.Cahill@Firstcomeurope.co.uk Sent: Thursday, April 13, 2023 4:57 AM To: sr-users@lists.kamailio.org Subject: [SR-Users] CLI & destination based LCR
CAUTION: This email originated from outside the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
Hi,
I'd like to build an LCR solution that routes on both CLI & destination e.g.
CLI matches ^+49*, destinations matches ^+44* => route to gateway 5
for a large rule set (~ tens of thousands). Any recommendations for which modules to use? Can kamailio perform this particular task well or should I look at another solution? I'd be very grateful to hear about any experience of doing this. Many Thanks.
Regards, John
Hi,
Thanks to all for the helpful suggestions.
Regards, John ________________________________ From: Kaufman bkaufman@bcmone.com Sent: 13 April 2023 14:28 To: Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org Subject: [SR-Users] Re: CLI & destination based LCR
CAUTION: This email originated from outside your organization. Exercise caution when opening attachments or clicking links, especially from unknown senders.
SQLOPS would work. The difficulty is in writing your rules in your query. Implementing the query and getting results in Kamailio is trivial if that’s done. If your rules are strictly based on matching prefixes (which is pretty common in telephony) and you’re using postgres, the prefix opclass is pretty helpful in making the queries more efficient:
https://github.com/dimitri/prefix
Kaufman
From: John Cahill John.Cahill@Firstcomeurope.co.uk Sent: Thursday, April 13, 2023 4:57 AM To: sr-users@lists.kamailio.org Subject: [SR-Users] CLI & destination based LCR
CAUTION: This email originated from outside the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
Hi,
I'd like to build an LCR solution that routes on both CLI & destination e.g.
CLI matches ^+49*, destinations matches ^+44* => route to gateway 5
for a large rule set (~ tens of thousands). Any recommendations for which modules to use? Can kamailio perform this particular task well or should I look at another solution? I'd be very grateful to hear about any experience of doing this. Many Thanks.
Regards,
John
John Cahill writes:
I'd like to build an LCR solution that routes on both CLI & destination e.g.
CLI matches ^+49*, destinations matches ^+44* => route to gateway 5
for a large rule set (~ tens of thousands). Any recommendations for which modules to use?
Check if LCR module scales for our use case. It does support your routing requirement:
A gateway matches a request if user part of Request-URI matches "prefix", caller URI matches "from_uri" pattern, caller URI userpart matches mtree with "mt_value", and callee URI matches "request_uri" pattern in a tuple that is associated with the gateway.
-- Juha
Hi,
I am still using the PDB Daemon with Carrierroute (initially developed by and for 1&1) for that purpose:
https://kamailio.org/docs/modules/devel/modules/pdb.html https://github.com/kamailio/kamailio/tree/master/utils/pdbt
It is not exactly your use case, but it allows you to match numbers to a carrier, which then can be used for routing (e.g., have a different routing tree for numbers from one carrier, another routing tree for numbers from another carrier, and a default routing tree for all others).
Works like a charm.
Thanks, Carsten
-- Carsten Bock I CTO & Founder
ng-voice GmbH
Trostbrücke 1 I 20457 Hamburg I Germany T +49 179 2021244 I www.ng-voice.com
Registry Office at Local Court Hamburg, HRB 120189 Managing Directors: Dr. David Bachmann, Carsten Bock, Quirin Maderspacher
Am Do., 13. Apr. 2023 um 15:48 Uhr schrieb Juha Heinanen jh@tutpro.com:
John Cahill writes:
I'd like to build an LCR solution that routes on both CLI & destination
e.g.
CLI matches ^+49*, destinations matches ^+44* => route to gateway 5
for a large rule set (~ tens of thousands). Any recommendations for which modules to use?
Check if LCR module scales for our use case. It does support your routing requirement:
A gateway matches a request if user part of Request-URI matches "prefix", caller URI matches "from_uri" pattern, caller URI userpart matches mtree with "mt_value", and callee URI matches "request_uri" pattern in a tuple that is associated with the gateway.
-- Juha __________________________________________________________ Kamailio - Users Mailing List - Non Commercial Discussions To unsubscribe send an email to sr-users-leave@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe:
Hi John,
have also a look to the carrierroute module, it was written in particular for really large route-sets (like a million entries), support user specific routing and specific failure routing as well.
Cheers,
Henning
-- Henning Westerholt - https://skalatan.de/blog/ Kamailio services - https://gilawa.comhttps://gilawa.com/
From: John Cahill John.Cahill@Firstcomeurope.co.uk Sent: Donnerstag, 13. April 2023 11:57 To: sr-users@lists.kamailio.org Subject: [SR-Users] CLI & destination based LCR
Hi,
I'd like to build an LCR solution that routes on both CLI & destination e.g.
CLI matches ^+49*, destinations matches ^+44* => route to gateway 5
for a large rule set (~ tens of thousands). Any recommendations for which modules to use? Can kamailio perform this particular task well or should I look at another solution? I'd be very grateful to hear about any experience of doing this. Many Thanks.
Regards, John