* 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
* Modified funtion t_load_contact adding the 'mode' parameter:
- if equals to 0 or missing, it behaves as before (standard behavior)
- if equals to 1, contacts are ordered using a proportional algorithm
that use to q-value to calculate the weight of each contact. Higher
is the q value, higher is the probability to be contacted as first.
* Added new function ki_t_load_contact_mode to be able to set the
'mode' paramenter also from KEMI.
* Additionally a small code refactory has been done in order to
keep the code easier to read and to avoid duplications.
Change-Id: Ic39a70e43004422e2b6e5db4788df68d9e223129
The fix for issues with tls with openssl 1.1.X was not included
on debs due to We set CC_EXTRA_OPTS and LC_EXTRA_OPTS on debian/rules
Change-Id: I5cd35bcbd6f33042a7ef43ddac2c7972273da206
* tls fix is included since 5.2.5
* rename tt41650 patch to more descriptive name
* reorder patches from us
* add upstream links for the ones that have PR
Change-Id: I69c2a7bf8a805744d3eda4ee4294fa1698187b16
* fix sipwise/fix_error_in_cfgt_module.patch:
not_sip needs to be reset for sip messages after non_sip detection
* reorder some patches to avoid confusion
* Let's try to keep the descriptions for patches in order to be
able to track them easily
Change-Id: I11ea589387696f10d2f86b4e65b0dee85175ffbb
* use pvh_ prefix not to collide with pv
* use generic PKG_MEM_ERROR, SHM_MEM_ERROR
* split code into more small files
* create proper source doc
* clang-format with kamailio's settings
Change-Id: I6baaa658ae56763bca48f298e37410966414f270
A recent Kamailio version update has added an extra field to the end of
the gw list returned by load_gws() (the rule ID), which throws off
lcr_rate() as it looks at the last field in each gw string. Reverse the
approach to instead count the number of fields from the start of the
string to allow possible future extension of the field list.
Change-Id: I143e738553cec57047b19d94b6effa59788c1dc9
Necessary because python2 is being removed from Debian, and is
going to be EOL soon enough by python upstream
Change-Id: I98d94cdfdac2d8ebc8d5a22130656d198433f5eb
dfks_subs_handler does not set default values for XML elements extracted
from the body and ends up doing a strlen(NULL) if the elements are
missing.
Change-Id: I520f9f0a45c35bfb134fac5a0aa275ee3d2613f3
- build long orderless lists in reverse (forward list building has
exponential runtime)
- fix mem leaks
Change-Id: I00aa4d6bfd3eda5b37e04e79143b74b3ebd6224e
Adding a value-less key makes it a SET that contains all entry keys,
making it possible to use SCARD to count all entries.
Change-Id: I8da92944dda9df9c381d1a08ce23b142af68a69b
KEYS is considerably faster then SCAN, even with just one iteration, and
since we're always reading the full set of keys in one go anyway,
there's no benefit of using multiple SCAN invocations.
Change-Id: I0771db1b90273bf3bf73cb6b53e7d9ef8c43fcc6
We introduce a special case handling of range matching (< or > operator)
against timestamp key values, as required by the usrloc module. Without
this, the timer handling the removal of expired location entries would
have to a full table scan every time it runs (including at shutdown).
This feature detects the special case (a usable timestamp key type) and
converts the range match into a series of wildcarded SCAN statements. So
instead of doing a single full table scan which mostly returns non
matching rows, we do a series of more specific table scans, each of
which only returns relevant matching rows, or no rows at all.
Change-Id: I6c77b9d595b5f70aed976bdcd0cae329f198937b
If an update changes the value of a type key, we must propagate that
updated value to the respective type keys.
Change-Id: I7ad5c85aa9e7540e2ac558ca6b8c3125f2dfec9a
When looking for usable type keys, we must consider only types using the
DB "=" operator. Skip type keys that use any other operator.
Change-Id: I2ef696dc6d4930bc63e102c8251082ef9e3ff6b8
Redis is allowed to return an empty list in response to a SCAN even when
the iteration isn't complete yet. Only a zero cursor value returned from
a SCAN is indicative of the SCAN being complete.
Change-Id: Ib5da589c6944fcd46b2bbdc11c200e6a4f7108cb
When we need to call make from within a Makefile, we should do so by
using the MAKE variable, which has special meaning for make itself.
This makes sure, it will get marked as recursive command, and will
make it possible to use the make jobserver.
Change-Id: I8c37f2906b7e2592cb02912a59c7979b79d33f2a
* add modparam=auto_msg that is enabled by default
and if the tm module is also loaded it automatically
collects and applies the headers on incoming request/reply
and when a request/reply is forwarded
* for SIP_REPLY messages the FL_NAME_PV_HDRS_COLLECTED,
FL_NAME_PV_HDRS_COLLECTED flags are applied for the message
of the branch
Change-Id: Ife3a8d92ecd33263c35e554bb8da364ee3f03703
* add $x_rs that gets and sets reply status
(SIP_REPLY only)
* add $x_rr that gets and sets reply reason
(SIP_REPLY only)
Change-Id: I3d8cced49998f7cfb718cdb73038b85caf234cde
* branch indexes start internally from 0 where
0=transaction and 1=branch.0, etc. that is
to comply to the setbflag/isbflagset dset approach
Change-Id: I129a360258e7ec1fdde0736849bd1587b944a5eb
* fix pv_xavp_get_child to correctly pick
either branch headers (if cloned) or ones
from the default transaction
Change-Id: Ibf686042bdf06dc6da688740262d62c0293ea16d
* fix a scenario when multi headers were
duplicated
* adjust pv_single_header() and pv_skip_header()
to return 1 on true and 0 on false instead of 1 and -1
Change-Id: I8c7a316241d503bf67d57c74a104e3edc85690ac
* address a bug where parsed headers for a branch
were cloned from the headers. now parsed
headers are not cloned (they are reparsed in the branch upon
accessing them).
Change-Id: Iea48f1bd58713fbbfda6fbfdd8605ce7ab3a375e
* rework branch index retreival from msg->add_to_branch_s
* branches are stored in the xavp as pv_headers#branch_index
* improve FL_PV_HDRS_COLLECTED and FL_PV_HDRS_APPLIED flags
handling per branches or default transaction
Change-Id: If353c06b9b4351d206fd2d5daf0171a2f21b5f1c
* rvalue in $x_hdr and other pseudovariables
can now be also an integer. it is internally
converted into a string.
* fix a typo with SIP_URI_T type check
Change-Id: I682eae1f436f67fbfe3dd90c4785a82957ac362c
* check for scenarios where either msg->ruid.s
or branch ruid.s is NULL
* adjust collected/applied flags handling,
they are now handled per branch. when headers are applied
for a branch, the applied flag is not set for branches
Change-Id: I2eea6510ce0789deaec209f9c4d194192184a68e
* branches now have isolated modified headers
* headers stored in branches use headers#uid=>.. as
as the xavp name left part where the transaction
as headers=>...
Change-Id: I12e35b1be349281c3ff14548755a91e26ad5c740
This is needed when checking if a subscriber is still registered
with a certain parameter in the path.
Change-Id: I698a2f595979885e92336197e9543ba212730f31
* $x_hdr get with a null header name returns $null now
* $x_hdr set with a null header name returns a pv_header
related error instead of pvapi one as it uses
now pv_get_spec_value instead of pv_get_spec_name
* adjust pv_elem_p free up behaviour as it is a pointer
Change-Id: Ib675286e753989b8bf803fabf0a9592ea867cd4b
* $x_hdr now behaves correctly and get/set correct value
if header name in $x_hdr is specified as AVP_NAME_STR
Change-Id: I34978a44a0f8d4af2dd94f7999a561f76729987d
commit 814d5cc1f4f5b1e4b95737108dffc1e7d7bd566f
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Thu Feb 28 20:15:36 2019 +0100
tm: put back t in wait timer if still referenced more than once
- have a safety upper limit for putting back in wait timer
- special credits to Yufei Tao for testing and helping to troubleshoot
Change-Id: I998626945bca5793db84987acf10bbbfb15bb405
* pv_value_t format is now parsed only if the type is PV_VAL_STR
* pv_elem_free() is now called only if pv_value_t string was parsed,
otherwise it causes operation on an invalid pointer
Change-Id: Ic9d58fd5019732f24519d9d59da09c14a426afe6
commit 40d971af44b60b2c14dcc22693d41ec4ee4af33b
topos: execute event_route[topos:sending] with current sip message to be sent
- if drop is used, then the message processing with topos is skipped
- event route is executed after event_route[topos:outgoing]
- new parameter event_mode to control what event_route blocks are executed
Change-Id: I0eb49716c8e88af61470ec262128f30357444bb7
* this module enables working with headers
in the kamailio config on the variable level
and only performing the real message header
changes once in the route exit block.
Change-Id: I97ab3ee72a429c3ea92b4bd72f57b822d6091e47
Those are the commits taken from upstream version to fix the issue:
- f21554c6befaddbc82016d5d498e11ab3720c404
- 5b223a2e8a92f351b8eab756f5256fda7645ff21
- 1aad02edc6b9ffb104900cbc624f0853166ae926
- 35dec4c20d78f49ba242229c877894d70c94705c
Change-Id: I538cf7141ad4311520ec9a6ceded71b99fb93626
Import commit fcf1d3d778a903852b6e21103a23bd7fd6e3bbc9 from upstream that
solves the issue with masking Contact in 302 response from UAS.
Change-Id: I13ffa4d17c80d6dbf2e509d82e30980931e54cbe
- allow_trusted() now can take optional parameter of value to match.
- provided parameter will be used instead of From header in match_res() and match_hash_table()
- documentation extended with 3-arguments allow_trusted() function description
Change-Id: I45226cbba489bd7a60e7d8481777401b4f52024f
* avp_subst(dst, subst_rx)
- "subst_rx" now supports pvars
in addition to the static string
e.g.:
- avp_subst("$avp(s:dst)", "$avp(s:my_subst)");
- avp_subst("$avp(s:dst)", "$(rU{uri.param,my_subst})");
- inline mixed pvars are not supported
- static subst values are precomplied during the module init
(as it was before)
- dynamic pvar subst regex is evaluated and compiled on
each avp_subst() call
- optimise internal param handling for static subst values,
they are stored as (fparam_t*)->type==FPARAM_SUBST
Change-Id: Iea7a91ba87b892edd6fa405aa7cc285d69d9caa9
The function is necessary to extract the FCI code from the
variable instead of reading it from the SIP message.
Change-Id: If8a19d205e1ccad64e44cfa75501daa672165a59
When iterating through entry keys while searching for proper key,
reset manual key count when going to next entry key to avoid
writing beyond manaul key array.
Also fix memleak when deleting via table scan, where scanned
keys and manual keys were not properly deleted.
Also fix memleak when deleting in general, where type keys
were not properly deleted.
Change-Id: I60bb57ec95d863ace89a927341a9031bf67723ad
Make sure to not dereference con->con in error handling, as it
could be null due to failed reconnect attempt.
Change-Id: I06c3b1e26803b7ffc05c9c2fcbfbf2d27dc58163
This is a revert of what fixed in upstream commit
57c4ec824fdd6c6c797bd7d6bfb3d65159a8d7c6
Exchanging from and to tag was causing a missed notification
to the subscribers.
Change-Id: If10597c4df3927c6fbbbe21c4a585acbbd94a673
When pre-loading e.g. the location table with >50k records,
we have to make sure to:
* scan and process DB_ROWs in batch of 1000 to balance a
trade-of between number of redis commands and memory
consumption
* prepend to list of keys instead of append in order to keep
this operation as O(1)
Change-Id: Ifc4a2318af4a786391bcae4001f658aea28d1099
Hiredis sends queued commands to redis only after first call
of getReply, and if that fails, we need to have the appended
commands queued up, so we can re-queue them and re-execute
again after reconnect.
Also refresh code using upstream fixes, like declaring vars
at the beginning of functions instead of inline in for() loops.
Change-Id: I2de5da00818aaa27d3c10ba81074cfa83083e5b5
With newer OpenSSL versions it seems a threaded application needs to
cleanup properly, otherwise the now automatic atexit() cleanup handler
will segfault when the pthread variables have been deallocated already
by the pthreads library.
Change-Id: I08ac91cf63b1a74c17a0bd70b40202a5baf7771f
> dpkg-source: info: applying upstream/dialog-check-if-dialog-exists-after-event-route-exec.patch
> patching file modules/dialog/dlg_handlers.c
> Hunk #1 succeeded at 1179 (offset -47 lines).
> Hunk #2 succeeded at 1276 (offset -47 lines).
> Hunk #3 FAILED at 1368.
> 1 out of 3 hunks FAILED
> dpkg-source: info: the patch has fuzz which is not allowed, or is malformed
> dpkg-source: info: if patch 'upstream/dialog-check-if-dialog-exists-after-event-route-exec.patch' is correctly applied by quilt, use 'quilt refresh' to update it
Change-Id: I61458d08945784b7e38fff598fa5aa6cb2c879da
* [to|from]_avp module parameters
* sca_call_info_update() fallback if no Contact
header is present
* implement unsubscribe for call-info
* use rr is_direction() to select tag for search
* fix core on RPC command release_appearance
* fix on-hold detection when direction is upstream
Change-Id: I29c71374da6ae918b82a32987e5d9a52a252e478
* sipwise/tm-deep-cloning-of-the-request-for-fake-environment.patch
introduced a memory leak on reset_path_vector()
Change-Id: Iec8341920e54c769fdc6107765d9a6401a3f64b0
* use server_address as contact of SUBSCRIBE reply too
* use To header info as target of SUBSCRIBE when in-dialog
* fix sca_call_info_update() params
* change onhold_bflag parameter behavior
Change-Id: I5d112e9187ed6eccce0c44422605482530ab7671
> proxy[]: WARNING: db_mysql [km_dbase.c:85]: db_mysql_submit_query(): driver error on ping: Lost connection to MySQL server during query
Change-Id: Ieea5064451ea27a855942f060731d766740bde1a
This is the Kaspch specification for LNP. This is
asynchronous so We've added some pv command helper
functions in order to copy $var -> $xavp and
$xavp -> $var
upstream/pv-pv_var_to_xavp.patch was merged upstream at
https://github.com/kamailio/kamailio/pull/309
upstream/pv-pv-xavp_to_var.patch was merged upstream at
https://github.com/kamailio/kamailio/pull/316
upstream/pv-pv_xavp_to_var.patch was merged upstream at
https://github.com/kamailio/kamailio/pull/320
tcap: added inap_extract_var() in order to get the info
from a var. Info needs to be a binary string in hexadecimal
NO SPACES!!
Change-Id: I346c98a877085feeeff3ca49d3625304dfe5e344
sync sipwise/rtpengine.patch with upstream rtpengine module and split
into sipwise/rtpengine-compatibility.patch those changes which we need
no our version, but shouldn't be in upstream
Squashed commit of the following:
commit 90d9e2e63c
Author: Richard Fuchs <rfuchs@sipwise.com>
Date: Wed Nov 12 09:59:01 2014 -0500
removing test error trigger
commit b33c5e5a6a
Author: Richard Fuchs <rfuchs@sipwise.com>
Date: Wed Nov 12 09:48:02 2014 -0500
testing build system for timeout flag
commit 151a43f425
Author: Richard Fuchs <rfuchs@sipwise.com>
Date: Wed Nov 12 09:43:31 2014 -0500
testing build system for timeout flag
commit 9a08891d52
Author: Richard Fuchs <rfuchs@sipwise.com>
Date: Wed Nov 12 09:38:26 2014 -0500
testing build system for timeout flag
This filters the query on DB_ONLY mode when retriving contacts
for nat ping to the list of sockets we are listen into. Each
server now manages its own nat contacts.
Now a dialplan rule having an avp with index all([*]) will be checked with the avp values one by one.
Example:
Having $(avp(s:list)[*]) -> "111", "222"
'^(00|\+)?$(avp(s:list)[*])$' will be checked as:
- '^(00|\+)?111$'
- '^(00|\+)?222$'