[OpenSIPS-Users] Dynamic Routing Module

Indiver nehru.indu at gmail.com
Mon Oct 19 11:44:52 CEST 2009


Hi Every body,

I want to implement prefix based dynamic routing. I followed the following
procedure.

step 1: Enetered gateways, gateway lists, rules,groups in opensips-cp as
follows

dr_gateways table:
+------+------+----------------+-------+------------+-------+-------------+
| gwid | type | address        | strip | pri_prefix | attrs | description |
+------+------+----------------+-------+------------+-------+-------------+
|    1 |    0 | 192.168.3.200  |     0 | 1          | NULL  | Gateway 1   |

dr_groups table:
id | username | domain       | groupid | description     |
+----+----------+--------------+---------+-----------------+
|  1 | 1004     | 192.168.3.36 | 0       | opensips server | 

dr_gw_lists
 id | gwlist | description    |
+----+--------+----------------+
|  1 | 1      | Gateway List 1 | 

dr_gw_rules

 ruleid | groupid | prefix | timerec | priority | routeid | gwlist |
description |
+--------+---------+--------+---------+----------+---------+--------+-------------+
|      1 | 0       | 1      |         |        1 |       4 | 1      | Rule 1     
| 

step 2: My opensips.cfg file is as follows

loadmodule "drouting.so"

# ----- Dynamic Routing params -----
modparam("drouting",
"db_url","mysql://opensips:opensipsrw@localhost/opensips")

route[4] {
    # routing to the public network
    if(!do_routing()){
        sl_send_reply("404","PSTN Routing not found");
        exit;
      }

    route(1);
    exit;

But still prefix based drouting is not working. Can any one suggest the 
changes to be made?

-- 
View this message in context: http://n2.nabble.com/Dynamic-Routing-Module-tp3848089p3848089.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.



More information about the Users mailing list