I am preparing to add a new upstream SIP provider to my network, and now have a requirement to route based on the number that the user is calling. From what I have read it appears that LCR is the better method for doing this. I have one small issue in that I have a few customers who switch through my network in order to get to a specific carrier. Currently I am using carrierroute with all of my customers in order to support the ones that need to switch to specific carriers, and everyone else takes the default carrierroute.
Can carrierroute and LCR be used together? If so can you give me a few pointers so that I can get a lab system working. If not can you suggest whether or not carrierroute could or should be used to route based on rate center. The rate center list from my new carrier is about 31,000 rows. If carrier route cannot or should not be used for this purpose, can you recommend a way that LCR can be used, and still have a few customers switch out to a specific carrier regardless of the number dialed?
Thank You Stagg Shelton
On Tuesday 14 April 2009, Stagg Shelton wrote:
I am preparing to add a new upstream SIP provider to my network, and now have a requirement to route based on the number that the user is calling. From what I have read it appears that LCR is the better method for doing this.
Hi Stagg,
lcr is probably easier to setup for such a scenario. But cr supports least-cost routing of course also just fine.
I have one small issue in that I have a few customers who switch through my network in order to get to a specific carrier. Currently I am using carrierroute with all of my customers in order to support the ones that need to switch to specific carriers, and everyone else takes the default carrierroute.
Can carrierroute and LCR be used together?
I think you should be able to combine cr with any other module. It just rewrites the request URI of the message, it doesn't do anything special. But you should evaluate if its really better (in the long run) to use two routing modules with a different logic and deployement requirements, then to use only one which perhaps fits not 100% to your needs.
If so can you give me a few pointers so that I can get a lab system working.
You could for example just use the group module to check your users against a table if you choose the cr or the lcr path in your config.
if (is_user_in("lcr")) { # do lcr route } else { cr_route(..) } t_relay();
If not can you suggest whether or not carrierroute could or should be used to route based on rate center. The rate center list from my new carrier is about 31,000 rows.
Both lcr and cr should be work just fine with this number of routing rules.
Cheers,
Henning
Stagg Shelton writes:
Can carrierroute and LCR be used together? If so can you give me a few pointers so that I can get a lab system working. If not can you suggest whether or not carrierroute could or should be used to route based on rate center. The rate center list from my new carrier is about 31,000 rows. If carrier route cannot or should not be used for this purpose, can you recommend a way that LCR can be used, and still have a few customers switch out to a specific carrier regardless of the number dialed?
i don't know about using carrierroute and lcr together, but in lcr
A gateway matches a request if user part of Request URI matches a prefix and caller's URI matches a from pattern in a tuple that belongs to the group of the gateway.
so it should be possible to achieve what you want by using an empty prefix and a from uri (or from uris) that matches those of your few customers that you want to route to a specific carrier.
-- juha