[OpenSIPS-Users] Standalone OpenSIPS LCR Server

Dārayavahush Khola da.khola at gmail.com
Fri May 10 20:04:13 CEST 2013


Hello Bogdan,

Thank you for taking the time out of your busy schedule. Reflecting on
what you've been trying to explain the whole time:

>>So, what your script has to do is to arrange the gateways (for a prefix) in an
>> order that reflects the cost.

What would be the safest bet in terms of interoperability and invoking
our script from within OpenSIPS? Or do you really emphasize doing the
data pre-processing before starting the OpenSIPS session. I think that
is what you meant when stating how runtime processing should be
avoided. Would it be considered too resourceful?

If we insist on runtime processing to avoid the downtime of having to
restart our proxy and sacrificing realtime, would our C++ or Java
class be invoked using the exec module?

>> Once you have the list of gws (for each prefix), DR module will do the
>> routing and failover by itself.

For the sake of learning by example, I am guessing that the only
tables that are of interest are dr_rules, and dr_gateways?

dr_gateways;
+----+------+------+----------------------+-----+------------+-------+------------+------------+
| id | gwid | type | address              |strip| pri_prefix | attrs |
probe_mode | description|
+----+------+------+---------------------------+-------+------------+-------+------------+-----+
|  1 | 1    |    2 | sbc1.itrunk.com:5060 |   0 | 100002     | yes   |
         1 | Trunk One  |
|  2 | 2    |    2 | sbc2.itrunk.com:5060 |   0 | 200231     | yes   |
         1 | Trunk Two  |
+----+------+------+---------------------------+-------+------------+-------+------------+-----+
dr_rules;
+--------+---------+--------+---------+----------+---------+--------+-------+-----------------------+
| ruleid | groupid | prefix | timerec | priority | routeid | gwlist |
attrs | description|
+--------+---------+--------+---------+----------+---------+--------+-------+-----------------------+
|     1   | 1          |44     |              |        1  | 0
| 1,2    | yes   | UK Termination  |
+--------+---------+--------+---------+----------+---------+--------+-------+-----------------------+


So what our script would have to do is order the routes based on price
for a given prefix,
and modify dr_rules.gwlist to reflect the order? Again with runtime
invocation, sorry! :(, does
OpenSIPS cache DB info when loaded, or can this be done during runtime?

Kind Regards,

Dārayavahush



More information about the Users mailing list