[OpenSIPS-Users] Regarding dynamic routing in opensips-1.11
Bogdan-Andrei Iancu
bogdan at opensips.org
Thu Sep 24 16:59:02 CEST 2015
Hi Sasmita,
The param for is_from_gw() is wrong -> you put "1" while in DB yu have
type "0"
Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 24.09.2015 15:07, Sasmita Panda wrote:
> Hi Andrei,
>
> I am wanted to do lookup in location table when a call comes from
> a gateway .
> What should I do for that ?
>
> I have added the gateway in the dr_gateways table like :
> +----+------+------+--------------------+-------+------------+-------+------------+-------+--------+-------------+
> | id | gwid | type | address | strip | pri_prefix |
> attrs | probe_mode | state | socket | description |
> +----+------+------+--------------------+-------+------------+-------+------------+-------+--------+-------------+
> | 1 | gw1 | 0 | 192.1.1.1:5506 <http://192.1.1.1:5506> | 0 |
> NULL | NULL | 0 | 0 | NULL | |
> +----+------+------+--------------------+-------+------------+-------+------------+-------+--------+-------------+
>
> And in my cfg i have written like bellow
> I have added the drouting module .
> loadmodule "drouting.so"
> ...............
> modparam("drrouting", "db_url", "mysql://root:root@localhost/opensips")
> modparam("drouting", "use_domain", 1)
> modparam("drouting", "drd_table", "dr_gateways")
> modparam("drouting", "drr_table", "dr_rules")
> modparam("drouting", "drg_table", "dr_groups")
> modparam("drouting", "drc_table", "dr_carriers")
>
>
> if( is_from_gw("1") || (to_uri=~"@192.1.1.161 <http://192.1.1.161>"))
> {
>
> xlog( "L_WARN", "Source IP sas : $Ri To Uri : $tu
> From : $fU Request URI: $oU Call ID:$ci" );
> # alias_db_lookup("dbaliases");
> if ( !lookup("location")){
> sl_send_reply("404","NO Match Found");
> # cache_store("redis:group1","method,$ci","$rm,$Ts");
> exit;
> }
> }
>
> When I am calling from 192.1.1.1:5506 <http://192.1.1.1:5506> , then
> call wont enter this loop .
>
> What is wrong in the configuration and please let me know if I
> need to do something else for this ?
>
>
> */Thanks & Regards/*
> /Sasmita Panda/
> /Network Testing and Software Engineer/
> /3CLogic , ph:07827611765/
>
> On Wed, Sep 23, 2015 at 7:15 PM, Bogdan-Andrei Iancu
> <bogdan at opensips.org <mailto:bogdan at opensips.org>> wrote:
>
> Sasmita,
>
> The dr_rules table contains the routing rules - please carefully
> read the module docs, as this is explained over there.
>
> A routing rule refers to gateway directly, or via a carrier. Using
> carriers is optional.
>
> Regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developer
> http://www.opensips-solutions.com
>
> On 23.09.2015 16:36, Sasmita Panda wrote:
>> HI Andrei ,
>>
>> Thank you for your reply . what ever you said , that is only for
>> the gateway .
>> What about the route table of lcr module ? I think I need to add
>> the route in dr_carrier table .
>> But in which format ? If I am wrong then what about the
>> dr_carrier and dr_group table do in dynamic routing module ?
>>
>> Can you please give me a brief knowledge?
>>
>> */Thanks & Regards/*
>> /Sasmita Panda/
>> /Network Testing and Software Engineer/
>> /3CLogic , ph:07827611765/
>>
>> On Wed, Sep 23, 2015 at 1:54 PM, Bogdan-Andrei Iancu
>> <bogdan at opensips.org <mailto:bogdan at opensips.org>> wrote:
>>
>> Hi Sasmita,
>>
>> Build a routing group (1, for example as this):
>>
>> Put in dr_rules:
>> +--------+---------+--------+---------+----------+---------+--------+-------+-------------+
>> | ruleid | groupid | prefix | timerec | priority | routeid |
>> gwlist | attrs | description |
>> +--------+---------+--------+---------+----------+---------+--------+-------+-------------+
>> | 100 | 1 | | | 0 | NULL |asterisk|
>> NULL | |
>> +--------+---------+--------+---------+----------+---------+--------+-------+-------------+
>>
>> and it dr_gateways:
>> +----+--------+------+----------------+-------+------------+-------+------------+-------+--------------------+-------------+
>> | id | gwid | type | address | strip | pri_prefix |
>> attrs | probe_mode | state | socket | description |
>> +----+--------+------+----------------+-------+------------+-------+------------+-------+--------------------+-------------+
>> | 1 |asterisk| 0 | 127.0.0.1:5080 <http://127.0.0.1:5080>
>> | 0 | NULL | NULL | 0 | 0 |
>> NULL | |
>> +----+--------+------+----------------+-------+------------+-------+------------+-------+--------------------+-------------+
>>
>>
>> Best regards,
>>
>> Bogdan-Andrei Iancu
>> OpenSIPS Founder and Developer
>> http://www.opensips-solutions.com
>>
>> On 22.09.2015 15:16, Sasmita Panda wrote:
>>> Hi All ,
>>>
>>> I am trying to upgrade opensips-1.6 to opensips-1.11 .
>>> As everybody know opensips-1.11 uses dynamic routing in
>>> place of lcr module .
>>>
>>> I have a simple scenario and , I wanted to and a route
>>> and a gateway for the particular route so that my call get
>>> routed to the gw .
>>>
>>> In lcr tables my schema is looking like bellow :
>>>
>>> lcr routes
>>> +----+--------+-----------------------------+--------+----------+
>>> | id | prefix | from_uri | grp_id | priority |
>>> +----+--------+-----------------------------+--------+----------+
>>> | 4 | | .*@xyz.xxx.com.* | 5 | 0 |
>>>
>>> lcr gateways
>>> +---------------+----------------+------+------------+-----------+--------+-------+------+-------+
>>> | gw_name | ip_addr | port | uri_scheme | transport
>>> | grp_id | strip | tag | flags |
>>> +---------------+----------------+------+------------+-----------+--------+-------+------+-------+
>>> | asterisk | 127.1.1.200 | 5080 | 1 | 1 |
>>> 5 | 0 | | 0 |
>>>
>>> I have simply add a route and for the same grp_id I have
>>> added a gateway .
>>>
>>> How I will do the same thing in dynamic routing ? I have
>>> gone through the document of dynamic routing module . But I
>>> am not able to understand the schema .
>>>
>>> Can anyone pleas help me , how to proceed ??
>>>
>>>
>>> */Thanks & Regards/*
>>> /Sasmita Panda/
>>> /Network Testing and Software Engineer/
>>> /3CLogic , ph:07827611765/
>>>
>>>
>>> _______________________________________________
>>> Users mailing list
>>> Users at lists.opensips.org <mailto:Users at lists.opensips.org>
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20150924/0ba1eedc/attachment-0001.htm>
More information about the Users
mailing list