The names in the carrierroute are a little  bit confusing ...
With lcr, you route based on 'priority'.
With carierroute, you have several alternatives (take a look at
cr_route 
http://www.kamailio.org/docs/modules/1.5.x/carrierroute.html#id2467823):
 - route inside the same 'carrier' based on 'domain' (use 'domain' as
you would use the 'priority' inside lcr),
 - route inside the same 'domain' based on 'carrier' (use 'carrier' as
you would use the 'priority' inside lcr).
With lcr, the list of GWs is done automatically, with carierroute, you
need to do it manually (by setting the right fields inside the
cr_route method).

Regards,
Ovidiu Sas

On Thu, Apr 9, 2009 at 8:09 PM, Jinsong Hu <jinsong...@hotmail.com> wrote:
> by handling price, we mean that if there are 2 routes that match the same
> scan_prefix, we choose the lower priced route.
>
> in carrierroute table:
> mysql> desc carrierroute;
> +----------------+------------------+------+-----+---------+----------------+
> | Field          | Type             | Null | Key | Default | Extra |
> +----------------+------------------+------+-----+---------+----------------+
> | id             | int(10) unsigned | NO   | PRI | NULL    | auto_increment
> |
> | carrier        | int(10) unsigned | NO   |     | 0       | |
> | domain         | int(10) unsigned | NO   |     | 0       | |
> | scan_prefix    | varchar(64)      | NO   |     |         | |
> | flags          | int(11) unsigned | NO   |     | 0       | |
> | mask           | int(11) unsigned | NO   |     | 0       | |
> | prob           | float            | NO   |     | 0       | |
> | strip          | int(11) unsigned | NO   |     | 0       | |
> | rewrite_host   | varchar(128)     | NO   |     |         | |
> | rewrite_prefix | varchar(64)      | NO   |     |         | |
> | rewrite_suffix | varchar(64)      | NO   |     |         | |
> | description    | varchar(255)     | YES  |     | NULL    | |
> +----------------+------------------+------+-----+---------+----------------+
>
> we only have prob to control which route to pick up.  there is no place to
> store the price,
> so how can we handle route based on price ?
>
> the only way I can think of is to create another temp table, store the route
> and price there,
> and then select the lower priced ones and insert into carrierroute table. as
> price changes,
> we have to repeat this process again.
>
> is there any other better way ?
>
> Jimmy.
>
>
>
> ----- Original Message ----- From: "Ovidiu Sas" <o...@voipembedded.com>
> To: "Jinsong Hu" <jinsong...@hotmail.com>
> Cc: <gomespere...@startel.pt>; <users@lists.kamailio.org>
> Sent: Thursday, April 09, 2009 4:26 PM
> Subject: Re: [Kamailio-Users] carrier route vs LCR
>
>
>> Both lcr and carrierroute can hadle routing based on price.  It's just
>> a matter of properly defining the routed.
>> lcr is easier to approach then carrierroute.  In 1.5 both of them are
>> able to cope with large number of routes.
>>
>> Regards,
>> Ovidiu Sas
>>
>> On Thu, Apr 9, 2009 at 6:15 PM, Jinsong Hu <jinsong...@hotmail.com> wrote:
>>>
>>> I have been looking at the carrier route and LCR. it appears to me that
>>> LCR
>>> can be used to handle tariff , i.e,
>>> selecting lowest cost route. while carrier route doesn't have this
>>> capability at all. but carrier route , according to LCR, scales better
>>> than
>>> LCR.
>>>
>>> for a typical telco, the rate sheet is around 5K to 20K records. it
>>> appears
>>> both LCR and carrier route can handle it.
>>>
>>> is the above assessment correct ?
>>>
>>> Jinsong
>>
>
>

_______________________________________________
Kamailio (OpenSER) - Users mailing list
Users@lists.kamailio.org
http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
http://lists.openser-project.org/cgi-bin/mailman/listinfo/users

Reply via email to