Add also new "uniq" column. The new update function will use this new column.
<!-- Kamailio Pull Request Template -->
<!-- IMPORTANT: - for detailed contributing guidelines, read: https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md - pull requests must be done to master branch, unless they are backports of fixes from master branch to a stable branch - backports to stable branches must be done with 'git cherry-pick -x ...' - code is contributed under BSD for core and main components (tm, sl, auth, tls) - code is contributed GPLv2 or a compatible license for the other components - GPL code is contributed with OpenSSL licensing exception -->
#### Pre-Submission Checklist <!-- Go over all points below, and after creating the PR, tick all the checkboxes that apply --> <!-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above--> <!-- If you're unsure about any of these, don't hesitate to ask on sr-dev mailing list --> - [X] Commit message has the format required by CONTRIBUTING guide - [X] Commits are split per component (core, individual modules, libs, utils, ...) - [X] Each component has a single commit (if not, squash them into one commit) - [X] No commits to README files for modules (changes must be done to docbook files in `doc/` subfolder, the README file is autogenerated)
#### Type Of Change - [ ] Small bug fix (non-breaking change which fixes an issue) - [X] New feature (non-breaking change which adds new functionality) - [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist: <!-- Go over all points below, and after creating the PR, tick the checkboxes that apply --> - [ ] PR should be backported to stable branches - [X] Tested changes locally - [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description <!-- Describe your changes in detail -->
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/2253
-- Commit Summary --
* p_usrloc: add new update function
-- File Changes --
M src/modules/p_usrloc/config.c (2) M src/modules/p_usrloc/doc/p_usrloc_admin.xml (27) M src/modules/p_usrloc/p_usrloc_mod.c (4) M src/modules/p_usrloc/p_usrloc_mod.h (1) M src/modules/p_usrloc/ucontact.c (265) M src/modules/usrloc/usrloc.h (1)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2253.patch https://github.com/kamailio/kamailio/pull/2253.diff
Thanks for the pull request. I think it might be better to use a value of "2" to specify the new scheme (at least in the docs). This would be more similar to the way other modules mode parameter work. Did I understand it correctly that you add a new DB column? Is this for the reg_db table or the (partitioned) location table?
@smititelu pushed 1 commit.
5d6a81d83c625beb52cb85a0e9266e9a115a663b p_usrloc: add new update function
I've updated the pull request to consider only 0, 1, 2 values (docs and code).
I've added the new function to consider additional columns when updating database; "uniq_col" is one of them. We have some user agents that send "uniq" in Contact header of SIP REGISTER message.
Thank you. So I understand correctly that the "new way" is using the uniq column for updates.
The p_usrloc module is not using the generic DB scheme infrastructure. So it would be great if you could also update the _location.sql_ file in the p_usrloc module directory to include the new column definition, just to have it somewhere defined.
@smititelu pushed 1 commit.
622e9f74f11d1a5223cd799ebb8bb954bd5d689e p_usrloc: add new update function
Updated p_usrloc's location.sql to include "uniq" column.
Thanks again, you can merge.
Merged #2253 into master.
Thanks for review.