[OpenSIPS-Users] Dynamic Routing Module

Bogdan-Andrei Iancu bogdan at voice-system.ro
Tue Oct 20 05:17:02 CEST 2009


Hi Indiver,

looking at the logs I can say your script is not right - the call does 
not hit do_routing() in the script, but rather goes to 
lookup(location)....This is why you do get a 404.

So, try to place xlog() in the script and see what is the path the 
execution takes through your script -> be sure you have the call going 
to the do_routing().

Regards,
Bogdan

Indiver wrote:
> Hi Bodgan,
> Sorry for the mistake. I meant that in the above when i dialed the local
> number 1005 not the 1000
>
> Bogdan-Andrei Iancu wrote:
>   
>> Hi Indiver,
>>
>> what exactly is not working?
>>
>> Can you post the output logs (during INVITE) with debug=6 ? Post also 
>> the incoming INVITE request.
>>
>> Regards,
>> Bogdan
>>
>>
>> Indiver wrote:
>>     
>>> 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?
>>>
>>>   
>>>       
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>>     
>
>   




More information about the Users mailing list