generate an uuid for PUBLISH id field instead of callid
https://github.com/kamailio/kamailio/issues/2906
Not exactly the same version from upstream since we
have changes in the module not yet merged
Change-Id: I50dd72f427b94da41c1d46236c05aa041b15f1cb
We need to rewrok TSILO module and partially TM's API,
so that it is able to run a lookup using the provided RURI,
but only create a new branch for the Contact,
which is set in the currently processed REGISTER.
Optionally add a possibility to provide a contact as a pseudo-variable.
Hence we will be able to append new branches for only UAC(s) comming
online now (being REGISTERED).
New script functions introduced, tsilo:
- ts_append_by_contact(table, ruri [, contact])
New functions introduced, tsilo:
- w_ts_append_by_contact2() / ki_ts_append_by_contact()
- w_ts_append_by_contact3 / ki_ts_append_by_contact_uri()
- ts_append_by_contact() / ts_append_by_contact_to()
New functions introduced, TM:
- t_append_branch_by_contact()
Change-Id: Id321a261b137c83bfa38a150c6ff67ca312ae61d
It has been noticed, that after a list of contributions into lcr.so of kamailio,
the from_gw() and from_any_gw() functions are not working fully correct.
However it is only related to the usage with the third parameter 'src_port'.
Last time (last commit into lcr.so), the back compatibility was provided not to break anything for the kamailio community,
this means, it's only related to usage with the 'src_port' parameter.
from_gw() and from_any_gw() functions are not working fine,
when we have tens of gateways with the same IP address in the 'lcr_gw', and you use src_port for searching as well.
It works fine, if you have 2-5 gateways, but not with tens of them.
This is all the matter of the implementation and some limitations of how
the iteration through the memory is done (memory allocated for a list of specific structures),
and binary search used for that.
This is our own Sipwise's patch to handle that case which is intended to be kept internally.
This patch introduces a more simple iteration, but it works more efficient,
when the search for two objects at a time for matching items is done.
Change-Id: I0e7fb2ea59edb7d22636e58f002ca9cb59d42315
Improve binary search in the lcr module and add a possibility
to do a matching not only based on an IP address of a GW, but also using a source port.
When a possibility to use 'src_port' parameter in from_gw() and from_any_gw() was introduced,
the bsearch() remained untouched, and hence the matching (iteration through existing GWs)
is now done only based on an IP address.
This leads to the issue, when there are more than one GW with the same IP address in gws table,
and from_gw() and from_any_gw() functions are used with the 'src_port' parameter,
it can happen that a wrong GW is picked out by bsearch() from gws table (lcr_gw) and
a check by from_gw() and from_any_gw() returns False.
Hence the matching based on IP address and source port is required for bsearch(),
when from_gw() and from_any_gw() functions are used with the 'src_port' parameter.
This means backwards compatibility is still present (when one uses functions without 'src_port').
Change-Id: I90327ef69d8132cc9e11522567cbc026e0808602
A simple change, which allows to check, if a coming request matches
not only by an IP address and a transport protocol,
but also using the source port of a request.
Improvements are done for the following functions of the lcr module:
- from_any_gw()
- from_gw()
Back compatibility provided, hence it does not affect already existing behavior.
Change-Id: Id0496fad75ce64f1abecaa4747b4a77ec6b87cbf
If we set Diversion in split_headers and we get a header like
> "RULTEST, normalaa" <sip:0046341355354340@whatever.net;user=phone>;reason=unconditional
There was false detection of two Diversion headers.
Skip split marker between double quotes to avoid this
Change-Id: Ib2189bc0029f244fd59f14df5b3d1df745271038
Since we use Redis SETs to simulate non-unique indexes, we can use these
SETs to perform a much faster table scan when an appropriate index
exists. For usrloc expiry query in a typical scenario, this brings the
list of key strings that need to be checked down from 170k to 19k.
Change-Id: I1c4841be5cd28ad42196b4da6b5bb3e6e1b6ed50
Instead of making the COUNT increase and falloff dependent on the number
of results produced, we make it dependent on the query run time. This is
to prevent Redis being blocked by extended consecutive SCAN queries.
Each individual query should not run longer than 100 ms, and we also add
a short pause before going to the next SCAN to give competing queries a
chance to run.
Change-Id: I6b88cacf795513cf3e0aeefc67fbedef8e1bb8c1
We have value-less master keys to keep track of entries. These keys are
useless when looking for fast-searching keys and are not better than a
full table scan, but are erroneously seen as a better key match than
range-matching keys. Therefore just ignore value-less master keys.
Change-Id: Ibc9ad87a42412b6cf21eac47fbe0ee8e39af4aff
(cherry picked from commit 79b4ac5bb75fe83914fddc104a8fc7c7ce2d0681)
* to control how stopper column is used.
0 => default behavior
1 => stopper will be checked after sort process
Change-Id: I2b59111e40a1aedbd6c5446a5906b53c687a8ad4
Use the avp value when creating P-Asserted-Identity instead of
values from Headers in order to allow to insert E164 format value.
If no value, skip creation of header.
Change-Id: I81282da27325d02987b3dc1079605de0d6b340a8
* if we use pv_get_spec_name() cfgt will throw errors trying to get values
like $x_hdr($xavp(whatever=>y)) when there's no $xavp(whatever=>y)
Change-Id: I88f91e30f969e309c566f6c15495796350b0ba5f
When AVP is used instead of value from header, we were missing
the call to parse_uri() so value at parsed_uri was empty
Change-Id: I37ce0626691eae4d313b39474d6d57cd8baf87dc
When a Redis key can be deleted directly, we still need to build the
list of type keys for that table in order to delete dependent entries,
which are the indexes used for faster DB access.
Change-Id: Ib8fdad428946263fc9eba466868347fee219dfbc
* __dialog_created() -> get_dialog_data() -> creates dlg callbacks for
__dialog_sendpublish()
__dialog_sendpublish() can be executed by two different process and
if we use refresh_pubruri_avps_flag shared memory can change in between
Change-Id: Id81b66209c27a900033f557cfa175ca3067aa34c
* remove pvh_remove_xavi()
* rework pvh_set_header():
use core pv_get_spec_*
use PV_IDX_NONE to detect no index case
remove values instead of adding NULL if PV_IDX_ALL
* changes needed from upstream:
https://github.com/kamailio/kamailio/pull/2341
Introducing PV_IDX_NONE so we can know when idx == 0
if $x_hdr(HEADER) or $x_hdr(HEADER[0])
So we can append or set the value
Change-Id: I496d65cc7e0e92167967edfb592fff6a6b0d6e3b
* for split_headers and for applying multi index
headers str_hash_case_get() is now used instead of str_hash_get()
to follow the case insensitive approach
Change-Id: I9c99f91e68836df593e0120596494829aab2363a
* header names are now case insenstitive when used to store
or retrieve values
* check for skip headers should be insensitive too
Change-Id: Ie0f5c45ce5ce24623c6233e342b646525c6081b9
* pv_headers same version from upstream
* move patches contributed upstream from sipwise to upstream
Change-Id: I7a484c589d1c28e869490e2737f94c9daf8bb9ff
Fails due to:
| Traceback (most recent call last):
| File "/usr/lib/x86_64-linux-gnu/kamailio/kamctl/dbtextdb/dbtextdb.py", line 1239, in <module>
| main(sys.argv)
| File "/usr/lib/x86_64-linux-gnu/kamailio/kamctl/dbtextdb/dbtextdb.py", line 1233, in main
| except (Error, e):
| NameError: name 'e' is not defined
Change-Id: I09ed6d0bd1b6fdad5f9b04cd54fef1ee43a44312
* support refreshing info after dlg_manage() is called via a new flag
Find the callee is been resolved way after in our config
* control local identity value via dlg_var
Change-Id: I6c9781626944c427693a30ed0e67d32cc582a714
* don't try to detect branch every time
* reduce use of dynamic memory
* rework reply scenario, keep reply_counter in xavp
* hook to branch event too
Change-Id: I0adf97d4cb2d214e80fae48f8fdc643c1a644cc6