[sr-dev] Re: [kamailio/kamailio] Dispatcher: added two new flags to mode parameter of ds_is_from_list function for more strictly matching (PR #3699)

2024-03-11 Thread Henning Westerholt via sr-dev
Yes, you probably need to create a new PR for that, against git master. For 5.8 
branch it will be cherry-picked.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3699#issuecomment-1988117447
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] Dispatcher: added two new flags to mode parameter of ds_is_from_list function for more strictly matching (PR #3699)

2024-03-11 Thread Dennis via sr-dev
Hi, @miconda !

About the docs changes above, do i need to make a new PR, this one is closed ?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3699#issuecomment-1988089752
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] Dispatcher: added two new flags to mode parameter of ds_is_from_list function for more strictly matching (PR #3699)

2024-02-26 Thread Dennis via sr-dev
Thansk for merging @miconda !

I wanted to offer a version of the documentation for flag 16 to make it more 
clear:

If bit five is set, then try to find the most closest target from all 
dispatcher targets with the mandatory ip and combination of local socket, 
protocol, port.
The weighted search result is combined from bit flags of matched components: ip 
- 1, port - 2, protocol - 4, local socket - 8, the target with the maximum 
value of flags combination will be selected.


-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3699#issuecomment-1963943052
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] Dispatcher: added two new flags to mode parameter of ds_is_from_list function for more strictly matching (PR #3699)

2024-02-23 Thread Daniel-Constantin Mierla via sr-dev
Merged #3699 into master.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3699#event-11902601725
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] Dispatcher: added two new flags to mode parameter of ds_is_from_list function for more strictly matching (PR #3699)

2024-02-23 Thread Daniel-Constantin Mierla via sr-dev
I am merging it, then rename the option for FULLADDRSOCK trying to reflect 
better that socket alone has more priority than port+protocol.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3699#issuecomment-1961172542
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] Dispatcher: added two new flags to mode parameter of ds_is_from_list function for more strictly matching (PR #3699)

2024-02-21 Thread Dennis via sr-dev
Hi !

Yes, i need to refine the docs, will try to do at this weekends.


-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3699#issuecomment-1957261250
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] Dispatcher: added two new flags to mode parameter of ds_is_from_list function for more strictly matching (PR #3699)

2024-02-21 Thread Henning Westerholt via sr-dev
@Den4t @miconda Any more questions or things that needs to be discussed? 
Otherwise its probably a good idea to merge it in the next days before the 
window for 5.8.0 closes completely.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3699#issuecomment-1957162295
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] Dispatcher: added two new flags to mode parameter of ds_is_from_list function for more strictly matching (PR #3699)

2024-01-31 Thread Dennis via sr-dev
> Your last comment does not clarify if a destination record matching (ip, 
> socket) has to be selected over one that matches (ip, port, proto). Can you 
> present the order of selection based on matching the values for ip, port, 
> proto or socket?

The strictness are defined by the flags combination:

#define DS_MATCHED_ADDR 1
#define DS_MATCHED_PORT (1 << 1)
#define DS_MATCHED_PROTO (1 << 2)
#define DS_MATCHED_SOCK (1 << 3)

in each iteration global variable ds_strictness are "OR-ed" with corresponding 
flag by criteria of matching, the winner is that which have the greatest value, 
for example if we have:

##ip, port, protocol
70 sip:192.168.1.1:5060;transport=udp 0 1 route=route1
#ip and socket
90 sip:192.168.1.1 0 1 route=route2;sockname=udp_5060

in first case we have flags: DS_MATCHED_ADDR | DS_MATCHED_PORT | 
DS_MATCHED_PROTO (7)
in second: MATCHED_ADDR | DS_MATCHED_SOCK (9)

The winner will be second, in this case 90.


-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3699#issuecomment-1919401498
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] Dispatcher: added two new flags to mode parameter of ds_is_from_list function for more strictly matching (PR #3699)

2024-01-29 Thread Daniel-Constantin Mierla via sr-dev
Your last comment does not clarify if a destination record matching (ip, 
socket) has to be selected over one that matches (ip, port, proto). Can you 
present the order of selection based on matching the values for ip, port, proto 
or socket?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3699#issuecomment-1915627589
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] Dispatcher: added two new flags to mode parameter of ds_is_from_list function for more strictly matching (PR #3699)

2024-01-26 Thread Dennis via sr-dev
Hi!
Sorry, I was sick last week...
> because of the flag for socket matching, record matching (ip, socket) is 
> selected. Is this the desired behavior. 
Yes, this is the desired behavior, because we can only have a target with an ip 
and socket like this (it seems to be a valid configuration):

70 sip:192.168.1.1 0 1 route=route 1;sockname=udp_5060

>Somehow, it should be clear in the documents how the destination record is 
>selected.
I understood, I will supplement the documentation more fully on this occasion.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3699#issuecomment-1911841712
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] Dispatcher: added two new flags to mode parameter of ds_is_from_list function for more strictly matching (PR #3699)

2024-01-18 Thread Daniel-Constantin Mierla via sr-dev
Somehow I got it that the destination that has the most matches is selected. As 
we have ip. port, protocol and socket, I thought that if a record matches three 
attributes (ip, port, protocol) is selected over another record that matches 
two attributes (ip, socket). But as I could understand from the condition:

```
if(ds_strictness < node_strictness) {
ds_strictness = node_strictness;
ds_strictest_node = node;
ds_strictest_idx = j;
}
```

because of the flag for socket matching, the record matching (ip, socket) is 
selected. Is this the desired behaviour. Somehow it has to be clear in the docs 
how is the destination record selected.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3699#issuecomment-1898357955
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] Dispatcher: added two new flags to mode parameter of ds_is_from_list function for more strictly matching (PR #3699)

2024-01-12 Thread Dennis via sr-dev
> I meant for the case/flag DS_MATCH_FULLADDRSOCK: a destination record that 
> matches **only** the socket is selected against one that matches 
> address+port+proto.

Using DS_MATCH_TRY_FULL ADDR SOCK, at least an ip must also be matched, and in 
this mode we do not interrupt the serach cycle, trying to find a more complete 
match, so the ip+socket combination will be valid, but not only the socket 
match. If i am right understand the question.


-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3699#issuecomment-119042
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] Dispatcher: added two new flags to mode parameter of ds_is_from_list function for more strictly matching (PR #3699)

2024-01-12 Thread Daniel-Constantin Mierla via sr-dev
I meant for the case/flag DS_MATCH_FULLADDRSOCK: a destination record that 
matches **only** the socket is selected against one that matches 
address+port+proto.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3699#issuecomment-1888669573
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] Dispatcher: added two new flags to mode parameter of ds_is_from_list function for more strictly matching (PR #3699)

2024-01-12 Thread Dennis via sr-dev
> If I understand the code correctly, a destination record that matches only 
> the socket is selected against one that matches address/port/proto? Is it 
> like that and if yes, is it the expected result?

Yes, it is a separate flag - DS_MATCH_SOCKET (8), it work like 
ds_is_from_list(-1,0), but socket is take in account also (if specified in the 
configuration).



-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3699#issuecomment-1888650488
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] Dispatcher: added two new flags to mode parameter of ds_is_from_list function for more strictly matching (PR #3699)

2024-01-11 Thread Daniel-Constantin Mierla via sr-dev
If I understand the code correctly, a destination record that matches only the 
socket is selected against one that matches address/port/proto? Is it like that 
and if yes, is it the expected result?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3699#issuecomment-1886943341
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] Dispatcher: added two new flags to mode parameter of ds_is_from_list function for more strictly matching (PR #3699)

2024-01-10 Thread Dennis via sr-dev
I have changed the flag name and added docs to xml.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3699#issuecomment-1884558285
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] Dispatcher: added two new flags to mode parameter of ds_is_from_list function for more strictly matching (PR #3699)

2024-01-10 Thread Dennis via sr-dev
@Den4t pushed 1 commit.

53ae14294f021ae615c0fae6ec9b48758d9a051e  dispatcher: added two new flags to 
mode parameter of ds_is_from_list function for more strictly matching

-- 
View it on GitHub:
https://github.com/kamailio/kamailio/pull/3699/files/9ef53dd70fb412a8c0754b523253be9478951a06..53ae14294f021ae615c0fae6ec9b48758d9a051e
You are receiving this because you are subscribed to this thread.

Message ID: 
___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] Dispatcher: added two new flags to mode parameter of ds_is_from_list function for more strictly matching (PR #3699)

2024-01-05 Thread Dennis via sr-dev
> I've not done any testing myself, but by my understanding the 
> DS_MATCH_STRICTEST flag is basically a flag to indicate it should not return 
> on the first match but scan through all. Then sort and return the one that is 
> matching one most criterias?

Right, but not exactly, there is no sorting as separate entity, during the 
traverse of tree the gobal variable filled with strictess flags (which are the 
bitmask of sip uri components - addr/proto/port and local socket) and more 
strictess node is saved in process global variable, if full set of possible 
flags is found, the cycle is stopped (we found full match and no more 
iterations needed), when traverse pocess finished (resursive method in original 
code) and we are not found full match, the global vars will contains more 
strictness node (if found at least address match), from this global vars then 
making out the final result of ds_is_from_list.


-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3699#issuecomment-1879215548
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] Dispatcher: added two new flags to mode parameter of ds_is_from_list function for more strictly matching (PR #3699)

2024-01-05 Thread Dennis via sr-dev
> Maybe DS_MATCH_FULLADDRSOCK.

OK, i will change the flag name, need some time to think about adequate name, 
writing docs hope can help with this.



-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3699#issuecomment-1879191053
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] Dispatcher: added two new flags to mode parameter of ds_is_from_list function for more strictly matching (PR #3699)

2024-01-05 Thread Morten Tryfoss via sr-dev
I've not done any testing myself, but by my understanding the 
DS_MATCH_STRICTEST flag is basically a flag to indicate it should not return on 
the first match but scan through all. Then sort and return the one that is 
matching one most criterias?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3699#issuecomment-1878505345
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org


[sr-dev] Re: [kamailio/kamailio] Dispatcher: added two new flags to mode parameter of ds_is_from_list function for more strictly matching (PR #3699)

2024-01-05 Thread Daniel-Constantin Mierla via sr-dev
Thanks for the PR!

I haven't done a full review, but first, you have to add documentation to the 
xml fine in the doc/ subfolder. It helps to understand how is supposed to be 
used and see if follows the code.

Also, the DS_MATCH_STRICTEST should be changed to try to reflect better what 
kind of match is done, I am sure one can think of another match mode more 
stricter, to include more than ip/port/proto/socket. Maybe 
DS_MATCH_FULLADDRSOCK.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3699#issuecomment-1878381418
You are receiving this because you are subscribed to this thread.

Message ID: ___
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org