-
Notifications
You must be signed in to change notification settings - Fork 581
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[uac_registrant] Match reply Contact with binding_URI by parameter. #2558
base: master
Are you sure you want to change the base?
Conversation
4e80c74
to
229eb20
Compare
Any updates here? No progress has been made in the last 15 days, marking as stale. Will close this issue if no further updates are made in the next 30 days. |
Any updates here? No progress has been made in the last 30 days, marking as stale. |
Any updates here? No progress has been made in the last 30 days, marking as stale. |
Any updates here? No progress has been made in the last 15 days, marking as stale. Will close this issue if no further updates are made in the next 30 days. |
Any updates here? No progress has been made in the last 15 days, marking as stale. Will close this issue if no further updates are made in the next 30 days. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the idea behind this PR, as it brings a lot more flexibility to uac_registrant
when trying to achieve interoperability with various UAS and their reply Contacts.
Still, I don't like that we are encouraging opensips.cfg
code which uses these hardcore Contact matching algorithm bitmasks such as 3
, 11
, 19
, 67
, 273
, 1374
, etc., which increase the script reviewing difficulty, as well as forcing script developers to constantly consult the parser/parse_uri.h
C program file, which I think should be avoided at all costs.
Suggestion to fix the above: add a "string CSV options" converter function in parser/parse_uri.h
to reverse human-readable input such as "user|passwd|userparam|transport"
into the same enum uri_match_flags
as you are using now. The function will be called once at startup (during fixup phase) anyway, so it will come with zero runtime overhead, but with a big QoL improvement.
Finally, let's also add some documentation in the modules/uac_registrant/doc/uac_registrant_admin.xml
file before we can merge this new feature (modparam).
Added new string module parameter 'match_contact' to choose, what parts of URI from Contact header should match binding_URI when OpenSIPS chooses expiration time for registration.
229eb20
to
819283c
Compare
@liviuchircu can you please review, when you have time? |
I just had a look at this and noticed a couple of potential issues:
|
@vasilevalex , could you detail/describe the scenario where the host part should be ignored (in a clustered setup) ? |
Hi, @jes @bogdan-iancu. I described why we need in some cases to compare Contact header from 200 Ok only with partial match in #2557 . |
Added new integer module parameter 'match_contact' to choose, what
parts of URI from Contact header should match binding_URI when
OpenSIPS chooses expiration time for registration.
Summary
Solving #2557
Details
It simplifies using uac_registrant module in cluster environment, when there is one DB per cluster, and each host uses its' own IP-address for SIP.
Solution
For example, setting
modparam("uac_registrant", "match_contact", 3)
allows matching only by user, ignoring host. Asbinding_URI
contains specific host, and every server sends REGISTER with its' own IP-address.Compatibility
Default behaviour is not changed.
Closing issues
closes #2557