[OpenSIPS-Users] Users Digest, Vol 105, Issue 43
jure
jurica.majeric at gmail.com
Wed Apr 5 16:56:02 EDT 2017
Hvala,
J
On 05.04.2017 18:00, users-request at lists.opensips.org wrote:
> Send Users mailing list submissions to
> users at lists.opensips.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> or, via email, send a message with subject or body 'help' to
> users-request at lists.opensips.org
>
> You can reach the person managing the list at
> users-owner at lists.opensips.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Users digest..."
>
>
> Today's Topics:
>
> 1. Re: Possible Drouting bug (Bogdan-Andrei Iancu)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Wed, 5 Apr 2017 18:48:43 +0300
> From: Bogdan-Andrei Iancu <bogdan at opensips.org>
> To: John Nash <john.nash778 at gmail.com>, "users at lists.opensips.org"
> <users at lists.opensips.org>
> Subject: Re: [OpenSIPS-Users] Possible Drouting bug
> Message-ID: <043fe4f3-a907-bcec-ef11-6691a75a246c at opensips.org>
> Content-Type: text/plain; charset="utf-8"; Format="flowed"
>
> Hi John,
>
> I tried to reproduce your report, but no luck.
>
> This is the script I used :
>
>
> if ($rU=~"^1") {
> $avp(gw_whitelist) = "one,two,three";
> xlog ("Start routing\n");
> if ( !do_routing("1","WF","$avp(gw_whitelist)" ,
> "$avp(rules_attributes)","$avp(gw_attributes)")) {
> xlog ("nothing found\n");
> send_reply("404", "Not found");
> exit;
> }
> xlog ("success first $rd, R_attr=$avp(rules_attributes),
> G_attr=$avp(gw_attributes)\n");
>
> while (
> use_next_gw("$avp(rules_attributes)","$avp(gw_attributes)") ){
> xlog ("success next $rd, R_attr=$avp(rules_attributes),
> G_attr=$avp(gw_attributes)\n");
> }
>
> xlog ("done\n");
> send_reply("404", "Not found");
> exit;
> }
>
>
> This generates:
>
> Apr 5 18:41:28 [14657] Start routing
> Apr 5 18:41:28 [14657] success init 10.0.0.102, R_attr=rule_124, G_attr=two
> Apr 5 18:41:28 [14657] success next 10.0.0.101, R_attr=rule_124, G_attr=one
> Apr 5 18:41:28 [14657] success next 10.0.0.103, R_attr=rule_12,
> G_attr=three
> Apr 5 18:41:28 [14657] done
>
>
> The DB looks like:
>
> mysql> select * from dr_gateways;
> +----+-------+------+------------------+-------+------------+-------+------------+-------+--------+-------------+
> | id | gwid | type | address | strip | pri_prefix | attrs |
> probe_mode | state | socket | description |
> +----+-------+------+------------------+-------+------------+-------+------------+-------+--------+-------------+
> | 1 | one | 0 | sip:10.0.0.101 | 0 | NULL | one
> | 0 | 0 | NULL | NULL |
> | 2 | two | 0 | sip:10.0.0.102 | 0 | NULL | two
> | 0 | 0 | NULL | NULL |
> | 3 | three | 0 | sip:10.0.0.103 | 0 | NULL | three
> | 0 | 0 | NULL | NULL |
> +----+-------+------+------------------+-------+------------+-------+------------+-------+--------+-------------+
> 3 rows in set (0.01 sec)
>
> mysql> select * from dr_rules;
> +--------+---------+--------+---------+----------+---------+-------------+----------+-------------+
> | ruleid | groupid | prefix | timerec | priority | routeid | gwlist
> | attrs | description |
> +--------+---------+--------+---------+----------+---------+-------------+----------+-------------+
> | 1 | 1 | 12 | NULL | 0 | NULL | three=1
> | rule_12 | NULL |
> | 2 | 1 | 124 | NULL | 0 | NULL | one=1,two=1
> | rule_124 | NULL |
> +--------+---------+--------+---------+----------+---------+-------------+----------+-------------+
> 2 rows in set (0.00 sec)
>
>
> Let me know the DB content, the script and output for your case. BTW,
> this was tested against OpenSIPS 2.3 version.
>
> Regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developer
> http://www.opensips-solutions.com
>
> OpenSIPS Summit May 2017 Amsterdam
> http://www.opensips.org/events/Summit-2017Amsterdam.html
>
> On 04/04/2017 11:05 PM, John Nash wrote:
>> No but I use groups and pass in routing functions.
>>
>> On Wed, Apr 5, 2017 at 1:31 AM, Bogdan-Andrei Iancu
>> <bogdan at opensips.org <mailto:bogdan at opensips.org>> wrote:
>>
>> John, do you use partitions in DR ?
>>
>> Regards,
>>
>> Bogdan-Andrei Iancu
>> OpenSIPS Founder and Developer
>> http://www.opensips-solutions.com <http://www.opensips-solutions.com>
>>
>> OpenSIPS Summit May 2017 Amsterdam
>> http://www.opensips.org/events/Summit-2017Amsterdam.html
>> <http://www.opensips.org/events/Summit-2017Amsterdam.html>
>>
>> On 04/04/2017 11:00 PM, John Nash wrote:
>>> Yes I tried that but still same issue. I call goes_to_gw and
>>> after that attributes are filled.
>>> On Tue, Mar 28, 2017 at 3:25 PM, Bogdan-Andrei Iancu
>>> <bogdan at opensips.org <mailto:bogdan at opensips.org>> wrote:
>>>
>>> Hello John, Do you use partitions ? Is the use_partition
>>> enabled ? If not, the use_next_gw() should be used like:
>>> use_next_gw( "$avp(rules_attributes)","$avp(gw_attributes)")
>>> (the first param, the partition, is not to be provided) Could
>>> you check if this solves the problem ? Best regards,
>>>
>>> Bogdan-Andrei Iancu
>>> OpenSIPS Founder and Developer
>>> http://www.opensips-solutions.com
>>> <http://www.opensips-solutions.com>
>>>
>>> OpenSIPS Summit May 2017 Amsterdam
>>> http://www.opensips.org/events/Summit-2017Amsterdam.html
>>> <http://www.opensips.org/events/Summit-2017Amsterdam.html>
>>>
>>> On 03/23/2017 09:19 AM, John Nash wrote:
>>>> I am using drouting and recently tried to use gateway
>>>> attribute. I call ...
>>>> do_routing("$avp(int_grp_id)","WF","$avp(gw_whitelist)" ,
>>>> "$avp(rules_attributes)","$avp(gw_attributes)"))
>>>> After this call I can see $avp(gw_attributes) is populated
>>>> frp, attr column of dr_gateways table.
>>>> but when i call following ...
>>>> use_next_gw(,"$avp(rules_attributes)","$avp(gw_attributes)")
>>>> $avp(gw_attributes) becomes empty
>>>> If i call next_routing() instead of use_next_gw then
>>>> $avp(gw_attributes) retains old value but does not populate
>>>> new value
>>>>
>>>> _______________________________________________
>>>> Users mailing list
>>>> Users at lists.opensips.org <mailto:Users at lists.opensips.org>
>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>> <http://lists.opensips.org/cgi-bin/mailman/listinfo/users>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://lists.opensips.org/pipermail/users/attachments/20170405/036cdbf0/attachment-0001.html>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
> ------------------------------
>
> End of Users Digest, Vol 105, Issue 43
> **************************************
More information about the Users
mailing list