>I am using this module in production with more then 400k routes loaded
>for 8 different providers and it is working like a charm.
>As Henning mentioned, the interface is a little bit cumbersome but usable.
>You can put all the carriers under the same table and prioritize the
>gateway based on domains.  Like tis you don't need to hardcode
>anything in the config file.
>
>Carrierroute was designed to deal with a big amount of routing rules
>and it is doing an amazing job.
>LCR was designed to deal with a limited number of routes/gateways but
>it has a different level of flexibility and a more mature interface.
>
>Carrierroute is a brand new module and for sure it will improve in
>flexibility as times go by (just like the lcr did along releases).


Ovidiu (or anyone else....)

I think I may almost have it..... If I treat all routes as being in the same carrier, I can just use cr_rewrite_uri("1","call_id"), and then cr_rewrite_uri("2","call_id") in failure_route[1] and cr_rewrite_uri("2","call_id") in failure_route[2], correct? I tested this and it seems to work. I guess it's up to me then to populate the rewrite_host column with a gateway belonging to the cheapest carrier for domain 1, the a gateway from the next cheapest carrier for domain 2 and so on. Still sound right?

Here's where it gets a bit tricky. We have OpenSER running in 6 different locations. The gateways we use will differ for each location (we always want to use the closest gateway belonging to a carrier). So, I figured I could use the 'user' functionality in carrierroute to do this. I could simply put the domain (IP address) in the domain column, leave the user blank (we don't have users... calls are forwarded from asterisk), and then associate a carrier in the cr_preferred_carrier column. You can see all that in my subscriber table below.

Doesn't seem to work though. When routing a call, OpenSER complains that it can't find a default carrier, and then because it seems not to match the incoming call against an entry in the subscriber table, it can't find a carrier to use, and fails the call.

So... how would I be able to use the source IP address of the asterisk box that sends the calls to OpenSER in the subscriber table so that I could have different routing entries for each OpenSER system???

Here's my db tables...


mysql> select * from route_tree;
+----+-----------+
| id | carrier   |
+----+-----------+
|  1 | Hong Kong |
|  0 | San Jose  |
+----+-----------+

mysql> select * from carrierroute order by carrier, scan_prefix, domain;
+----+---------+-------------+--------+------+-------+--------------+----------------+----------------+---------+
| id | carrier | scan_prefix | domain | prob | strip | rewrite_host | rewrite_prefix | rewrite_suffix | comment |
+----+---------+-------------+--------+------+-------+--------------+----------------+----------------+---------+
|  1 |       0 |             | 1      |    1 |     0 | 200.1.1.1    |                |                | NULL    |
|  4 |       0 |             | 2      |    1 |     0 | 200.1.1.2    |                |                | NULL    |
|  5 |       0 |             | 3      |    1 |     0 | 200.1.1.3    |                |                | NULL    |
|  9 |       1 |             | 1      |    1 |     0 | 100.1.1.1    |                |                | NULL    |
| 10 |       1 |             | 2      |    1 |     0 | 100.1.1.2    |                |                | NULL    |
| 11 |       1 |             | 3      |    1 |     0 | 100.1.1.3    |                |                | NULL    |
+----+---------+-------------+--------+------+-------+--------------+----------------+----------------+---------+

mysql> select id, username, domain, cr_preferred_carrier from subscriber;
+----+----------+----------------+----------------------+
| id | username | domain         | cr_preferred_carrier |
+----+----------+----------------+----------------------+
|  1 |          | 192.168.255.53 |                    0 |
|  2 |          | 192.168.255.54 |                    1 |
+----+----------+----------------+----------------------+






Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.