New upstream version 5.2.4

changes/21/33821/2 upstream/5.2.4
Marco Capetta 6 years ago
parent 5ea5133405
commit fafb27fb0b

@ -1,3 +1,664 @@
===================== 2019-08-14 Version 5.2.4 Released =====================
===================== Changes Since Version 5.2.3 ===========================
commit 0c23deeaad6b54236966807172388f4073e54dde
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Wed Aug 14 11:17:03 2019 +0200
Makefile.defs: version set to 5.2.4
commit 7218d1fdad903fabaff224cf2be8212013e35221
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Wed Aug 14 11:13:54 2019 +0200
pkg/kamailio: updated version to 5.2.4 in spec files
commit f4f08a901bd798acd237851c7299c6d07083974e
Author: Victor Seva <linuxmaniac@torreviejawireless.org>
Date: Wed Aug 14 08:32:33 2019 +0200
pkg/kamailio/deb: version set to 5.2.4 [skip ci]
commit db0ae1e3dde3331810ba8b154d7e111bf3322583
Author: Kamailio Dev <kamailio.dev@kamailio.org>
Date: Mon Aug 12 21:01:32 2019 +0200
modules: readme files regenerated - modules ... [skip ci]
commit 6e5cb772817a8275c89869c868ce20a2ddb47df9
Author: Henning Westerholt <hw@skalatan.de>
Date: Mon Aug 12 20:52:50 2019 +0200
topos: docs for dialog_expire param limitation for in-dialog requests (GH #2024)
(cherry picked from commit 3ccf5ee691440e806d441f0e58562ddc4137a488)
commit c1eaf3353f43d34f164f28a871399ca785c40b4f
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Mon Aug 12 20:15:17 2019 +0200
dispatcher: skip inactive destinations for pointing next to be used record
(cherry picked from commit 18eeda012a711584239b03d5cfef8b7720f0ef31)
commit 7069cbaf28beb35036eeb2ab9bde19844144eb00
Author: Kamailio Dev <kamailio.dev@kamailio.org>
Date: Mon Aug 12 10:32:22 2019 +0200
modules: readme files regenerated - modules ... [skip ci]
commit 1d436e38cbadd47a36a5293b88713566e2454eb0
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Tue Aug 6 21:37:56 2019 +0200
misc_radius: increase MAX_EXTRA from 4 to 8
- GH #2025
(cherry picked from commit 4c537a618949eb48ffed9297f3abc8cdc879b70d)
commit 5d7784a5e35e3060549e5e12a05d1dfc34fbff19
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Tue Aug 6 21:37:04 2019 +0200
auth_radius: increase MAX_EXTRA from 4 to 8
- GH #2025
(cherry picked from commit df93a638040f4c1aa4d6ed3799d6f990b0593f94)
commit 91ffb3e9d2ff60d0e31a33cc00c966afbadadcd2
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Tue Aug 6 17:33:15 2019 +0200
app_python3: Makefile - get all ldflags for linking
(cherry picked from commit d762848d4f71014a6c6b6693b44403324a8edd15)
commit 7368859780f258945f2077a9ea0e1c7e603a75eb
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Mon Aug 5 18:29:42 2019 +0200
app_ruby: docs - fix rpc command name for listing the api
(cherry picked from commit 5773fba2765c8a08be7016e82a6ec02579b49215)
commit 2eafd02697f5f6c6885389e5ef25785d153b3026
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Mon Aug 5 18:11:00 2019 +0200
app_ruby: print pointers in error log message
(cherry picked from commit ea526a8de9c961a57858ecc4c47ce4ba24e03908)
commit 887c49e597572a58f6400736f8dcd753fa4543cd
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Mon Aug 5 18:03:47 2019 +0200
uac: debug messages when restoring from/to headers
(cherry picked from commit 7a4c490a63cd3fa924b6921fcd20ba77a6d661fb)
commit 21fa3d2c130d85a925d2db658dfbd291d21a6baa
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Fri Aug 2 13:43:36 2019 +0200
tm: removed unused error label in prepare_new_uac()
(cherry picked from commit c7ceb08b31fdb3f6560d02fff6b6ee71602c19ec)
commit 5c042d6e1023828f49d7ac75f2b761ad3433ab31
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Thu Aug 1 13:54:21 2019 +0200
tm: proper resoring of backup lumps in case of cloning failure
(cherry picked from commit cd379886fa7a8ff01b9618491199f8e5b3ce897f)
commit 164702ddbc2e88c818f9293d0c31fef163ea45b7
Author: Guillem Jover <gjover@sipwise.com>
Date: Mon Jul 29 20:15:47 2019 +0200
build: Call make via $(MAKE)
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: I6829f3ee0a830fc8273e1dffe696382fccc6a093
(cherry picked from commit 2306dd47b308f99e5c22c2d6f4d2bc1200ed8453)
commit f88580226306bdc02120e8a0d0042c640192fd53
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Wed Jul 31 11:04:21 2019 +0200
db_redis: note about defining key when updating table content
(cherry picked from commit f2df5df815f8dfca87324ca70e6fe9a51fc417e9)
commit 1c406f1e8ff2c02f1d739082c39835d7bee077ba
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Tue Jul 30 16:58:45 2019 +0200
usrloc: use static record for expires callback in db-only mode
(cherry picked from commit 12dbf48d421680764f9e9621de9485616ca0c055)
commit 112529b9e9396c12ec5471ca651f580a02d1b172
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Mon Jul 29 12:25:17 2019 +0200
kamctl: option to enable kamctl test from shell variable
- set KAMCTL_TEST variable in shell
(cherry picked from commit 4968e8994157f1152bf7461b16049d67e5c9cc59)
commit 5bbf4aeca8063da6f7f911260a95c7475f6184a0
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Mon Jul 29 10:54:41 2019 +0200
usrloc: delete contact attributes in db-only mode
(cherry picked from commit b642263a08313e86cc4936a9c489e8afb4a2cb5f)
commit efaeb98c3a251e468573d6ebdb3d92c6065c7bdc
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Mon Jul 29 10:40:56 2019 +0200
usrloc: coherent indentation and whitespacing
(cherry picked from commit 12bf3cb574e2ead2da46e7e237a33415ae12df61)
commit e2a0873df1e18640e1bfe7bc0adee725202afa2b
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Fri Jul 19 10:03:53 2019 +0200
evapi: adjust log message when no client connected for dispatching
(cherry picked from commit a6a2416e59c1e1a5cbadd3ecceecff52201be10d)
commit 1bba5826292f0dbd6703f8df941f886a2a71c9e9
Author: Surendra Tiwari <surendratiwari3@gmail.com>
Date: Fri Jul 19 13:07:32 2019 +0530
evapi:return code and log fixed for no evapi client while sending
(cherry picked from commit 08cf17288861bcaa8f3b23166059ead517d1b4fe)
commit 77abc5d6923930649bb2fc76dd3b4f5d702684d9
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Fri Jul 19 09:50:21 2019 +0200
core: pv - increased the size for vars and transformations tables
(cherry picked from commit e6b183a1ec3b267cc25040a9b67a1c151ee85555)
commit ae766571c230ef9b1e8edd0faade674061488897
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Thu Jul 18 08:46:27 2019 +0200
corex: debug message for set rcv/snd sock functions
(cherry picked from commit 5e961873401fd0a93ff03ba8d75dbcefbf2fbcf0)
commit 2a864f3580fb97c9e920f8fa7cd9361ad3b88aae
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Thu Jul 18 08:41:29 2019 +0200
core: debug message for forcing send socket action
(cherry picked from commit abe060b417c5270082aa46660fdc2f78098a5888)
commit 681dd5d519c24e8e0574eafccb62e9c0b6cf8732
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Thu Jul 18 08:34:31 2019 +0200
pv: debug message when seting $fs (send socket)
(cherry picked from commit ac95f0c29390e1dbc0779b56936ee68a424595e0)
commit 2fc5178d6557e2c1e8351330456cdcd8a55bebee
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Mon Jul 15 17:24:14 2019 +0200
siputils: log method ids on mismatch for options_reply()
(cherry picked from commit 9dab8303a96614fd74efff6add359a23713642a5)
commit 787ebf8cef9972292a38c5d3335703a0407c547a
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Mon Jul 15 16:41:22 2019 +0200
siputils: exported options_reply() to kemi framework
(cherry picked from commit 183ff04e00e592cc2c7db54732c6a3bb8fb75bb8)
commit a77c4a9268e416abdae5ec74374451d4172cc8e7
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Tue Jul 9 09:35:08 2019 +0200
kamctl: relaxed regex check on aor and sip uri
- it required a dot (.), not valid for ipv6 and single word domains
(e.g., localhost)
- now just match on USERNAME_RE@.+
(cherry picked from commit 94e9d47d2d2da82be23f1bae8cd6491c758a384c)
commit 59d29bc35138939a14beed501e7d8ae47b35b6e8
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Sat Jul 6 09:00:06 2019 +0200
usrloc: coherence for int type of parameters
- it was combination of int and integer, now all int
- fix examples for int params, related to GH #1999
(cherry picked from commit 91fa799e436de252e9f5aa5d8f09609f46db6e58)
commit 21af99321bbcc14ffeced749eafe003caff26b36
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Mon Jul 1 17:30:07 2019 +0200
uac: docs - examples with rpc commands having params numbers converted to string
- GH #1988
(cherry picked from commit ec42a0b36a10dec0852bd1ef2bf3ad7ab9ad8dbc)
commit 942b0ab096a7981ddad19a74974eef3d23d44cd6
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Fri Jun 28 16:01:43 2019 +0200
pv: relax uri and params transfromation parsing when separator is last char
- more flexible in parsing custom values, detection done in
transformations code
(cherry picked from commit 1c4af823c39d28b694c1dec607d8d72c5b726456)
commit 1f7519fa002e7cfff0edd2180aeab2b5306881e2
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Fri Jun 28 14:53:02 2019 +0200
htable: docs - rephrased info for db_expires to clarify its purpose
(cherry picked from commit f87adf6aba3fcebfe162341bc45d130365d34f5e)
commit 4d3bc9dbd2d4da88e6f04f0cdaa52944430fd364
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Fri Jun 28 08:07:02 2019 +0200
uac: debug messages when initializing the remote uac registration
(cherry picked from commit 0fcb2607d2d63a0e10fce189b6881ac15b985bb4)
commit 4761c2708a6b315d4cc0b1d8c88fd9d90e1400ee
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Thu Jun 27 16:25:27 2019 +0200
sdpops: exported to kemi the functions to detect sdp with codecs
- sdp_with_codecs_by_id() and sdp_with_codecs_by_name()
(cherry picked from commit 3716541db01c09bd00998bdbd0c35b3a842cdaf5)
commit a5f51d169ab3cd890d005eac1ea5d91102acbda7
Author: Vicente Hernando <vhernando@systemonenoc.com>
Date: Tue Jun 25 15:37:43 2019 +0200
call_obj: b/f acept optional limit parameter.
(cherry picked from commit 8266f0ee05b1f2faf2d4148efca257f7322da4ce)
commit 203b027357259564aaef1db2f004bfaaa30c9fd7
Author: Vicente Hernando <vhernando@systemonenoc.com>
Date: Mon Jun 24 15:06:25 2019 +0200
call_obj_mod: no need to use a free function for call_obj_get.
(cherry picked from commit a58b4c2afbffdd2584f553f8d7d36a84d40e2aee)
commit 8848bce61107c98a4b8e6fd2afe3670ec90baf70
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Thu Jun 27 09:36:21 2019 +0200
lib/srdb1: support for username@domain in user id part of db url
- used by some cloud database services
- reworked patch from GH #1992
(cherry picked from commit d419f427d2acf890e5e45c4f3e8e7a2b2fe4cead)
commit bf5e1698e543bce6cbf424773322a06ae09d2c19
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Tue Jun 25 23:03:17 2019 +0200
sanity: free parsed proxy-required header in case of failure
- reported by GH #1990
(cherry picked from commit ffa2aa438e2a13e6e8bdbe70dd90827ae18279ce)
commit 2b58dee39ea92e2fd2038b70cb0c0436c109d6a2
Author: Julien Arlt <julien-arlt@gmx.de>
Date: Fri Jun 21 14:52:11 2019 +0200
userblacklist: fix double "check_user_blacklist" in module documentation
(cherry picked from commit b7f7efe4f952894aa847165cc038cd5af4c3141a)
commit 9d4f48b20216b688006fb68e9878a2ce339d19a4
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Sat Jun 22 10:58:18 2019 +0200
rls: Makefile - link agaist libicu on macos/darwin
- libxml2 needs it but its pkg-config doesn't list it
(cherry picked from commit 46084c898d0598e94c7f22ab03d321e037fd7f55)
commit df7a3c2b1c9dec3655f175728a5771262fd6a747
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Fri Jun 21 11:08:12 2019 +0200
presence: docs - aligned examples to avoid large whitespacing
(cherry picked from commit 8a909021ccccc321b06b3437d124978bd901ab18)
commit 0bcfc63dd365e50e8a6394e005972e2bf5d0e86a
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Thu Jun 20 20:35:04 2019 +0200
presence: docs - fixed name for event route presence:notify-reply
(cherry picked from commit f005e2edca8fef350546cb743bf1cb51ee4ddd8d)
commit 59402a71c5c7d8fc4ffd3dbb5643fb6605982e51
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Thu Jun 20 11:01:09 2019 +0200
rls: docs - added section ids
(cherry picked from commit 50dfec2f2b7a467afe7c935524d0d385e9018f02)
commit 29114b86e4360f2de53310070db872cd09aaef6e
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Tue Jun 18 16:25:25 2019 +0200
pdb: safety check for header length in pdb_msg_dbg()
(cherry picked from commit 3c07e2351a94e4ff2cf3c6b9b9df4d7462cd5760)
commit db0cabd8673e5ad7468eebae1781dd176bac1788
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Fri Jun 7 09:55:04 2019 +0200
exec: debug message with number of results for exec_avp()
(cherry picked from commit 01c50c84aed717f9de689ab4eec3faec59a498e4)
commit 1789377bdb6180b8979a84502ba439366f7f8d45
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Fri Jun 7 08:48:34 2019 +0200
tm: detect local uac transaction not inserted in the hash table
(cherry picked from commit cf0008d843009acc8e40fcad3eceda063b1a358c)
commit 2f07bb77623c556b440d040203ade01726a59fde
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Tue May 28 08:44:32 2019 +0200
usrloc: clone xavp list in contact struct in memory mode
(cherry picked from commit 76f0fa8a0330de3885f5f3830eb90061c59045d4)
commit 009f62895e835606c1a6c378aeded6c7068f3902
Author: Kamailio Dev <kamailio.dev@kamailio.org>
Date: Sun Aug 11 11:02:02 2019 +0200
modules: readme files regenerated - modules ... [skip ci]
commit 822820827c55adb02efae9703cfda9b936686f3f
Author: Henning Westerholt <hw@skalatan.de>
Date: Sun Aug 11 10:56:56 2019 +0200
acc: remove diameter specific doc content, code was moved in 2017 to acc_diameter
(cherry picked from commit d8cede175ddeada5ca5654a74e765f154dcfa86d)
commit 71e384ab77faf7d09c7cb27996a16f588e9dd22e
Author: Henning Westerholt <hw@skalatan.de>
Date: Sun Aug 11 10:51:37 2019 +0200
acc: doc improvement regarding radius and diameter modules
(cherry picked from commit 59a58e8a01e91def4634b551cb69ebe1f1c953e0)
commit 82bbbd443977ee45c87958265ef064c94689c17c
Author: Kamailio Dev <kamailio.dev@kamailio.org>
Date: Fri Aug 9 16:46:36 2019 +0200
modules: readme files regenerated - modules ... [skip ci]
commit 06d6009624ec5f537838e23afc491043e6edae75
Author: Henning Westerholt <hw@skalatan.de>
Date: Fri Aug 9 16:35:30 2019 +0200
uac: fix another copy and paste error in docs
(cherry picked from commit 85994cda0a9413836386d595aab1657d1412ec8b)
commit 1681a5b22270e1dfcbad8edea2881c24d49e847d
Author: Henning Westerholt <hw@skalatan.de>
Date: Fri Aug 9 16:25:02 2019 +0200
uac: fix references in docs for AVPs
(cherry picked from commit a5360fa28d8394bf420915645ecd0658dcd1c7b8)
commit 643faf56274d6432b9884a062a669d0920d04bd4
Author: Henning Westerholt <hw@skalatan.de>
Date: Sun Aug 4 21:12:48 2019 +0200
domain: fix memory leak on domain reload (related to domain_attr table, struct domain_list)
- fix memory leak on domain reload, reported by Mack Hendricks
- related to domain_attr table, structure domain_list
(cherry picked from commit f50177003c21f53564be6349c0bb4935be184e2d)
commit 24e327280b1790ed15e16f6fd251c5596728abd8
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Thu Aug 8 18:29:40 2019 +0200
sipt: reset the static buffer for returning the number
- GH #2030
(cherry picked from commit 2c052974263c0785eb5280a935162673ac82dc6b)
commit b88e04ee3d873a1d9c09b504e62174c0e1aaa02b
Author: Henning Westerholt <hw@skalatan.de>
Date: Tue Aug 6 09:44:38 2019 +0200
corex: fix parser for alias_subdomain modparam, extend debugging output
- fix parser for alias_subdomain modparam, it was not working correctly for
all proto:hostname:port combinations (e.g. hostname/proto mixed up)
- extend debugging output for alias adding and also alias matching
(cherry picked from commit 36ef1bf77f9df7bc5022c1dc350e54df2d168cf3)
commit 9db6d9cc7751684981c2b602b3bd6021edc3a7fb
Author: Victor Seva <linuxmaniac@torreviejawireless.org>
Date: Thu Dec 27 22:36:20 2018 +0100
db_mysql: remove build warning, unneeded include (#1777)
db_mysql: mysql_version.h is already included at mysql.h (GH #1777)
> In file included from km_dbase.c:38:
> /usr/include/mariadb/mysql_version.h:3:2: warning: This file should not be included by clients, include only <mysql.h> [-W#warnings]
> #warning This file should not be included by clients, include only <mysql.h>
(cherry picked from commit 57263490bd1dedbb4b7fdad6046880980feea040)
commit 82635674517b6c96678289ca4e807ae73020eefc
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Mon Jul 29 13:51:57 2019 +0200
core: skip to-tag when computing via branch for invite, ack and cancel
- proper functionality for stateless proxy in case of negative ACK (in
this case the INVITE has no To-tag, but ACK has it and resulted in
different via branch, making downstream proxy to not match transaction)
(cherry picked from commit b4e11cb25d848651406e0ad355d54f10db971761)
commit c93c7eb77692f213e68be7992f031e4cfd377605
Author: Henning Westerholt <hw@skalatan.de>
Date: Tue Jul 30 16:37:20 2019 +0200
utils/kamcmd: default port is 2049, adapt help and README
(cherry picked from commit 74375eae8f447952d17a1d89e5a62f029a15a81c)
commit dd21d3eab5024e351c06ea3ae7b0e427dbd38701
Author: Kamailio Dev <kamailio.dev@kamailio.org>
Date: Sun Jul 28 22:01:44 2019 +0200
modules: readme files regenerated - modules ... [skip ci]
commit 228154df82bbc2ebfa4edaf5e1bb91453bfb53e5
Author: Henning Westerholt <hw@skalatan.de>
Date: Sun Jul 28 21:44:50 2019 +0200
db_text: small fix in docs
(cherry picked from commit 6b946807dfa77eeead83b5a4650bd3e59f75ba57)
commit 77c60ca41c1789cbc3b7872d0f66fc8323ac260f
Author: Kamailio Dev <kamailio.dev@kamailio.org>
Date: Tue Jul 23 10:46:47 2019 +0200
modules: readme files regenerated - modules ... [skip ci]
commit 4d8dac06ad4fe9bcdf9a2fbc2d79a56918ca4e8e
Author: Henning Westerholt <hw@skalatan.de>
Date: Mon Jul 22 21:13:54 2019 +0200
tm: add missing docs about event_route[tm:local-request], GH #980
(cherry picked from commit 8d613cb532fadecddde799a982bd9acf96df1eaf)
commit 99e78ce404da0d7d0e98464916eef794d0f889a1
Author: Henning Westerholt <hw@skalatan.de>
Date: Sun Jul 21 11:51:01 2019 +0200
uac: minor spelling fix in docs
(cherry picked from commit e7061ee85ddcd203fb58fa023eeddd90bc97848e)
commit 4a50d6c091e0c8b38a582d4b07263c5c97e64d7d
Author: Kamailio Dev <kamailio.dev@kamailio.org>
Date: Tue Jul 16 11:22:31 2019 +0200
modules: readme files regenerated - modules ... [skip ci]
commit e0f95f60ae08b583f52f1aa3aee72ef57c85e139
Author: Niall McAndrew <34754073+niallmcandrew@users.noreply.github.com>
Date: Tue Jul 16 10:53:47 2019 +1200
tcpops: Fix the example documentation for tcp_get_conid
(cherry picked from commit e094407297e89e574f10347ce720bd8475537970)
commit 7c8ee7a32a712cddc4d6080f9d9f48a588113eb0
Author: Victor Seva <linuxmaniac@torreviejawireless.org>
Date: Mon Jul 15 12:09:00 2019 +0200
rtpengine: fix error output on send_rtpp_command()
* rename out variable to cmd due to We already have an out goto label
(cherry picked from commit 262068940ba8dbd1b9fd93847f83f40c038d988c)
commit 13e6e5ab591297237027a966b01cef5cb59f9f10
Author: Henning Westerholt <hw@skalatan.de>
Date: Sun Jul 14 12:25:28 2019 +0200
dispatcher: small spelling fix in docs
(cherry picked from commit 93d18c0e4a805c86e82e2271d2d496b4b125fdfd)
commit c23ea82a80c3e66a11b3c1f0bb0ea22e0e7985bb
Author: Henning Westerholt <hw@skalatan.de>
Date: Wed Jul 3 22:09:40 2019 +0200
acc: extend description in docs for log_missed_calls flag
(cherry picked from commit f7f3222ec03b2a1e9260a79e737cc55c7dac169f)
commit 01786b79e449506d0ccdf7528343e996be4e7cad
Author: Kamailio Dev <kamailio.dev@kamailio.org>
Date: Wed Jul 3 16:57:48 2019 +0200
modules: readme files regenerated - modules ... [skip ci]
commit f9caee5851bfafe195ebf009bd6a51051394c7d5
Author: Victor Seva <linuxmaniac@torreviejawireless.org>
Date: Fri Jun 28 17:06:54 2019 +0200
usrloc: fix memory leak on DB_ONLY mode on RPC commands
(cherry picked from commit b97bb77265e7bfc5562a664e8a510692ed68b2f8)
commit baf9e9fbfcf3be043085a649eec3f396213bcb5c
Author: Henning Westerholt <hw@skalatan.de>
Date: Sun Jun 30 11:51:57 2019 +0200
call_control: add a note that the callcontrol application expect the MI interface
(cherry picked from commit 62d607f29593bcd645c7d068327e0bd4a0db0a8f)
commit 4a458861b4377f53218a6c836f18adca6b17a9ff
Author: Victor Seva <linuxmaniac@torreviejawireless.org>
Date: Wed Jun 26 12:29:22 2019 +0200
registrar: clean avp/xavp created at 'usrloc:contact-expired' route_event
(cherry picked from commit c671e78142b51515d64392fd9a9db8f07e904167)
commit dcce685ab41097dc77fad50c414a66e634db72b9
Author: Sergey Safarov <s.safarov@gmail.com>
Date: Fri Jun 14 02:00:09 2019 +0300
pkg/kamailio/obs: Updated libevent2 deps for CentOS 6 dist [skip ci]
(cherry picked from commit a54b36e2533a71d8e38c03b497b470110a1e33fb)
commit bda9d6a23a2c2e5f5548f0a57444aeb4137a0bb0
Author: Sergey Safarov <s.safarov@gmail.com>
Date: Thu Jun 13 11:51:17 2019 +0300
pkg/kamailio/obs: Updated jansson module dependences
(cherry picked from commit 602eacf713a092eb0b4758f243ddd2342d2ee16f)
commit 2d2b993673d0296e6d9c08ff78b73341e407a37a
Author: Henning Westerholt <hw@skalatan.de>
Date: Fri May 31 12:42:21 2019 +0200
htable: fix a possible null pointer dereference in dmq startup error case
(cherry picked from commit 6f0b67b675dd18dce60fa3e5a4ece063216bbab5)
===================== 2019-05-22 Version 5.2.3 Released =====================
===================== Changes Since Version 5.2.2 ===========================

@ -148,7 +148,7 @@ c_defsX=-DNAME='\"kamailio\"' -DVERSION='\"5.1.0-dev3\"' -DARCH='\"x86_64\"' \
-DHAVE_SCHED_SETSCHEDULER -DHAVE_IP_MREQN -DHAVE_EPOLL -DHAVE_SIGIO_RT \
-DSIGINFO64_WORKARROUND -DUSE_FUTEX -DHAVE_SELECT
c_defs=$(subst ^^,='\",$(subst ",\"',$(subst =",^^,$(shell make -s -C ../../../src printcdefs))))
c_defs=$(subst ^^,='\",$(subst ",\"',$(subst =",^^,$(shell $(MAKE) -s -C ../../../src printcdefs))))
c_defs+= -DMOD_NAME='\"rpcgen\"'
c_defs+= -I$(COREPATH)/modules/app_sqlang/squirrel/include
@ -176,7 +176,7 @@ get_listed_grp=$(word 2, $(subst :, ,$(1)))
# get module interface define
get_modiface=$(word 3, $(subst :, ,$(1)))
find_modiface=$(if $(findstring modules,$(1)),$(shell make -s -C $(dir $(1)) printmiface),-DNONE)
find_modiface=$(if $(findstring modules,$(1)),$(shell $(MAKE) -s -C $(dir $(1)) printmiface),-DNONE)
# get base file name from file:grp: get_bname(file:grp)
# => basename(file) without extension (e.g. get_bname(foo/bar.c:x) => bar)

@ -4,7 +4,7 @@
# Maintainer: Nathan Angelacos <nangel@alpinelinux.org>
pkgname=kamailio
pkgver=5.2.3
pkgver=5.2.4
pkgrel=0
# If building from a git snapshot, specify the gitcommit

@ -1,3 +1,9 @@
kamailio (5.2.4) unstable; urgency=medium
* version set 5.2.4
-- Victor Seva <vseva@debian.org> Wed, 14 Aug 2019 08:32:02 +0200
kamailio (5.2.3) unstable; urgency=medium
* version set 5.2.3

@ -1,3 +1,9 @@
kamailio (5.2.4) unstable; urgency=medium
* version set 5.2.4
-- Victor Seva <vseva@debian.org> Wed, 14 Aug 2019 08:32:02 +0200
kamailio (5.2.3) unstable; urgency=medium
* version set 5.2.3

@ -1,3 +1,9 @@
kamailio (5.2.4) unstable; urgency=medium
* version set 5.2.4
-- Victor Seva <vseva@debian.org> Wed, 14 Aug 2019 08:32:02 +0200
kamailio (5.2.3) unstable; urgency=medium
* version set 5.2.3

@ -1,3 +1,9 @@
kamailio (5.2.4) unstable; urgency=medium
* version set 5.2.4
-- Victor Seva <vseva@debian.org> Wed, 14 Aug 2019 08:32:02 +0200
kamailio (5.2.3) unstable; urgency=medium
* version set 5.2.3

@ -1,3 +1,9 @@
kamailio (5.2.4) unstable; urgency=medium
* version set 5.2.4
-- Victor Seva <vseva@debian.org> Wed, 14 Aug 2019 08:32:02 +0200
kamailio (5.2.3) unstable; urgency=medium
* version set 5.2.3

@ -1,3 +1,9 @@
kamailio (5.2.4) unstable; urgency=medium
* version set 5.2.4
-- Victor Seva <vseva@debian.org> Wed, 14 Aug 2019 08:32:02 +0200
kamailio (5.2.3) unstable; urgency=medium
* version set 5.2.3

@ -1,3 +1,9 @@
kamailio (5.2.4) unstable; urgency=medium
* version set 5.2.4
-- Victor Seva <vseva@debian.org> Wed, 14 Aug 2019 08:32:02 +0200
kamailio (5.2.3) unstable; urgency=medium
* version set 5.2.3

@ -1,3 +1,9 @@
kamailio (5.2.4) unstable; urgency=medium
* version set 5.2.4
-- Victor Seva <vseva@debian.org> Wed, 14 Aug 2019 08:32:02 +0200
kamailio (5.2.3) unstable; urgency=medium
* version set 5.2.3

@ -1,3 +1,9 @@
kamailio (5.2.4) unstable; urgency=medium
* version set 5.2.4
-- Victor Seva <vseva@debian.org> Wed, 14 Aug 2019 08:32:02 +0200
kamailio (5.2.3) unstable; urgency=medium
* version set 5.2.3

@ -1,3 +1,9 @@
kamailio (5.2.4) unstable; urgency=medium
* version set 5.2.4
-- Victor Seva <vseva@debian.org> Wed, 14 Aug 2019 08:32:02 +0200
kamailio (5.2.3) unstable; urgency=medium
* version set 5.2.3

@ -1,5 +1,5 @@
%define name kamailio
%define ver 5.2.3
%define ver 5.2.4
%define rel dev1.0%{dist}
%if 0%{?fedora} == 27
@ -108,12 +108,12 @@
%bcond_with cnxcc
%bcond_without dnssec
%bcond_without geoip
%bcond_with http_async_client
%bcond_without http_async_client
%bcond_without ims
%bcond_with jansson
%bcond_with json
%bcond_without jansson
%bcond_without json
%bcond_without lua
%bcond_with kazoo
%bcond_without kazoo
%bcond_without memcached
%bcond_with mongodb
%bcond_without perl
@ -311,6 +311,14 @@ like Asterisk™, FreeSWITCH™ or SEMS.
%package acc_json
Summary: Account transaction information in a JSON dictionary
Group: %{PKGGROUP}
Requires: kamailio = %ver
%if 0%{?rhel} == 6
Requires: libevent2
BuildRequires: libevent2-devel
%else
Requires: libevent
BuildRequires: libevent-devel
%endif
%if 0%{?suse_version}
Requires: libjansson
BuildRequires: libjansson-devel
@ -486,8 +494,14 @@ Compressed body (SIP and HTTP) handling for kamailio.
%package http_async_client
Summary: Async HTTP client module for Kamailio
Group: %{PKGGROUP}
Requires: libevent, kamailio = %ver
BuildRequires: libevent-devel
Requires: kamailio = %ver
%if 0%{?rhel} == 6
Requires: libevent2
BuildRequires: libevent2-devel
%else
Requires: libevent
BuildRequires: libevent-devel
%endif
%if 0%{?suse_version}
Requires: libcurl4
BuildRequires: libcurl-devel
@ -532,7 +546,14 @@ IMS modules and extensions module for Kamailio.
%package jansson
Summary: JSON string handling and RPC modules for Kamailio using JANSSON library
Group: %{PKGGROUP}
Requires: libevent, kamailio = %ver
Requires: kamailio = %ver
%if 0%{?rhel} == 6
Requires: libevent2
BuildRequires: libevent2-devel
%else
Requires: libevent
BuildRequires: libevent-devel
%endif
%if 0%{?suse_version}
Requires: libjson-c2
BuildRequires: libjansson-devel
@ -550,8 +571,14 @@ JSON string handling and RPC modules for Kamailio using JANSSON library.
%package json
Summary: JSON string handling and RPC modules for Kamailio
Group: %{PKGGROUP}
Requires: libevent, kamailio = %ver
Requires: kamailio = %ver
%if 0%{?rhel} == 6
Requires: libevent2
BuildRequires: libevent2-devel
%else
Requires: libevent
BuildRequires: libevent-devel
%endif
%if 0%{?suse_version}
Requires: libjson-c2
BuildRequires: libjson-c-devel
@ -569,8 +596,15 @@ JSON string handling and RPC modules for Kamailio.
%package kazoo
Summary: Kazoo middle layer connector support for Kamailio
Group: %{PKGGROUP}
Requires: libuuid, librabbitmq, json-c, libevent, kamailio = %ver
BuildRequires: libuuid-devel, librabbitmq-devel, json-c-devel, libevent-devel
Requires: libuuid, librabbitmq, json-c, kamailio = %ver
BuildRequires: libuuid-devel, librabbitmq-devel, json-c-devel
%if 0%{?rhel} == 6
Requires: libevent2
BuildRequires: libevent2-devel
%else
Requires: libevent
BuildRequires: libevent-devel
%endif
%description kazoo
Kazoo module for Kamailio.
@ -747,6 +781,7 @@ BuildRequires: python3, python3-devel
%endif
%endif
%description python
Python extensions for Kamailio.

@ -1,5 +1,5 @@
%define name kamailio
%define ver 5.2.3
%define ver 5.2.4
%define rel 0
%define _sharedir %{_prefix}/share

@ -1,5 +1,5 @@
%define name kamailio
%define ver 5.2.3
%define ver 5.2.4
%define rel 0
%define _sharedir %{_prefix}/share

@ -106,7 +106,7 @@ INSTALL_FLAVOUR=$(FLAVOUR)
# version number
VERSION = 5
PATCHLEVEL = 2
SUBLEVEL = 3
SUBLEVEL = 4
EXTRAVERSION =
# memory manager switcher

@ -1434,6 +1434,9 @@ match_cleanup:
ret=E_BUG;
goto error;
}
LM_DBG("setting send-socket to [%.*s]\n",
((struct socket_info*)a->val[0].u.data)->sock_str.len,
((struct socket_info*)a->val[0].u.data)->sock_str.s);
set_force_socket(msg, (struct socket_info*)a->val[0].u.data);
ret=1; /* continue processing */
break;

@ -2,6 +2,6 @@
* DO NOT EDIT IT
*/
#define REPO_VER "c36229"
#define REPO_HASH "c36229"
#define REPO_VER "759867"
#define REPO_HASH "759867"
#define REPO_STATE ""

@ -38,6 +38,7 @@
inline static int char_msg_val( struct sip_msg *msg, char *cv )
{
str src[8];
str sempty = str_init("");
if (unlikely(!check_transaction_quadruple(msg))) {
LM_ERR("can't calculate char_value due to a parsing error\n");
@ -55,7 +56,12 @@ inline static int char_msg_val( struct sip_msg *msg, char *cv )
}
/* use only the from & to tags */
src[0]=get_from(msg)->tag_value;
src[1]=get_to(msg)->tag_value;
if(msg->first_line.u.request.method_value
& (METHOD_INVITE|METHOD_ACK|METHOD_CANCEL)) {
src[1]=sempty;
} else {
src[1]=get_to(msg)->tag_value;
}
src[2]= msg->callid->body;
src[3]= msg->first_line.u.request.uri;
src[4]= get_cseq( msg )->number;

@ -40,8 +40,8 @@
#include "pvapi.h"
#include "pvar.h"
#define PV_TABLE_SIZE 64 /*!< pseudo-variables table size */
#define TR_TABLE_SIZE 32 /*!< transformations table size */
#define PV_TABLE_SIZE 512 /*!< pseudo-variables table size */
#define TR_TABLE_SIZE 256 /*!< transformations table size */
void tr_destroy(trans_t *t);

@ -241,7 +241,7 @@ typedef struct _pv_cache
struct _pv_cache *next;
} pv_cache_t;
#define PV_CACHE_SIZE 64 /*!< pseudo-variables cache table size */
#define PV_CACHE_SIZE 512 /*!< pseudo-variables cache table size */
pv_cache_t **pv_cache_get_table(void);

@ -105,21 +105,22 @@ static int parse_db_url(struct db_id* id, const str* url)
};
enum state st;
unsigned int len, i, j, a;
unsigned int len, i, j, a, foundanother;
const char* begin;
char* prev_token;
foundanother = 0;
prev_token = 0;
if (!id || !url || !url->s) {
goto err;
}
len = url->len;
if (len < SHORTEST_DB_URL_LEN) {
goto err;
}
/* Initialize all attributes to 0 */
memset(id, 0, sizeof(struct db_id));
st = ST_SCHEME;
@ -153,7 +154,7 @@ static int parse_db_url(struct db_id* id, const str* url)
st = ST_USER_HOST;
begin = url->s + i + 1;
break;
default:
goto err;
}
@ -162,6 +163,20 @@ static int parse_db_url(struct db_id* id, const str* url)
case ST_USER_HOST:
switch(url->s[i]) {
case '@':
/* look for another @ to cope with username@domain user id */
if (foundanother == 0) {
for (j = i + 1; j < url->len; j++) {
if (url->s[j] == '@') {
foundanother = 1;
break;
}
}
if (foundanother == 1) {
/* keep the current @ in the username */
st = ST_USER_HOST;
break;
}
}
st = ST_HOST;
if (dupl_string(&id->username, begin, url->s + i) < 0) goto err;
begin = url->s + i + 1;
@ -230,7 +245,7 @@ static int parse_db_url(struct db_id* id, const str* url)
return 0;
}
break;
case ST_DB:
break;
}

@ -22,8 +22,6 @@ Bogdan-Andrei Iancu
Voice Sistem SRL
<bogdan@voice-system.ro>
Edited by
Sven Knoblich
1&1 Internet AG
@ -107,29 +105,24 @@ Sven Knoblich
6.26. acc_time_column (string)
6.27. db_extra (string)
6.28. db_insert_mode (integer)
6.29. diameter_flag (integer)
6.30. diameter_missed_flag (integer)
6.31. diameter_client_host (string)
6.32. diameter_client_port (int)
6.33. diameter_extra (string)
6.34. cdr_enable (integer)
6.35. cdr_expired_dlg_enable (integer)
6.36. cdr_start_on_confirmed (integer)
6.37. cdr_facility (integer)
6.38. cdr_extra (string)
6.39. cdr_extra_nullable (integer)
6.40. cdr_start_id (string)
6.41. cdr_end_id (string)
6.42. cdr_duration_id (string)
6.43. cdr_log_enable (int)
6.44. cdrs_table (str)
6.45. time_mode (int)
6.46. time_attr (str)
6.47. time_exten (str)
6.48. time_format (str)
6.49. reason_from_hf (int)
6.50. clone_msg (int)
6.51. cdr_on_failed (int)
6.29. cdr_enable (integer)
6.30. cdr_expired_dlg_enable (integer)
6.31. cdr_start_on_confirmed (integer)
6.32. cdr_facility (integer)
6.33. cdr_extra (string)
6.34. cdr_extra_nullable (integer)
6.35. cdr_start_id (string)
6.36. cdr_end_id (string)
6.37. cdr_duration_id (string)
6.38. cdr_log_enable (int)
6.39. cdrs_table (str)
6.40. time_mode (int)
6.41. time_attr (str)
6.42. time_exten (str)
6.43. time_format (str)
6.44. reason_from_hf (int)
6.45. clone_msg (int)
6.46. cdr_on_failed (int)
7. Functions
@ -170,33 +163,28 @@ Sven Knoblich
1.26. acc_time_column example
1.27. db_extra example
1.28. db_insert_mode example
1.29. diameter_flag example
1.30. diameter_missed_flag example
1.31. diameter_client_host example
1.32. diameter_client_host example
1.33. diameter_extra example
1.34. cdr_enable example
1.35. cdr_expired_dlg_enable example
1.36. cdr_start_on_confirmed example
1.37. cdr_facility example
1.38. cdr_extra example
1.39. cdr_extra_nullable example
1.40. cdr_start_id example
1.41. cdr_end_id example
1.42. cdr_duration_id example
1.43. cdr_log_enable example
1.44. cdrs_table example
1.45. time_mode example
1.46. time_attr example
1.47. time_exten example
1.48. time_format example
1.49. reason_from_hf
1.50. clone_msg
1.51. cdr_on_failed
1.52. acc_log_request usage
1.53. acc_db_request usage
1.54. acc_db_request usage
1.55. acc_diam_request usage
1.29. cdr_enable example
1.30. cdr_expired_dlg_enable example
1.31. cdr_start_on_confirmed example
1.32. cdr_facility example
1.33. cdr_extra example
1.34. cdr_extra_nullable example
1.35. cdr_start_id example
1.36. cdr_end_id example
1.37. cdr_duration_id example
1.38. cdr_log_enable example
1.39. cdrs_table example
1.40. time_mode example
1.41. time_attr example
1.42. time_exten example
1.43. time_format example
1.44. reason_from_hf
1.45. clone_msg
1.46. cdr_on_failed
1.47. acc_log_request usage
1.48. acc_db_request usage
1.49. acc_db_request usage
1.50. acc_diam_request usage
Chapter 1. Admin Guide
@ -269,29 +257,24 @@ Chapter 1. Admin Guide
6.26. acc_time_column (string)
6.27. db_extra (string)
6.28. db_insert_mode (integer)
6.29. diameter_flag (integer)
6.30. diameter_missed_flag (integer)
6.31. diameter_client_host (string)
6.32. diameter_client_port (int)
6.33. diameter_extra (string)
6.34. cdr_enable (integer)
6.35. cdr_expired_dlg_enable (integer)
6.36. cdr_start_on_confirmed (integer)
6.37. cdr_facility (integer)
6.38. cdr_extra (string)
6.39. cdr_extra_nullable (integer)
6.40. cdr_start_id (string)
6.41. cdr_end_id (string)
6.42. cdr_duration_id (string)
6.43. cdr_log_enable (int)
6.44. cdrs_table (str)
6.45. time_mode (int)
6.46. time_attr (str)
6.47. time_exten (str)
6.48. time_format (str)
6.49. reason_from_hf (int)
6.50. clone_msg (int)
6.51. cdr_on_failed (int)
6.29. cdr_enable (integer)
6.30. cdr_expired_dlg_enable (integer)
6.31. cdr_start_on_confirmed (integer)
6.32. cdr_facility (integer)
6.33. cdr_extra (string)
6.34. cdr_extra_nullable (integer)
6.35. cdr_start_id (string)
6.36. cdr_end_id (string)
6.37. cdr_duration_id (string)
6.38. cdr_log_enable (int)
6.39. cdrs_table (str)
6.40. time_mode (int)
6.41. time_attr (str)
6.42. time_exten (str)
6.43. time_format (str)
6.44. reason_from_hf (int)
6.45. clone_msg (int)
6.46. cdr_on_failed (int)
7. Functions
@ -305,14 +288,13 @@ Chapter 1. Admin Guide
1.1. General Example
ACC module is used to account transactions information to different
backends like syslog and SQL. With the separate module, radius support
is enabled.
backends like syslog and SQL. With the separate module “acc_radius”
support for radius is enabled.
There is some very early support of the Diameter protocol in the code
which is no longer included by default and will be deleted in coming
releases. This support is not up to date with the current Diameter
protocols and is disabled. If you need Diameter support, please use the
ims_charging module.
There is some very early support of the Diameter protocol in the
“acc_diameter” module which will be deleted in coming releases. This
support is not up to date with the current Diameter protocols. If you
need Diameter support, please use the ims_charging module.
To account a transaction and to choose which set of backends to be
used, the script writer just has to set some flags (see the module
@ -354,19 +336,10 @@ Chapter 1. Admin Guide
status (including media status and PSTN status in case of the
gateway). However, CDR-base logging has the option to log existing
information from expired dialogs (the dlg_vars in cdr_extra) Please
see cdr_expired_dlg_enable parameter - Section 6.35,
see cdr_expired_dlg_enable parameter - Section 6.30,
“cdr_expired_dlg_enable (integer)”.
The SQL backend support is compiled in the module. For DIAMETER you
need to enable it by recompiling the module with properly set defines:
uncomment the DDIAM_ACC lines in modules/acc/Makefile.
NOTE: diameter support was developed for DISC (DIameter Server Client
project at http://developer.berlios.de/projects/disc/). This project
seems to be no longer maintained and DIAMETER specifications were
updated in the meantime. Thus, the DIAMETER part in the module is
obsolete and needs rework to be usable with opendiameter or other
DIAMETER servers.
The SQL backend support is compiled in the module.
1.1. General Example
@ -550,7 +523,7 @@ Note
Sometimes, dialogs expire because the UA has a problem and a final
message is never transmitted. You can toggle on/off the generation of
CDR-based logging in such cases with only the dlg_vars showing by using
the cdr_expired_dlg_enable parameter - Section 6.35,
the cdr_expired_dlg_enable parameter - Section 6.30,
“cdr_expired_dlg_enable (integer)”. Default behavior is not logging.
4.2. CDR Extra
@ -565,7 +538,7 @@ Note
* cdr_extra = cdr_extra_definition (';'cdr_extra_definition)*
* cdr_extra_definition = cdr_log_name '=' pseudo_variable
See also Section 6.38, “cdr_extra (string)”.
See also Section 6.33, “cdr_extra (string)”.
The full list of supported pseudo-variables in Sip-Router is available
at: http://sip-router.org/wiki/cookbooks/pseudo-variables/devel
@ -678,29 +651,24 @@ $dlg_var(callee) = $avp(callee); #callee='C'
6.26. acc_time_column (string)
6.27. db_extra (string)
6.28. db_insert_mode (integer)
6.29. diameter_flag (integer)
6.30. diameter_missed_flag (integer)
6.31. diameter_client_host (string)
6.32. diameter_client_port (int)
6.33. diameter_extra (string)
6.34. cdr_enable (integer)
6.35. cdr_expired_dlg_enable (integer)
6.36. cdr_start_on_confirmed (integer)
6.37. cdr_facility (integer)
6.38. cdr_extra (string)
6.39. cdr_extra_nullable (integer)
6.40. cdr_start_id (string)
6.41. cdr_end_id (string)
6.42. cdr_duration_id (string)
6.43. cdr_log_enable (int)
6.44. cdrs_table (str)
6.45. time_mode (int)
6.46. time_attr (str)
6.47. time_exten (str)
6.48. time_format (str)
6.49. reason_from_hf (int)
6.50. clone_msg (int)
6.51. cdr_on_failed (int)
6.29. cdr_enable (integer)
6.30. cdr_expired_dlg_enable (integer)
6.31. cdr_start_on_confirmed (integer)
6.32. cdr_facility (integer)
6.33. cdr_extra (string)
6.34. cdr_extra_nullable (integer)
6.35. cdr_start_id (string)
6.36. cdr_end_id (string)
6.37. cdr_duration_id (string)
6.38. cdr_log_enable (int)
6.39. cdrs_table (str)
6.40. time_mode (int)
6.41. time_attr (str)
6.42. time_exten (str)
6.43. time_format (str)
6.44. reason_from_hf (int)
6.45. clone_msg (int)
6.46. cdr_on_failed (int)
6.1. early_media (integer)
@ -849,6 +817,13 @@ modparam("acc", "log_flag", 2)
6.11. log_missed_flag (integer)
Request flag which needs to be set to account missed calls via syslog.
This can be used to e.g. account failures during the call setup phase
from the callee side, for example if you do forking to several
destinations.
Keep in mind that this flag is reset after processing. Therefore it is
necessary to set it again e.g. in a failure_route if you do serial
forking and want to log all attempts.
Default value is not-set (no flag).
@ -1066,89 +1041,29 @@ modparam("acc", "db_extra", "ct=$hdr(Content-type); email=$avp(s:email)")
modparam("acc", "db_insert_mode", 1)
...
6.29. diameter_flag (integer)
Request flag which needs to be set to account a transaction -- DIAMETER
specific.
Default value is not-set (no flag).
Example 1.29. diameter_flag example
...
modparam("acc", "diameter_flag", 2)
...
6.30. diameter_missed_flag (integer)
Request flag which needs to be set to account missed calls -- DIAMETER
specific.
Default value is not-set (no flag).
Example 1.30. diameter_missed_flag example
...
modparam("acc", "diameter_missed_flag", 3)
...
6.31. diameter_client_host (string)
Hostname of the machine where the DIAMETER Client is running --
DIAMETER specific.
Default value is “localhost”.
Example 1.31. diameter_client_host example
...
modparam("acc", "diameter_client_host", "3a_server.net")
...
6.32. diameter_client_port (int)
Port number where the Diameter Client is listening -- DIAMETER
specific.
Default value is 3000.
Example 1.32. diameter_client_host example
...
modparam("acc", "diameter_client_port", 3000)
...
6.33. diameter_extra (string)
Extra values to be logged via DIAMETER - DIAMETER specific. See section
Section 2, “Extra accounting” for more details.
Default value is NULL.
Example 1.33. diameter_extra example
...
modparam("acc", "diameter_extra", "7846=$hdr(Content-type);7847=$avp(s:email)")
...
6.34. cdr_enable (integer)
6.29. cdr_enable (integer)
Should CDR-based logging be enabled?
0 - off (default). 1 - on.
Example 1.34. cdr_enable example
Example 1.29. cdr_enable example
...
modparam("acc", "cdr_enable", 1)
...
6.35. cdr_expired_dlg_enable (integer)
6.30. cdr_expired_dlg_enable (integer)
Should CDR-based logging be enabled in case of expired dialogs?
0 - off (default). 1 - on.
Example 1.35. cdr_expired_dlg_enable example
Example 1.30. cdr_expired_dlg_enable example
...
modparam("acc", "cdr_expired_dlg_enable", 1)
...
6.36. cdr_start_on_confirmed (integer)
6.31. cdr_start_on_confirmed (integer)
Should the start time be taken from the time when the dialog is
created, or when the dialog is confirmed?
@ -1156,36 +1071,36 @@ modparam("acc", "cdr_expired_dlg_enable", 1)
0 - use time of dialog creation (default). 1 - use time of dialog
confirmation.
Example 1.36. cdr_start_on_confirmed example
Example 1.31. cdr_start_on_confirmed example
...
modparam("acc", "cdr_start_on_confirmed", 1)
...
6.37. cdr_facility (integer)
6.32. cdr_facility (integer)
Log facility to which CDR messages are issued to syslog. This allows to
easily seperate CDR-specific logging from the other log messages.
Default value is LOG_DAEMON.
Example 1.37. cdr_facility example
Example 1.32. cdr_facility example
...
modparam("acc", "cdr_facility", "LOG_DAEMON")
...
6.38. cdr_extra (string)
6.33. cdr_extra (string)
Set of pseudo-variables defining custom CDR fields. See Section 4.2,
“CDR Extra” for more details.
Default value is NULL.
Example 1.38. cdr_extra example
Example 1.33. cdr_extra example
...
modparam("acc", "cdr_extra", "c1=$dlg_var(caller);c2=$dlg_var(callee)"
...
6.39. cdr_extra_nullable (integer)
6.34. cdr_extra_nullable (integer)
Should custom CDR fields be saved as NULL?
@ -1196,67 +1111,67 @@ modparam("acc", "cdr_extra", "c1=$dlg_var(caller);c2=$dlg_var(callee)"
Default value is 0.
Example 1.39. cdr_extra_nullable example
Example 1.34. cdr_extra_nullable example
...
modparam("acc", "cdr_extra_nullable", 1)
...
6.40. cdr_start_id (string)
6.35. cdr_start_id (string)
Modifying the id which is used to store the start time.
Default value is 'start_time'
Example 1.40. cdr_start_id example
Example 1.35. cdr_start_id example
...
modparam("acc", "cdr_start_id", "start")
...
6.41. cdr_end_id (string)
6.36. cdr_end_id (string)
Modifying the id which is used to store the end time.
Default value is 'end_time'
Example 1.41. cdr_end_id example
Example 1.36. cdr_end_id example
...
modparam("acc", "cdr_end_id", "end")
...
6.42. cdr_duration_id (string)
6.37. cdr_duration_id (string)
Modify the id which is used to store the duration.
Default value is 'duration'
Example 1.42. cdr_duration_id example
Example 1.37. cdr_duration_id example
...
modparam("acc", "cdr_duration_id", "d")
...
6.43. cdr_log_enable (int)
6.38. cdr_log_enable (int)
Control if CDR-based accounting should be written to syslog.
0 - off. 1 - on (default).
Example 1.43. cdr_log_enable example
Example 1.38. cdr_log_enable example
...
modparam("acc", "cdr_log_enable", 0)
...
6.44. cdrs_table (str)
6.39. cdrs_table (str)
Name of db table to store dialog-based CDRs.
Default value is "" (no db storage for dialog-based CDRs).
Example 1.44. cdrs_table example
Example 1.39. cdrs_table example
...
modparam("acc", "cdrs_table", "acc_cdrs")
...
6.45. time_mode (int)
6.40. time_mode (int)
Store additional value related to the time of event.
@ -1270,12 +1185,12 @@ modparam("acc", "cdrs_table", "acc_cdrs")
* 4 - save formatted time according to time_format parameter, using
the output of gmtime(). Used for cdr entries too.
Example 1.45. time_mode example
Example 1.40. time_mode example
...
modparam("acc", "time_mode", 1)
...
6.46. time_attr (str)
6.41. time_attr (str)
Name of the syslog attribute or database column where to store
additional value related to the time of event.
@ -1291,35 +1206,35 @@ modparam("acc", "time_mode", 1)
value is already unix timestamp, but in db accounting time value is
datetime and requires a function to get the timestamp.
Example 1.46. time_attr example
Example 1.41. time_attr example
...
modparam("acc", "time_attr", "seconds")
...
6.47. time_exten (str)
6.42. time_exten (str)
Name of the syslog attribute or database column where to store extended
value related to the time of event.
It is used now only for time_mode=1 and database column has to be int:
Example 1.47. time_exten example
Example 1.42. time_exten example
...
modparam("acc", "time_exten", "microsecs")
...
6.48. time_format (str)
6.43. time_format (str)
Specify the format to print the time for time_mode 3 or 4.
Default value is %Y-%m-%d %H:%M:%S".
Example 1.48. time_format example
Example 1.43. time_format example
...
modparam("acc", "time_format", "%Y/%m/%d %H:%M:%S")
...
6.49. reason_from_hf (int)
6.44. reason_from_hf (int)
Tells where to take sip_reason from. If value is 0, sip_reason is taken
from status line. Otherwise, sip_reason is taken from Reason header
@ -1327,12 +1242,12 @@ modparam("acc", "time_format", "%Y/%m/%d %H:%M:%S")
Default value is 0.
Example 1.49. reason_from_hf
Example 1.44. reason_from_hf
...
modparam("acc", "reason_from_hf", 1)
...
6.50. clone_msg (int)
6.45. clone_msg (int)
If set to 1, request structure from transaction is cloned temporarily
in the callback to get acc attributes. It is required if you account
@ -1343,12 +1258,12 @@ modparam("acc", "reason_from_hf", 1)
Default value is 1.
Example 1.50. clone_msg
Example 1.45. clone_msg
...
modparam("acc", "clone_msg", 0)
...
6.51. cdr_on_failed (int)
6.46. cdr_on_failed (int)
If set to 1, the module stores the CDR for a failed dialog (calls not
answered). If set to 0, those records are not stored, only those for
@ -1356,7 +1271,7 @@ modparam("acc", "clone_msg", 0)
Default value is 1.
Example 1.51. cdr_on_failed
Example 1.46. cdr_on_failed
...
modparam("acc", "cdr_on_failed", 0)
...
@ -1381,7 +1296,7 @@ modparam("acc", "cdr_on_failed", 0)
This function can be used from ANY_ROUTE.
Example 1.52. acc_log_request usage
Example 1.47. acc_log_request usage
...
acc_log_request("Some comment");
$var(code) = 404;
@ -1403,7 +1318,7 @@ acc_log_request("$var(code) Error: $avp(reason)");
This function can be used from ANY_ROUTE.
Example 1.53. acc_db_request usage
Example 1.48. acc_db_request usage
...
acc_db_request("Some comment", "SomeTable");
acc_db_request("Some comment", "acc_$time(year)_$time(mon)");
@ -1427,7 +1342,7 @@ acc_db_request("$var(code) Error: $avp(reason)", "SomeTable");
This function can be used from ANY_ROUTE.
Example 1.54. acc_db_request usage
Example 1.49. acc_db_request usage
...
acc_request("100 Received", "acc");
acc_request("100 Received", "acc_$time(year)_$time(mon)");
@ -1445,7 +1360,7 @@ acc_db_request("$var(code) $avp(reason)", "acc");
This function can be used from ANY_ROUTE.
Example 1.55. acc_diam_request usage
Example 1.50. acc_diam_request usage
...
acc_diam_request("Some comment");
acc_diam_request("$var(code) Error: $avp(reason)");
@ -1464,52 +1379,52 @@ Chapter 2. Frequently Asked Questions
2.1.
What happened with old log_fmt parameter
What happened with old log_fmt parameter
The parameter became obsolete with the restructure of the data logged
by ACC module (refer to the Overview chapter). For similar behaviour
you can use the extra accounting (see the corresponding chapter).
The parameter became obsolete with the restructure of the data logged
by ACC module (refer to the Overview chapter). For similar behaviour
you can use the extra accounting (see the corresponding chapter).
2.2.
What happened with old multi_leg_enabled parameter
What happened with old multi_leg_enabled parameter
The parameter became obsolete by the addition of the new multi_leg_info
parameter. The multi-leg accounting is automatically enabled when
multi_leg_info is defined.
The parameter became obsolete by the addition of the new multi_leg_info
parameter. The multi-leg accounting is automatically enabled when
multi_leg_info is defined.
2.3.
What happened with old src_leg_avp_id and dst_leg_avp_id parameters
What happened with old src_leg_avp_id and dst_leg_avp_id parameters
The parameter was replaced by the more generic new parameter
multi_leg_info. This allows logging (per-leg) of more information than
just dst and src.
The parameter was replaced by the more generic new parameter
multi_leg_info. This allows logging (per-leg) of more information than
just dst and src.
2.4.
Where can I find more about Kamailio?
Where can I find more about Kamailio?
Take a look at https://www.kamailio.org/.
Take a look at https://www.kamailio.org/.
2.5.
Where can I post a question about this module?
Where can I post a question about this module?
First at all check if your question was already answered on one of our
mailing lists:
* User Mailing List -
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
* Developer Mailing List -
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
First at all check if your question was already answered on one of our
mailing lists:
* User Mailing List -
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
* Developer Mailing List -
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
E-mails regarding any stable Kamailio release should be sent to
<sr-users@lists.kamailio.org> and e-mails regarding development
versions should be sent to <sr-dev@lists.kamailio.org>.
E-mails regarding any stable Kamailio release should be sent to
<sr-users@lists.kamailio.org> and e-mails regarding development
versions should be sent to <sr-dev@lists.kamailio.org>.
2.6.
How can I report a bug?
How can I report a bug?
Please follow the guidelines provided at:
https://github.com/kamailio/kamailio/issues.
Please follow the guidelines provided at:
https://github.com/kamailio/kamailio/issues.

@ -18,15 +18,15 @@
<title>Overview</title>
<para>
ACC module is used to account transactions information to different
backends like syslog and <abbrev>SQL</abbrev>. With the separate module,
<acronym>radius</acronym> support is enabled.
backends like syslog and <abbrev>SQL</abbrev>. With the separate module
<quote>acc_radius</quote> support for <acronym>radius</acronym> is enabled.
</para>
<para>
There is some very early support of
the <acronym>Diameter</acronym> protocol in the code which is no longer included
by default and will be deleted in coming releases.
This support is not up to date with the current Diameter protocols and
is disabled. If you need Diameter support, please use the <acronym>ims_charging</acronym> module.
There is some very early support of the <acronym>Diameter</acronym>
protocol in the <quote>acc_diameter</quote> module which will be deleted
in coming releases. This support is not up to date with the current
Diameter protocols. If you need Diameter support, please use the
<acronym>ims_charging</acronym> module.
</para>
<para>
To account a transaction and to choose which set of backends to be
@ -104,18 +104,8 @@
</itemizedlist>
</para>
<para>
The SQL backend support is compiled in the module. For
DIAMETER you need to enable it by recompiling the module with properly
set defines: uncomment the DDIAM_ACC lines in
modules/acc/Makefile.
The SQL backend support is compiled in the module.
</para>
<para>
NOTE: diameter support was developed for DISC (DIameter Server Client
project at http://developer.berlios.de/projects/disc/). This project
seems to be no longer maintained and DIAMETER specifications were updated
in the meantime. Thus, the DIAMETER part in the module is obsolete and
needs rework to be usable with opendiameter or other DIAMETER servers.
</para>
<section>
<title>General Example</title>
<programlisting format="linespecific">
@ -688,6 +678,14 @@ modparam("acc", "log_flag", 2)
<title><varname>log_missed_flag</varname> (integer)</title>
<para>
Request flag which needs to be set to account missed calls via syslog.
This can be used to e.g. account failures during the call setup phase
from the callee side, for example if you do forking to several
destinations.
</para>
<para>
Keep in mind that this flag is reset after processing. Therefore it is
necessary to set it again e.g. in a failure_route if you do serial
forking and want to log all attempts.
</para>
<para>
Default value is not-set (no flag).
@ -1011,97 +1009,6 @@ modparam("acc", "db_extra", "ct=$hdr(Content-type); email=$avp(s:email)")
...
modparam("acc", "db_insert_mode", 1)
...
</programlisting>
</example>
</section>
<!-- DIAMETER specific ACC parameters -->
<section id="acc.p.diameter_flag">
<title><varname>diameter_flag</varname> (integer)</title>
<para>
Request flag which needs to be set to account a
transaction -- DIAMETER specific.
</para>
<para>
Default value is not-set (no flag).
</para>
<example>
<title>diameter_flag example</title>
<programlisting format="linespecific">
...
modparam("acc", "diameter_flag", 2)
...
</programlisting>
</example>
</section>
<section id="acc.p.diameter_missed_flag">
<title><varname>diameter_missed_flag</varname> (integer)</title>
<para>
Request flag which needs to be set to account missed
calls -- DIAMETER specific.
</para>
<para>
Default value is not-set (no flag).
</para>
<example>
<title>diameter_missed_flag example</title>
<programlisting format="linespecific">
...
modparam("acc", "diameter_missed_flag", 3)
...
</programlisting>
</example>
</section>
<section id="acc.p.diameter_client_host">
<title><varname>diameter_client_host</varname> (string)</title>
<para>
Hostname of the machine where the DIAMETER Client is
running -- DIAMETER specific.
</para>
<para>
Default value is <quote>localhost</quote>.
</para>
<example>
<title>diameter_client_host example</title>
<programlisting format="linespecific">
...
modparam("acc", "diameter_client_host", "3a_server.net")
...
</programlisting>
</example>
</section>
<section id="acc.p.diameter_client_port">
<title><varname>diameter_client_port</varname> (int)</title>
<para>
Port number where the Diameter Client is
listening -- DIAMETER specific.
</para>
<para>
Default value is 3000.
</para>
<example>
<title>diameter_client_host example</title>
<programlisting format="linespecific">
...
modparam("acc", "diameter_client_port", 3000)
...
</programlisting>
</example>
</section>
<section id="acc.p.diameter_extra">
<title><varname>diameter_extra</varname> (string)</title>
<para>
Extra values to be logged via DIAMETER - DIAMETER specific.
See section <xref linkend="acc.i.extra-accounting"/> for more details.
</para>
<para>
Default value is NULL.
</para>
<example>
<title>diameter_extra example</title>
<programlisting format="linespecific">
...
modparam("acc", "diameter_extra", "7846=$hdr(Content-type);7847=$avp(s:email)")
...
</programlisting>
</example>
</section>

@ -16,7 +16,7 @@ PYTHON3_LIBDIR=${shell ${PYTHON3} -c "import distutils.sysconfig;print(distutils
PYTHON3_LDFLAGS=${shell ${PYTHON3} -c "import distutils.sysconfig;print(distutils.sysconfig.get_config_var('LINKFORSHARED'))"}
PYTHON3_INCDIR=${shell ${PYTHON3} -c "import distutils.sysconfig;print(distutils.sysconfig.get_python_inc())"}
LIBS=${shell ${PYTHON3}-config --libs}
LIBS=${shell ${PYTHON3}-config --ldflags}
ifeq ($(OS), freebsd)
LIBS+=-pthread

@ -34,7 +34,7 @@ Daniel-Constantin Mierla
5. RPC Commands
5.1. app_ruby.reload
5.2. ruby_jsdt.api_list
5.2. app_ruby.api_list
6. Example of usage
@ -64,7 +64,7 @@ Chapter 1. Admin Guide
5. RPC Commands
5.1. app_ruby.reload
5.2. ruby_jsdt.api_list
5.2. app_ruby.api_list
6. Example of usage
@ -140,7 +140,7 @@ ruby_run("rb_funcx", "$rU", "2");
5. RPC Commands
5.1. app_ruby.reload
5.2. ruby_jsdt.api_list
5.2. app_ruby.api_list
5.1. app_ruby.reload
@ -157,11 +157,11 @@ ruby_run("rb_funcx", "$rU", "2");
kamcmd app_ruby.reload
...
5.2. ruby_jsdt.api_list
5.2. app_ruby.api_list
List the functions available via Kemi framework.
Name: ruby_jsdt.api_list
Name: app_ruby.api_list
Parameters: none

@ -758,7 +758,8 @@ VALUE sr_kemi_ruby_exec_func(ksr_ruby_context_t *R, int eidx, int argc,
LM_DBG("executing %p eidx %d\n", ket, eidx);
if(env_R==NULL || env_R->msg==NULL || ket==NULL) {
LM_ERR("invalid ruby environment attributes or parameters\n");
LM_ERR("invalid ruby environment attributes or parameters (%p/%p/%p)\n",
env_R, env_R->msg, ket);
return Qfalse;
}

@ -143,13 +143,13 @@ ruby_run("rb_funcx", "$rU", "2");
</section>
<section id="app_ruby.r.api_list">
<title>
<function moreinfo="none">ruby_jsdt.api_list</function>
<function moreinfo="none">app_ruby.api_list</function>
</title>
<para>
List the functions available via Kemi framework.
</para>
<para>
Name: <emphasis>ruby_jsdt.api_list</emphasis>
Name: <emphasis>app_ruby.api_list</emphasis>
</para>
<para>Parameters: <emphasis>none</emphasis></para>
<para>

@ -36,7 +36,7 @@ struct extra_attr
struct extra_attr *next;
};
#define MAX_EXTRA 4
#define MAX_EXTRA 32
void init_extra_engine(void);

@ -92,6 +92,11 @@ Chapter 1. Admin Guide
also instruct the rating engine to debit the balance for the caller
with the consumed amount. The callcontrol application is available
from http://callcontrol.ag-projects.com/
* At the moment the callcontrol application only supports the old
“MI” interface for communication with Kamailio. This interface is
unfortunately not available anymore in Kamailio. So this
application can't be used right now together with the call_control
module.
* A rating engine that is used to calculate the time limit based on
the caller's credit and the destination price and to debit the
caller's balance after a call ends. This is available as part of

@ -43,6 +43,15 @@
is available from http://callcontrol.ag-projects.com/
</para>
</listitem>
<listitem>
<para>
At the moment the callcontrol application only supports the old
<quote>MI</quote> interface for communication with Kamailio. This
interface is unfortunately not available anymore in Kamailio. So
this application can't be used right now together with the
call_control module.
</para>
</listitem>
<listitem>
<para>
A rating engine that is used to calculate the time limit based on

@ -28,7 +28,7 @@ int call_obj_end = 0;
/* module commands */
static cmd_export_t cmds[] = {
{"call_obj_get", (cmd_function)w_call_obj_get, 1, fixup_pvar_null, fixup_free_pvar_null, ANY_ROUTE},
{"call_obj_get", (cmd_function)w_call_obj_get, 1, fixup_pvar_null, 0, ANY_ROUTE},
{"call_obj_free", (cmd_function)w_call_obj_free, 1, fixup_var_str_1, 0, ANY_ROUTE},
{ 0, 0, 0, 0, 0, 0}
};
@ -105,7 +105,7 @@ static void rpc_call_obj_list(rpc_t *rpc, void *ctx)
cobj_elem_t *list = NULL;
int rc = rpc->scan(ctx, "d*d", &duration, &limit);
if (rc != -1 && rc != 2) {
if (rc != 1 && rc != 2) {
rpc->fault(ctx, 400, "requires arguments for duration number (and optionally limit)");
goto clean;
}

@ -114,6 +114,7 @@ int corex_add_alias_subdomains(char* aliasval)
corex_alias_t ta;
corex_alias_t *na;
LM_DBG("try to add alias: %s\n", aliasval);
memset(&ta, 0, sizeof(corex_alias_t));
p = strchr(aliasval, ':');
@ -134,27 +135,38 @@ int corex_add_alias_subdomains(char* aliasval)
} else if((p-aliasval)==4 && strncasecmp(aliasval, "sctp", 4)==0) {
ta.proto = PROTO_SCTP;
} else {
/* use hostname */
ta.alias.s = aliasval;
ta.alias.len = p - aliasval;
/* invalid protocol */
LM_ERR("invalid protocol %.*s", (int) (p-aliasval), aliasval);
goto error;
}
}
if(ta.alias.len==0) {
/* hostname */
p++;
if(p>=aliasval+strlen(aliasval))
ta.alias.s = aliasval + (p-aliasval);
if(p>=aliasval+strlen(aliasval)) {
goto error;
ta.alias.s = p;
}
/* port */
p = strchr(ta.alias.s, ':');
if(p==NULL) {
ta.alias.len = strlen(ta.alias.s);
goto done;
}
ta.alias.len = p - ta.alias.s;
p++;
ta.port = str2s(p, strlen(p), NULL);
} else {
/* hostname */
ta.alias.s = aliasval;
ta.alias.len = p - ta.alias.s;
/* port */
p++;
if(p>=aliasval+strlen(aliasval)) {
goto error;
}
ta.port = str2s(p, strlen(p), NULL);
}
/* port */
p++;
if(p>=aliasval+strlen(aliasval))
goto error;
ta.port = str2s(p, strlen(p), NULL);
done:
if(ta.alias.len==0)
@ -169,6 +181,8 @@ done:
na->next = _corex_alias_list;
_corex_alias_list = na;
LM_DBG("alias: %d:%.*s:%d from value: %s added\n", ta.proto,
ta.alias.len, ta.alias.s, ta.port, aliasval);
return 0;
error:
@ -181,6 +195,8 @@ int corex_check_self(str* host, unsigned short port, unsigned short proto)
{
corex_alias_t *ta;
LM_DBG("check self for: %d:%.*s:%d\n", (int) proto, host->len,
host->s, (int)port);
for(ta=_corex_alias_list; ta; ta=ta->next) {
if(host->len<ta->alias.len)
continue;
@ -191,21 +207,22 @@ int corex_check_self(str* host, unsigned short port, unsigned short proto)
if(host->len==ta->alias.len
&& strncasecmp(host->s, ta->alias.s, host->len)==0) {
/* match domain */
LM_DBG("check self domain match: %d:%.*s:%d\n", (int)ta->port,
ta->alias.len, ta->alias.s, (int)ta->proto);
LM_DBG("check self domain match: %d:%.*s:%d\n", (int)ta->proto,
ta->alias.len, ta->alias.s, (int)ta->port);
return 1;
}
if(strncasecmp(ta->alias.s, host->s + host->len - ta->alias.len,
ta->alias.len)==0) {
if(host->s[host->len - ta->alias.len - 1]=='.') {
/* match sub-domain */
LM_DBG("check self sub-domain match: %d:%.*s:%d\n", (int)ta->port,
ta->alias.len, ta->alias.s, (int)ta->proto);
LM_DBG("check self sub-domain match: %d:%.*s:%d\n",
(int)ta->proto, ta->alias.len, ta->alias.s,
(int)ta->port);
return 1;
}
}
}
LM_DBG("no match found\n");
return 0; /* no match */
}

@ -630,6 +630,8 @@ static int ki_set_socket_helper(sip_msg_t *msg, str *ssock, int smode)
ssock->len, ssock->s, smode);
goto error;
}
LM_DBG("trying to set %s-socket to [%.*s] (%d)\n",
(smode==0)?"snd":"rcv", ssock->len, ssock->s, smode);
si = grep_sock_info(&host, (unsigned short)port, (unsigned short)proto);
if (si!=NULL) {
if(smode==0) {

@ -25,7 +25,7 @@ ifeq ($(INSTALL_FLAVOUR),kamailio)
# extra install for kamailio
install-berkeley-scripts: $(bin_prefix)/$(bin_dir)
BERKELEYDBON=yes make -C ../../../utils/kamctl/ install-modules
BERKELEYDBON=yes $(MAKE) -C ../../../utils/kamctl/ install-modules
install-scripts: install-berkeley-scripts

@ -35,7 +35,6 @@
#include <string.h>
#include <mysql.h>
#include <errmsg.h>
#include <mysql_version.h>
#include "../../core/mem/mem.h"
#include "../../core/dprint.h"
#include "../../core/async_task.h"

@ -17,7 +17,7 @@ ifeq ($(INSTALL_FLAVOUR),kamailio)
# extra install for kamailio
install-oracle-scripts: $(bin_prefix)/$(bin_dir)
ORACLEON=yes make -C ../../../utils/kamctl/ install-modules
ORACLEON=yes $(MAKE) -C ../../../utils/kamctl/ install-modules
install-scripts: install-oracle-scripts

@ -10,8 +10,6 @@ Andreas Granig
<agranig@sipwise.com>
Edited by
Alex Balashov
<abalashov@evaristesys.com>
@ -138,7 +136,9 @@ nce/string,server_id/int,connection_id/int,keepalive/int,partition/int
parameter, but it does not need to be related to the table loaded from
Redis server -- for example, if used only for permissions module with
'address' table, then the 'keys' parameter can be specified for
'version' table.
'version' table. However, if it used for a module that inserts or
updates the records in database table, the key for entry must be
defined for that table.
The mappings can be freely defined in the "keys" module parameter,
which is composed of a semi-colon separated list of definitions in the

@ -81,7 +81,9 @@ username/string,domain/string,contact/string,received/string,path/string,expires
parameter, but it does not need to be related to the table loaded
from Redis server -- for example, if used only for permissions module with
'address' table, then the 'keys' parameter can be specified for
'version' table.
'version' table. However, if it used for a module that inserts or
updates the records in database table, the key for entry must be defined for
that table.
</para>
<para>
The mappings can be freely defined in the "keys" module parameter, which is

@ -20,7 +20,7 @@ ifeq ($(INSTALL_FLAVOUR),kamailio)
# extra install for kamailio
install-sqlite-scripts: $(bin_prefix)/$(bin_dir)
SQLITEON=yes make -C ../../../utils/kamctl/ install-modules
SQLITEON=yes $(MAKE) -C ../../../utils/kamctl/ install-modules
install-scripts: install-sqlite-scripts

@ -10,14 +10,10 @@ Ovidiu Sas
<osas@voipembedded.com>
Edited by
Daniel-Constantin Mierla
<miconda@gmail.com>
Edited by
Olle E. Johansson
<oej@edvina.net>
@ -355,7 +351,7 @@ modparam("module_name", "db_url", "text:///path/to/dbtext/database")
Here are definitions for the most important tables as well as a basic
configuration file to use db_text with Kamailio. The table structures
may change in time and you will have to adjust these examples. Check
the source code directory “utils/kamctl/dbtxt/kamailio” for current
the source code directory “utils/kamctl/dbtext/kamailio” for current
definitions.
You have to populate the table 'subscriber' by hand with user profiles

@ -434,7 +434,7 @@ modparam("module_name", "db_url", "text:///path/to/dbtext/database")
Here are definitions for the most important tables as well as a basic
configuration file to use db_text with &kamailio;. The table structures
may change in time and you will have to adjust these examples. Check the
source code directory <quote>utils/kamctl/dbtxt/kamailio</quote> for
source code directory <quote>utils/kamctl/dbtext/kamailio</quote> for
current definitions.
</para>
<para>

@ -10,30 +10,20 @@ Daniel-Constantin Mierla
<miconda@gmail.com>
Edited by
Carsten Bock
ng-voice GmbH
Edited by
Olle E. Johansson
Edvina AB
Edited by
Alessandro Arrichiello
Hewlett Packard
Edited by
Luis Martin
Edited by
Julien Chavanton
<jchavanton@gmail.com>
@ -1463,7 +1453,7 @@ kamcmd dispatcher.ping_active 0
Optionally, these fields can be followed by:
* flags - control the mode of using the destination address and
sending keepalives. It is a bitwise value that can be built using
the folowing flags:
the following flags:
+ 1 (bit at index 0 - 1 <<0) - inactive destination
+ 2 (bit at index 1 - 1 <<1) - temporary trying destination (in
the way to become inactive if it does not reply to keepalives
@ -1878,48 +1868,48 @@ Chapter 2. Frequently Asked Questions
2.1.
Does dispatcher provide a fair distribution?
Does dispatcher provide a fair distribution?
The algorithms doing hashing over parts of SIP message don't guarantee
a fair distribution. You should do some measurements to decide what
hashing algorithm fits better in your environment.
The algorithms doing hashing over parts of SIP message don't guarantee
a fair distribution. You should do some measurements to decide what
hashing algorithm fits better in your environment.
Other distribution algorithms such as round robin or call load
dispatching do a fair distribution in terms of delivered calls to
gateways.
Other distribution algorithms such as round robin or call load
dispatching do a fair distribution in terms of delivered calls to
gateways.
2.2.
Is dispatcher dialog stateful?
Is dispatcher dialog stateful?
No. Dispatcher is stateless, although some distribution algorithms are
designed to select same destination for subsequent requests of the same
dialog (e.g., hashing the call-id).
No. Dispatcher is stateless, although some distribution algorithms are
designed to select same destination for subsequent requests of the same
dialog (e.g., hashing the call-id).
2.3.
Where can I find more about Kamailio?
Where can I find more about Kamailio?
Take a look at https://www.kamailio.org/.
Take a look at https://www.kamailio.org/.
2.4.
Where can I post a question about this module?
Where can I post a question about this module?
First at all check if your question was already answered on one of our
mailing lists:
* User Mailing List -
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
* Developer Mailing List -
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
First at all check if your question was already answered on one of our
mailing lists:
* User Mailing List -
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
* Developer Mailing List -
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
E-mails regarding any stable version should be sent to
<sr-users@lists.kamailio.org> and e-mail regarding development versions
or GIT snapshots should be send to <sr-dev@lists.kamailio.org>.
E-mails regarding any stable version should be sent to
<sr-users@lists.kamailio.org> and e-mail regarding development versions
or GIT snapshots should be send to <sr-dev@lists.kamailio.org>.
2.5.
How can I report a bug?
How can I report a bug?
Please follow the guidelines provided at:
https://github.com/kamailio/kamailio/issues
Please follow the guidelines provided at:
https://github.com/kamailio/kamailio/issues

@ -2026,6 +2026,7 @@ int ds_manage_routes(sip_msg_t *msg, ds_select_state_t *rstate)
int i;
unsigned int hash;
ds_set_t *idx = NULL;
int ulast = 0;
if(msg == NULL) {
LM_ERR("bad parameters\n");
@ -2082,6 +2083,7 @@ int ds_manage_routes(sip_msg_t *msg, ds_select_state_t *rstate)
case DS_ALG_ROUNDROBIN: /* 4 - round robin */
hash = idx->last;
idx->last = (idx->last + 1) % idx->nr;
ulast = 1;
break;
case DS_ALG_HASHAUTHUSER: /* 5 - hash auth username */
i = ds_hash_authusername(msg, &hash);
@ -2093,6 +2095,7 @@ int ds_manage_routes(sip_msg_t *msg, ds_select_state_t *rstate)
/* No Authorization found: Use round robin */
hash = idx->last;
idx->last = (idx->last + 1) % idx->nr;
ulast = 1;
break;
default:
LM_ERR("can't get authorization hash\n");
@ -2194,6 +2197,11 @@ int ds_manage_routes(sip_msg_t *msg, ds_select_state_t *rstate)
rstate->emode = 1;
}
/* update last field for next select to point after the current active used */
if(ulast) {
idx->last = (hash + 1) % idx->nr;
}
LM_DBG("selected [%d-%d-%d/%d] <%.*s>\n", rstate->alg, rstate->setid,
rstate->umode, hash,
idx->dlist[hash].uri.len, idx->dlist[hash].uri.s);

@ -1798,7 +1798,7 @@ DEST: {
<listitem>
<para>flags - control the mode of using the destination address and
sending keepalives. It is a bitwise value that can be built using
the folowing flags:
the following flags:
<itemizedlist>
<listitem><para>1 (bit at index 0 - 1 &lt;&lt;0) - inactive destination</para>
</listitem>

@ -204,6 +204,7 @@ void hash_table_free(struct domain_list **hash_table)
shm_free(ap);
ap = next_ap;
}
shm_free(np);
np = np->next;
}

@ -781,7 +781,11 @@ int _evapi_relay(str *evdata, str *ctag, int unicast)
cfg_update();
LM_DBG("dispatching [%p] [%.*s] (%d)\n", emsg,
emsg->data.len, emsg->data.s, emsg->data.len);
evapi_dispatch_notify(emsg);
if(evapi_dispatch_notify(emsg) == 0) {
shm_free(emsg);
LM_WARN("message not delivered - no client connected\n");
return -1;
}
shm_free(emsg);
}
return 0;

@ -282,8 +282,11 @@ int exec_avp(struct sip_msg *msg, char *cmd, pvname_list_p avpl)
i++;
}
if(i == 0)
if(i == 0) {
LM_DBG("no result from %s\n", cmd);
} else {
LM_DBG("%d results from %s\n", i, cmd);
}
/* success */
ret = 1;

@ -11,14 +11,10 @@ Elena-Ramona Modroiu
<ramona@rosdev.ro>
Edited by
Alex Balashov
<abalashov@evaristesys.com>
Edited by
Ovidiu Sas
<osas@voipembedded.com>
@ -590,9 +586,14 @@ modparam("htable", "timer_interval", 10)
3.11. db_expires (integer)
If set to 1, the module will load/save the expires values of the items
If set to 1, the module loads/saves the value for expire of the items
in hash table from/to database. It applies only to hash tables that
have the auto-expires attribute defined.
have the auto-expires attribute defined. If set to 0, only the key name
and the value are loaded, the expires for each item being set to 0.
Note that the module is not reloading automatically the items from
database when they expire, the reloading can be done only via RPC
command.
Default value is 0.

@ -600,9 +600,16 @@ modparam("htable", "timer_interval", 10)
<section id="htable.p.db_expires">
<title><varname>db_expires</varname> (integer)</title>
<para>
If set to 1, the module will load/save the expires values of the items in
hash table from/to database. It applies only to hash tables that
have the auto-expires attribute defined.
If set to 1, the module loads/saves the value for expire of
the items in hash table from/to database. It applies only to hash
tables that have the auto-expires attribute defined. If set to 0,
only the key name and the value are loaded, the expires for each
item being set to 0.
</para>
<para>
Note that the module is not reloading automatically the items from
database when they expire, the reloading can be done only via RPC
command.
</para>
<para>
<emphasis>

@ -588,11 +588,11 @@ int ht_dmq_handle_sync(srjson_doc_t* jdoc) {
if(ht==NULL) {
LM_WARN("unable to get table %.*s\n",
htname.len, (htname.s)?htname.s:"");
}
if (ht_set_cell_ex(ht, &cname, type, &val, 0, expire - now) < 0) {
LM_WARN("unable to set cell %.*s in table %.*s\n",
cname.len, cname.s, ht->name.len, ht->name.s);
} else {
if (ht_set_cell_ex(ht, &cname, type, &val, 0, expire - now) < 0) {
LM_WARN("unable to set cell %.*s in table %.*s\n",
cname.len, cname.s, ht->name.len, ht->name.s);
}
}
}

@ -36,7 +36,7 @@ struct extra_attr
struct extra_attr *next;
};
#define MAX_EXTRA 4
#define MAX_EXTRA 32
void init_extra_engine(void);

@ -148,9 +148,13 @@ static void pdb_msg_dbg(struct pdb_msg msg, char *dbg_msg) {
char buf[PAYLOADSIZE * 3 + 1];
char *ptr = buf;
for (i = 0; i < msg.hdr.length - sizeof(msg.hdr); i++) {
ptr += sprintf(ptr,"%02X ", msg.bdy.payload[i]);
}
if(msg.hdr.length > sizeof(msg.hdr)) {
for (i = 0; i < msg.hdr.length - sizeof(msg.hdr); i++) {
ptr += sprintf(ptr, "%02X ", msg.bdy.payload[i]);
}
} else {
*ptr = '\0';
}
LM_DBG("%s\n"
"version = %d\ntype = %d\ncode = %d\nid = %d\nlen = %d\n"

@ -12,8 +12,6 @@ Edited by
Anca-Maria Vamanu
Edited by
Juha Heinanen
Copyright © 2006 Voice Sistem SRL
@ -92,7 +90,7 @@ Juha Heinanen
7. Events
7.1. present:notify-reply
7.1. presence:notify-reply
8. Installation
@ -234,7 +232,7 @@ Chapter 1. Admin Guide
7. Events
7.1. present:notify-reply
7.1. presence:notify-reply
8. Installation
@ -388,9 +386,9 @@ modparam("presence", "clean_period", 100)
Default value is “0”.
Example 1.6. Set cseq_offset parameter
...
modparam("presence", "cseq_offset", 1)
...
...
modparam("presence", "cseq_offset", 1)
...
3.7. db_update_period (int)
@ -535,9 +533,9 @@ modparam("presence", "max_expires", 3600)
Default value is “0”.
Example 1.16. Set min_expires parameter
...
modparam("presence", "min_expires", 1800)
...
...
modparam("presence", "min_expires", 1800)
...
3.17. min_expires_action (int)
@ -831,9 +829,9 @@ modparam("presence", "retrieve_order_by", "priority, received_time")
Default value is “0”.
Example 1.34. Set sip_uri_match parameter
...
modparam("presence", "sip_uri_match", 1)
...
...
modparam("presence", "sip_uri_match", 1)
...
3.35. enable_dmq (integer)
@ -848,9 +846,9 @@ modparam("presence", "retrieve_order_by", "priority, received_time")
Default value is 0.
Example 1.35. Set enable_dmq parameter
...
modparam("presence", "enable_dmq", 1)
...
...
modparam("presence", "enable_dmq", 1)
...
4. Functions
@ -950,10 +948,10 @@ if (method=="MESSAGE") {
This function can be used from ANY_ROUTE.
Example 1.39. pres_has_subscribers usage
...
if(pres_has_subscribers($var(uri), "message-summary"))
do something...;
...
...
if(pres_has_subscribers($var(uri), "message-summary"))
# do something...;
...
4.5. pres_refresh_watchers(uri, event, type[, file_uri, filename])
@ -1060,7 +1058,7 @@ kamcmd presence.refreshWatchers sip:test@kamailio.org presence 1
Access the attributes of handled subscription. It must be used after a
successful call of “handle_subscription()” or in the following events.
* tm:local-request - before notify is sent
* present:notify-reply - after notify is sent
* presence:notify-reply - after notify is sent
The “attr” can be:
* uri - subscription presentity uri
@ -1100,7 +1098,7 @@ if(handle_subscription())
Access the reply message received when notifying subscriber. It must be
used in the following events.
* present:notify-reply - after notify is sent
* presence:notify-reply - after notify is sent
The “attr” can be any pseudo var that accesses attributes of msg
@ -1114,9 +1112,9 @@ event_route[presence:notify-reply]
7. Events
7.1. present:notify-reply
7.1. presence:notify-reply
7.1. present:notify-reply
7.1. presence:notify-reply
Fired after notify reply is received or timeout.

@ -192,10 +192,10 @@ modparam("presence", "clean_period", 100)
<example>
<title>Set <varname>cseq_offset</varname> parameter</title>
<programlisting format="linespecific">
...
modparam("presence", "cseq_offset", 1)
...
</programlisting>
...
modparam("presence", "cseq_offset", 1)
...
</programlisting>
</example>
</section>
<section id="presence.p.db_update_period">
@ -422,10 +422,10 @@ modparam("presence", "max_expires", 3600)
<example>
<title>Set <varname>min_expires</varname> parameter</title>
<programlisting format="linespecific">
...
modparam("presence", "min_expires", 1800)
...
</programlisting>
...
modparam("presence", "min_expires", 1800)
...
</programlisting>
</example>
</section>
@ -895,10 +895,10 @@ modparam("presence", "retrieve_order_by", "priority, received_time")
<example>
<title>Set <varname>sip_uri_match</varname> parameter</title>
<programlisting format="linespecific">
...
modparam("presence", "sip_uri_match", 1)
...
</programlisting>
...
modparam("presence", "sip_uri_match", 1)
...
</programlisting>
</example>
</section>
@ -922,10 +922,10 @@ modparam("presence", "retrieve_order_by", "priority, received_time")
<example>
<title>Set <varname>enable_dmq</varname> parameter</title>
<programlisting format="linespecific">
...
modparam("presence", "enable_dmq", 1)
...
</programlisting>
...
modparam("presence", "enable_dmq", 1)
...
</programlisting>
</example>
</section>
@ -1087,11 +1087,11 @@ if (method=="MESSAGE") {
<example>
<title><function>pres_has_subscribers</function> usage</title>
<programlisting format="linespecific">
...
if(pres_has_subscribers($var(uri), "message-summary"))
do something...;
...
</programlisting>
...
if(pres_has_subscribers($var(uri), "message-summary"))
# do something...;
...
</programlisting>
</example>
</section>
@ -1208,7 +1208,7 @@ pres_update_watchers("sip:test@kamailio.org", "presence");
...
&kamcmd; presence.cleanup
...
</programlisting>
</programlisting>
</section>
<section id="presence.r.refreshWatchers">
<title>presence.refreshWatchers</title>
@ -1264,7 +1264,7 @@ pres_update_watchers("sip:test@kamailio.org", "presence");
...
&kamcmd; presence.refreshWatchers sip:test@kamailio.org presence 1
...
</programlisting>
</programlisting>
</section>
</section>
@ -1283,7 +1283,7 @@ pres_update_watchers("sip:test@kamailio.org", "presence");
</para>
</listitem>
<listitem>
<para><emphasis>present:notify-reply</emphasis> - after notify is sent
<para><emphasis>presence:notify-reply</emphasis> - after notify is sent
</para>
</listitem>
</itemizedlist>
@ -1399,7 +1399,7 @@ if(handle_subscription())
xlog("presentity=$subs(uri)\n");
}
...
</programlisting>
</programlisting>
</example>
</section>
@ -1410,7 +1410,7 @@ if(handle_subscription())
It must be used in the following events.
<itemizedlist>
<listitem>
<para><emphasis>present:notify-reply</emphasis> - after notify is sent
<para><emphasis>presence:notify-reply</emphasis> - after notify is sent
</para>
</listitem>
</itemizedlist>
@ -1428,7 +1428,7 @@ event_route[presence:notify-reply]
xlog("received message = $notify_reply($mb)\n");
}
...
</programlisting>
</programlisting>
</example>
</section>
</section>
@ -1436,7 +1436,7 @@ event_route[presence:notify-reply]
<section>
<title>Events</title>
<section>
<title><varname>present:notify-reply</varname></title>
<title><varname>presence:notify-reply</varname></title>
<para>
Fired after notify reply is received or timeout.
</para>
@ -1450,7 +1450,7 @@ event_route[presence:notify-reply]
xlog("received message = $notify_reply($mb)\n");
}
...
</programlisting>
</programlisting>
</example>
</section>
</section>

@ -2604,6 +2604,7 @@ int pv_set_force_sock(struct sip_msg* msg, pv_param_t *param,
goto error;
}
val->rs.s[val->rs.len] = backup;
LM_DBG("trying to set send-socket to [%.*s]\n", val->rs.len, val->rs.s);
si = grep_sock_info(&host, (unsigned short)port, (unsigned short)proto);
if (si!=NULL)
{

@ -1232,6 +1232,7 @@ int tr_eval_uri(struct sip_msg *msg, tr_param_t *tp, int subtype,
param_hooks_t phooks;
param_t *pit=NULL;
str sproto;
int dlen = 0;
if(val==NULL || (!(val->flags&PV_VAL_STR)) || val->rs.len<=0)
return -1;
@ -1266,8 +1267,11 @@ int tr_eval_uri(struct sip_msg *msg, tr_param_t *tp, int subtype,
free_params(_tr_uri_params);
_tr_uri_params = 0;
}
if(_tr_uri.len>4 && _tr_uri.s[_tr_uri.len-1]==';') {
dlen = 1;
}
/* parse uri -- params only when requested */
if(parse_uri(_tr_uri.s, _tr_uri.len, &_tr_parsed_uri)!=0)
if(parse_uri(_tr_uri.s, _tr_uri.len - dlen, &_tr_parsed_uri)!=0)
{
LM_ERR("invalid uri [%.*s]\n", val->rs.len,
val->rs.s);
@ -1505,6 +1509,9 @@ int tr_eval_paramlist(struct sip_msg *msg, tr_param_t *tp, int subtype,
/* parse params */
sv = _tr_params_str;
if(sv.len>1 && sv.s[sv.len - 1] == _tr_params_separator) {
sv.len--;
}
if (parse_params2(&sv, CLASS_ANY, &phooks, &_tr_params_list,
_tr_params_separator)<0)
return -1;

@ -35,6 +35,7 @@
#include "../../core/action.h"
#include "../../core/fmsg.h"
#include "../../core/kemi.h"
#include "../../core/receive.h"
#include "../usrloc/usrloc.h"
#include "registrar.h"
#include "common.h"
@ -751,7 +752,7 @@ void reg_ul_expired_contact(ucontact_t* ptr, int type, void* param)
}
}
set_route_type(backup_rt);
ksr_msg_env_reset();
return;
error:
regpv_free_profile(rpp);

@ -10,6 +10,12 @@ NAME=rls.so
ifeq ($(CROSS_COMPILE),)
XML2CFG=$(shell which xml2-config)
ifeq ($(OS), darwin)
ICU_BUILDER = $(shell \
if pkg-config --exists icu-uc; then \
echo 'pkg-config icu-uc'; \
fi)
endif
endif
ifneq ($(XML2CFG),)
@ -21,6 +27,11 @@ else
LIBS+=-L$(LOCALBASE)/lib -lxml2
endif
ifneq ($(ICU_BUILDER),)
DEFS += $(shell $(ICU_BUILDER) --cflags )
LIBS += $(shell $(ICU_BUILDER) --libs)
endif
DEFS+=
SERLIBPATH=../../lib

@ -602,6 +602,8 @@ For rls only:
4.2. rls_handle_notify()
Handle NOTIFY requests.
This function can be used from REQUEST_ROUTE.
Example 1.27. rls_handle_notify usage

@ -97,10 +97,10 @@
</section>
</section>
<section>
<title>Parameters</title>
<section>
<section id="rls.p.db_url">
<title><varname>db_url</varname>(str)</title>
<para>
The database url.
@ -119,7 +119,7 @@ modparam("rls", "db_url", "&exampledb;")
</example>
</section>
<section>
<section id="rls.p.rlpres_db_url">
<title><varname>rlpres_db_url</varname>(str)</title>
<para>
The rlpres (rls_presentity table) database url.
@ -145,7 +145,7 @@ modparam("rls", "rlpres_db_url", "&exampledb;")
</example>
</section>
<section>
<section id="rls.p.xcap_db_url">
<title><varname>xcap_db_url</varname>(str)</title>
<para>
The xcap database url.
@ -166,7 +166,7 @@ modparam("rls", "xcap_db_url", "&exampledb;")
</example>
</section>
<section>
<section id="rls.p.db_mode">
<title><varname>db_mode</varname>(int)</title>
<para>
The module supports 2 modes of operation, high speed memory
@ -188,7 +188,7 @@ modparam("rls", "db_mode", 2)
</example>
</section>
<section>
<section id="rls.p.xcap_table">
<title><varname>xcap_table</varname>(str)</title>
<para>
The name of the xcap table in which the integrated server
@ -209,7 +209,7 @@ modparam("rls", "xcap_table", "xcaps");
</programlisting>
</example>
</section>
<section>
<section id="rls.p.rlsubs_table">
<title><varname>rlsubs_table</varname>(str)</title>
<para>
The name of the db table where resource lists subscription
@ -229,7 +229,7 @@ modparam("rls", "rlsubs_table", "rls_subscriptions")
</example>
</section>
<section>
<section id="rls.p.rlpres_table">
<title><varname>rlpres_table</varname>(str)</title>
<para>
The name of the db table where notified event specific
@ -249,7 +249,7 @@ modparam("rls", "rlpres_table", "rls_notify")
</example>
</section>
<section>
<section id="rls.p.clean_period">
<title><varname>clean_period</varname> (int)</title>
<para>
The period at which to check for expired information.
@ -269,7 +269,7 @@ modparam("rls", "clean_period", 100)
</example>
</section>
<section>
<section id="rls.p.rlpres_clean_period">
<title><varname>rlpres_clean_period</varname> (int)</title>
<para>
The period at which to check for expired rls_presentity information.
@ -293,7 +293,7 @@ modparam("rls", "rlpres_clean_period", 100)
</example>
</section>
<section>
<section id="rls.p.waitn_time">
<title><varname>waitn_time</varname> (int)</title>
<para>
The maximum time period that RLS NOTIFY requests will
@ -316,7 +316,7 @@ modparam("rls", "waitn_time", 10)
</example>
</section>
<section>
<section id="rls.p.notifier_poll_rate">
<title><varname>notifier_poll_rate</varname> (int)</title>
<para>
The number of times per second that the notifier processes
@ -342,7 +342,7 @@ modparam("rls", "notifier_poll_rate", 20)
</example>
</section>
<section>
<section id="rls.p.notifier_processes">
<title><varname>notifier_processes</varname> (int)</title>
<para>
The number of notifier processes that should be started.
@ -365,7 +365,7 @@ modparam("rls", "notifier_processes", 2)
</example>
</section>
<section>
<section id="rls.p.max_expires">
<title><varname>max_expires</varname> (int)</title>
<para>
The maximum accepted expires for a subscription to a list.
@ -384,7 +384,7 @@ modparam("rls", "max_expires", 10800)
</example>
</section>
<section>
<section id="rls.p.expires_offset">
<title><varname>expires_offset</varname> (int)</title>
<para>
This parameter only has an effect when the db_mode is DB_ONLY (mode 2).
@ -410,7 +410,7 @@ modparam("rls", "expires_offset", 0)
</example>
</section>
<section>
<section id="rls.p.hash_size">
<title><varname>hash_size</varname> (int)</title>
<para>
The dimension of the hash table used to store subscription to a list.
@ -430,7 +430,7 @@ modparam("rls", "hash_size", 11)
</example>
</section>
<section>
<section id="rls.p.xcap_root">
<title><varname>xcap_root</varname> (str)</title>
<para>
The address of the xcap server.
@ -449,7 +449,7 @@ modparam("rls", "xcap_root", "http://192.168.2.132/xcap-root:800")
</example>
</section>
<section>
<section id="rls.p.integrated_xcap_server">
<title><varname>integrated_xcap_server</varname> (int)</title>
<para>
This parameter should be set if only integrated xcap servers
@ -469,7 +469,7 @@ modparam("rls", "integrated_xcap_server", 1)
</example>
</section>
<section>
<section id="rls.p.to_presence_code">
<title><varname>to_presence_code</varname> (int)</title>
<para>
The code to be returned by rls_handle_subscribe function
@ -492,7 +492,7 @@ modparam("rls", "to_presence_code", 10)
</example>
</section>
<section>
<section id="rls.p.rls_event">
<title><varname>rls_event</varname> (str)</title>
<para>
The default event that RLS handles is presence. If some other
@ -513,7 +513,7 @@ modparam("rls", "rls_event", "dialog;sla")
</example>
</section>
<section>
<section id="rls.p.outbound_proxy">
<title><varname>outbound_proxy</varname> (str)</title>
<para>
The SIP address where to send RLS subscriptions (outbound
@ -533,7 +533,7 @@ modparam("rls", "outbound_proxy", "sip:presence.kamailio.org")
</example>
</section>
<section>
<section id="rls.p.server_address">
<title><varname>server_address</varname> (str)</title>
<para>
The address of the server that will be used as a contact in sent
@ -550,7 +550,7 @@ modparam("rls", "server_address", "sip:rls@ip.address.ofyour.proxy:5060")
</example>
</section>
<section>
<section id="rls.p.max_notify_body_length">
<title><varname>max_notify_body_length</varname> (int)</title>
<para>
The maximum size that the body of a NOTIFY message may be.
@ -566,7 +566,7 @@ modparam("rls", "max_notify_body_length", 32000)
</programlisting>
</example>
</section>
<section>
<section id="rls.p.fetch_rows">
<title><varname>fetch_rows</varname> (integer)</title>
<para>
Number of rows to be loaded in one step from database.
@ -585,7 +585,7 @@ modparam("rls", "fetch_rows", 1000)
</programlisting>
</example>
</section>
<section>
<section id="rls.p.disable_remote_presence">
<title><varname>disable_remote_presence</varname> (integer)</title>
<para>
When set to a non-zero value RLS will not perform back-end SUBSCRIBEs
@ -611,7 +611,7 @@ modparam("rls", "disable_remote_presence", 1)
</programlisting>
</example>
</section>
<section>
<section id="rls.p.max_backend_subs">
<title><varname>max_backend_subs</varname> (integer)</title>
<para>
When set to a non-zero value RLS will limit the number of back-end
@ -640,7 +640,7 @@ modparam("rls", "max_backend_subs", 30)
<section>
<title>Functions</title>
<section>
<section id="rls.f.rls_handle_subscribe">
<title>
<function moreinfo="none">rls_handle_subscribe([watcher_uri])</function>
</title>
@ -688,12 +688,12 @@ For rls only:
</example>
</section>
<section>
<section id="rls.f.rls_handle_notify">
<title>
<function moreinfo="none">rls_handle_notify()</function>
</title>
<para>
Handle NOTIFY requests.
</para>
<para>
This function can be used from REQUEST_ROUTE.
@ -709,7 +709,7 @@ if(method=="NOTIFY")
</example>
</section>
<section>
<section id="rls.f.rls_update_subs">
<title>
<function moreinfo="none">rls_update_subs(uri, event)</function>
</title>

@ -2643,7 +2643,7 @@ send_rtpp_command(struct rtpp_node *node, bencode_item_t *dict, int *outlen)
static char buf[0x10000];
struct pollfd fds[1];
struct iovec *v;
str out = STR_NULL;
str cmd = STR_NULL;
v = bencode_iovec(dict, &vcnt, 1, 0);
if (!v) {
@ -2708,8 +2708,9 @@ send_rtpp_command(struct rtpp_node *node, bencode_item_t *dict, int *outlen)
len = writev(rtpp_socks[node->idx], v, vcnt + 1);
} while (len == -1 && (errno == EINTR || errno == ENOBUFS));
if (len <= 0) {
bencode_get_str(bencode_dictionary_get(dict, "command"), &out);
LM_ERR("can't send command \"%.*s\" to RTP proxy <%s>\n", out.len, out.s, node->rn_url.s);
bencode_get_str(bencode_dictionary_get(dict, "command"), &cmd);
LM_ERR("can't send command \"%.*s\" to RTP proxy <%s>\n",
cmd.len, cmd.s, node->rn_url.s);
goto badproxy;
}
rtpengine_tout_ms = cfg_get(rtpengine,rtpengine_cfg,rtpengine_tout_ms);
@ -2719,7 +2720,9 @@ send_rtpp_command(struct rtpp_node *node, bencode_item_t *dict, int *outlen)
len = recv(rtpp_socks[node->idx], buf, sizeof(buf)-1, 0);
} while (len == -1 && errno == EINTR);
if (len <= 0) {
LM_ERR("can't read reply for command \"%.*s\" from RTP proxy <%s>\n", out.len, out.s, node->rn_url.s);
bencode_get_str(bencode_dictionary_get(dict, "command"), &cmd);
LM_ERR("can't read reply for command \"%.*s\" from RTP proxy <%s>\n",
cmd.len, cmd.s, node->rn_url.s);
goto badproxy;
}
if (len >= (v[0].iov_len - 1) &&
@ -2736,7 +2739,9 @@ send_rtpp_command(struct rtpp_node *node, bencode_item_t *dict, int *outlen)
}
}
if (i == rtpengine_retr) {
LM_ERR("timeout waiting reply for command \"%.*s\" from RTP proxy <%s>\n", out.len, out.s, node->rn_url.s);
bencode_get_str(bencode_dictionary_get(dict, "command"), &cmd);
LM_ERR("timeout waiting reply for command \"%.*s\" from RTP proxy <%s>\n",
cmd.len, cmd.s, node->rn_url.s);
goto badproxy;
}
}

@ -698,6 +698,10 @@ int check_proxy_require(sip_msg_t* msg) {
}
LM_DBG("checking proxy require failed\n");
if (u) pkg_free(u);
if (msg->proxy_require->parsed) {
free_str_list(msg->proxy_require->parsed);
msg->proxy_require->parsed = NULL;
}
return SANITY_CHECK_FAILED;
}
else {

@ -2187,6 +2187,16 @@ static sr_kemi_t sr_kemi_sdpops_exports[] = {
{ SR_KEMIP_STR, SR_KEMIP_NONE, SR_KEMIP_NONE,
SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
},
{ str_init("sdpops"), str_init("sdp_with_codecs_by_id"),
SR_KEMIP_INT, sdp_with_codecs_by_id,
{ SR_KEMIP_STR, SR_KEMIP_NONE, SR_KEMIP_NONE,
SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
},
{ str_init("sdpops"), str_init("sdp_with_codecs_by_name"),
SR_KEMIP_INT, sdp_with_codecs_by_name,
{ SR_KEMIP_STR, SR_KEMIP_NONE, SR_KEMIP_NONE,
SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
},
{ str_init("sdpops"), str_init("sdp_get"),
SR_KEMIP_INT, ki_sdp_get,
{ SR_KEMIP_STR, SR_KEMIP_NONE, SR_KEMIP_NONE,

@ -339,6 +339,7 @@ static int sipt_get_redirection_number(struct sip_msg *msg, pv_param_t *param, p
str body;
body.s = get_body_part(msg, TYPE_APPLICATION,SUBTYPE_ISUP,&body.len);
sb_s_buf[0] = '\0';
if(body.s == NULL)
{
LM_INFO("No ISUP Message Found");
@ -350,9 +351,9 @@ static int sipt_get_redirection_number(struct sip_msg *msg, pv_param_t *param, p
LM_DBG("message not an ACM or CPG\n");
return -1;
}
isup_get_redirection_number((unsigned char*)body.s, body.len, sb_s_buf);
if (strlen(sb_s_buf) > 0)
{
pv_get_strzval(msg, param, res, sb_s_buf);

@ -41,13 +41,14 @@ static str opt_200_rpl = str_init("OK");
static str opt_500_rpl = str_init("Server internal error");
int opt_reply(struct sip_msg* _msg, char* _foo, char* _bar) {
int ki_opt_reply(struct sip_msg* _msg) {
str rpl_hf;
int offset = 0;
/* check if it is called for an OPTIONS request */
if (_msg->REQ_METHOD!=METHOD_OPTIONS) {
LM_ERR("called for non-OPTIONS request\n");
LM_ERR("called for non-OPTIONS request (%d!=%d)\n",
_msg->REQ_METHOD, METHOD_OPTIONS);
return -1;
}
if(_msg->parsed_uri_ok==0 && parse_sip_msg_uri(_msg)<0)
@ -127,3 +128,6 @@ error:
return 1;
}
int opt_reply(struct sip_msg* _msg, char* _foo, char* _bar) {
return ki_opt_reply(_msg);
}

@ -63,6 +63,7 @@ extern str opt_accept_enc;
extern str opt_accept_lang;
extern str opt_supported;
int ki_opt_reply(struct sip_msg* _msg);
int opt_reply(struct sip_msg* _msg, char* _foo, char* _bar);
#endif

@ -540,6 +540,11 @@ static sr_kemi_t sr_kemi_siputils_exports[] = {
{ SR_KEMIP_STR, SR_KEMIP_STR, SR_KEMIP_NONE,
SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
},
{ str_init("siputils"), str_init("options_reply"),
SR_KEMIP_INT, ki_opt_reply,
{ SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE,
SR_KEMIP_NONE, SR_KEMIP_NONE, SR_KEMIP_NONE }
},
{ {0, 0}, {0, 0}, 0, NULL, { 0, 0, 0, 0, 0, 0 } }
};

@ -340,7 +340,7 @@ event_route[tcp:closed] {
Example 1.9. tcp_get_conid usage
...
if(tcp_conid_alive("127.0.0.1:5060", "$var(conid)")) {
if(tcp_get_conid("127.0.0.1:5060", "$var(conid)")) {
xlog("connection id is: $var(conid)\n");
}
...

@ -287,7 +287,7 @@ event_route[tcp:closed] {
<title><function>tcp_get_conid</function> usage</title>
<programlisting><![CDATA[
...
if(tcp_conid_alive("127.0.0.1:5060", "$var(conid)")) {
if(tcp_get_conid("127.0.0.1:5060", "$var(conid)")) {
xlog("connection id is: $var(conid)\n");
}
...

@ -148,7 +148,8 @@ Daniel-Constantin Mierla
6. Event Routes
6.1. event_route[tm:branch-failure]
6.2. event_route[tm:local-response]
6.2. event_route[tm:local-request]
6.3. event_route[tm:local-response]
7. TM Module API
@ -265,7 +266,8 @@ Daniel-Constantin Mierla
1.93. t_is_retr_async_reply usage
1.94. t_uac_send usage
1.95. event_route[tm:branch-failure] usage
1.96. event_route[tm:local-response] usage
1.96. event_route[tm:local-request] usage
1.97. event_route[tm:local-response] usage
Chapter 1. Admin Guide
@ -395,7 +397,8 @@ Chapter 1. Admin Guide
6. Event Routes
6.1. event_route[tm:branch-failure]
6.2. event_route[tm:local-response]
6.2. event_route[tm:local-request]
6.3. event_route[tm:local-response]
7. TM Module API
@ -2946,7 +2949,8 @@ t_uac_send("OPTIONS", "sip:alice@kamailio.org", "", "",
6. Event Routes
6.1. event_route[tm:branch-failure]
6.2. event_route[tm:local-response]
6.2. event_route[tm:local-request]
6.3. event_route[tm:local-response]
6.1. event_route[tm:branch-failure]
@ -2971,12 +2975,25 @@ event_route[tm:branch-failure:myroute] {
}
...
6.2. event_route[tm:local-response]
6.2. event_route[tm:local-request]
Executed after the tm module has sent a local generated, transaction
stateful request.
Example 1.96. event_route[tm:local-request] usage
...
event_route [tm:local-request] {
xlog("L_INFO", "Routing locally generated $rm to $ru\n");
t_set_fr(10000, 10000);
}
...
6.3. event_route[tm:local-response]
Executed after the tm module has sent a local generated, transaction
stateful response.
Example 1.96. event_route[tm:local-response] usage
Example 1.97. event_route[tm:local-response] usage
...
event_route[tm:local-response] {
xlog("tm:local-response replied locally\n");

@ -39,6 +39,25 @@ event_route[tm:branch-failure:myroute] {
</programlisting>
</example>
</section>
<section id="tm.e.local-request">
<title>
<function moreinfo="none">event_route[tm:local-request]</function>
</title>
<para>
Executed after the tm module has sent a local generated, transaction stateful request.
</para>
<example>
<title><function>event_route[tm:local-request]</function> usage</title>
<programlisting format="linespecific">
...
event_route [tm:local-request] {
xlog("L_INFO", "Routing locally generated $rm to $ru\n");
t_set_fr(10000, 10000);
}
...
</programlisting>
</example>
</section>
<section id="tm.e.local-response">
<title>
<function moreinfo="none">event_route[tm:local-response]</function>

@ -199,7 +199,7 @@ static int prepare_new_uac( struct cell *t, struct sip_msg *i_req,
i_req->add_rm = dup_lump_list(i_req->add_rm);
if (unlikely(i_req->add_rm==0)){
ret=E_OUT_OF_MEM;
goto error04;
goto error05;
}
}
if (unlikely(i_req->body_lumps)){
@ -593,12 +593,15 @@ error03:
/* Delete the duplicated lump lists, this will also delete
* all lumps created here, such as lumps created in per-branch
* routing sections, Via, and Content-Length headers created in
* build_req_buf_from_sip_req
* build_req_buf_from_sip_req().
*/
free_duped_lump_list(i_req->body_lumps);
error04:
free_duped_lump_list(i_req->add_rm);
free_duped_lump_list(i_req->body_lumps);
/* Restore the lists from backups */
error05:
/* Restore the lists from backups. */
i_req->add_rm = add_rm_backup;
i_req->body_lumps = body_lumps_backup;

@ -589,7 +589,8 @@ error2:
if (is_ack) {
free_cell(new_cell);
} else {
if(atomic_get_int(&new_cell->ref_count)==0) {
if((new_cell->next_c == 0 && new_cell->prev_c == 0)
|| (atomic_get_int(&new_cell->ref_count)==0)) {
free_cell(new_cell);
} else {
UNREF_FREE(new_cell, 0);

@ -197,7 +197,11 @@ modparam("topos", "branch_expire", 300)
3.6. dialog_expire (int)
Interval in seconds after which the dialog records are deleted.
Interval in seconds after which the dialog records are deleted. Keep in
mind that the module does not update the dialog timestamp after the
initial call setup on re-INVITEs or other in-dialog messages. So set a
large enough value (according your longest call duration) to prevent
problems in re-writing messages.
Default value is 10800 (3 hours).

@ -192,6 +192,10 @@ modparam("topos", "branch_expire", 300)
<title><varname>dialog_expire</varname> (int)</title>
<para>
Interval in seconds after which the dialog records are deleted.
Keep in mind that the module does not update the dialog timestamp
after the initial call setup on re-INVITEs or other in-dialog
messages. So set a large enough value (according your longest call
duration) to prevent problems in re-writing messages.
</para>
<para>
<emphasis>

@ -403,8 +403,9 @@ modparam("uac","credential","username:domain:password")
This can be used if the realm upstream will be using is not known in
advance.
If you define it, you also need to define “auth_username_avp” (???) and
“auth_username_avp” (???).
If you define it, you also need to define “auth_username_avp”
(Section 3.10, “auth_username_avp (string)”) and “auth_password_avp”
(Section 3.11, “auth_password_avp (string)”).
Example 1.9. Set auth_realm_avp parameter
...
@ -416,8 +417,9 @@ modparam("uac","auth_realm_avp","$avp(i:10)")
The definition of an AVP that might contain the username to be used to
perform authentication.
If you define it, you also need to define “auth_realm_avp” (???) and
“auth_username_avp” (???).
If you define it, you also need to define “auth_realm_avp”
(Section 3.9, “auth_realm_avp (string)”) and “auth_password_avp”
(Section 3.11, “auth_password_avp (string)”).
Example 1.10. Set auth_username_avp parameter
...
@ -429,8 +431,9 @@ modparam("uac","auth_username_avp","$avp(i:11)")
The definition of an AVP that might contain the password to be used to
perform authentication.
If you define it, you also need to define “auth_password_avp” (???) and
“auth_username_avp” (???).
If you define it, you also need to define “auth_realm_avp”
(Section 3.9, “auth_realm_avp (string)”) and “auth_username_avp”
(Section 3.10, “auth_username_avp (string)”).
Example 1.11. Set auth_password_avp parameter
...
@ -810,7 +813,7 @@ if(uac_reg_request_to("$fU", 0))
failure_route[REMOTE_AUTH] {
if ($T_reply_code == 401 or $T_reply_code == 407) {
xlog("L_NOTICE", "Remote asked for authentication");
uac_auth()
uac_auth();
}
}
...
@ -934,6 +937,7 @@ event_route[uac:reply] {
Example 1.36. uac.reg_info usage
...
kamcmd uac.reg_info l_uuid account123
kamcmd uac.reg_info l_uuid s:12345678
...
8.3. uac.reg_enable
@ -947,6 +951,7 @@ event_route[uac:reply] {
Example 1.37. uac.reg_enable usage
...
kamcmd uac.reg_enable l_uuid account123
kamcmd uac.reg_enable l_uuid s:12345678
...
8.4. uac.reg_disable
@ -960,6 +965,7 @@ event_route[uac:reply] {
Example 1.38. uac.reg_disable usage
...
kamcmd uac.reg_disable l_uuid account123
kamcmd uac.reg_disable l_uuid s:12345678
...
8.5. uac.reg_reload
@ -980,6 +986,7 @@ event_route[uac:reply] {
Example 1.40. uac.reg_refresh usage
...
kamcmd uac.reg_refresh account123
kamcmd uac.reg_refresh s:12345678
...
8.7. uac.reg_active

@ -326,9 +326,9 @@ modparam("uac","credential","username:domain:password")
<para><emphasis>
If you define it, you also need to define
<quote>auth_username_avp</quote>
(<xref linkend="uac.p.auth-username-avp-id"/>) and
<quote>auth_username_avp</quote>
(<xref linkend="uac.p.auth-password-avp-id"/>).
(<xref linkend="uac.p.auth_username_avp"/>) and
<quote>auth_password_avp</quote>
(<xref linkend="uac.p.auth_password_avp"/>).
</emphasis></para>
<example>
<title>Set <varname>auth_realm_avp</varname> parameter</title>
@ -348,9 +348,9 @@ modparam("uac","auth_realm_avp","$avp(i:10)")
<para><emphasis>
If you define it, you also need to define
<quote>auth_realm_avp</quote>
(<xref linkend="uac.p.auth-realm-avp-id"/>) and
<quote>auth_username_avp</quote>
(<xref linkend="uac.p.auth-password-avp-id"/>).
(<xref linkend="uac.p.auth_realm_avp"/>) and
<quote>auth_password_avp</quote>
(<xref linkend="uac.p.auth_password_avp"/>).
</emphasis></para>
<example>
<title>Set <varname>auth_username_avp</varname> parameter</title>
@ -369,10 +369,10 @@ modparam("uac","auth_username_avp","$avp(i:11)")
</para>
<para><emphasis>
If you define it, you also need to define
<quote>auth_password_avp</quote>
(<xref linkend="uac.p.auth-password-avp-id"/>) and
<quote>auth_realm_avp</quote>
(<xref linkend="uac.p.auth_realm_avp"/>) and
<quote>auth_username_avp</quote>
(<xref linkend="uac.p.auth-password-avp-id"/>).
(<xref linkend="uac.p.auth_username_avp"/>).
</emphasis></para>
<example>
<title>Set <varname>auth_password_avp</varname> parameter</title>
@ -925,7 +925,7 @@ if(uac_reg_request_to("$fU", 0))
failure_route[REMOTE_AUTH] {
if ($T_reply_code == 401 or $T_reply_code == 407) {
xlog("L_NOTICE", "Remote asked for authentication");
uac_auth()
uac_auth();
}
}
...
@ -1113,6 +1113,7 @@ event_route[uac:reply] {
<programlisting format="linespecific">
...
kamcmd uac.reg_info l_uuid account123
kamcmd uac.reg_info l_uuid s:12345678
...
</programlisting>
</example>
@ -1134,6 +1135,7 @@ event_route[uac:reply] {
<programlisting format="linespecific">
...
kamcmd uac.reg_enable l_uuid account123
kamcmd uac.reg_enable l_uuid s:12345678
...
</programlisting>
</example>
@ -1155,6 +1157,7 @@ event_route[uac:reply] {
<programlisting format="linespecific">
...
kamcmd uac.reg_disable l_uuid account123
kamcmd uac.reg_disable l_uuid s:12345678
...
</programlisting>
</example>
@ -1191,6 +1194,7 @@ event_route[uac:reply] {
<programlisting format="linespecific">
...
kamcmd uac.reg_refresh account123
kamcmd uac.reg_refresh s:12345678
...
</programlisting>
</example>

@ -622,6 +622,7 @@ int restore_uri( struct sip_msg *msg, str *rr_param, str* restore_avp,
}
old_body = (struct to_body*) msg->to->parsed;
flag = FL_USE_UAC_TO;
LM_DBG("replacing in To header\n");
} else {
/* replace the FROM URI */
if ( parse_from_header(msg)<0 ) {
@ -630,6 +631,7 @@ int restore_uri( struct sip_msg *msg, str *rr_param, str* restore_avp,
}
old_body = (struct to_body*) msg->from->parsed;
flag = FL_USE_UAC_FROM;
LM_DBG("replacing in From header\n");
}
if(restore_avp->s) {

@ -382,6 +382,7 @@ static int child_init(int rank)
kam_srand(getpid() * 17 + time(0));
uac_reg_load_db();
LM_DBG("run initial uac registration routine\n");
uac_reg_timer(0);
for(;;){
/* update the local config framework structures */

@ -579,6 +579,8 @@ int reg_ht_add(reg_uac_t *reg)
reg_ht_add_byuuid(nr);
counter_inc(regtotal);
LM_DBG("added uuid: %.*s - l_user: %.*s\n", nr->l_uuid.len, nr->l_uuid.s,
nr->l_username.len, nr->l_username.s);
return 0;
}

@ -7,8 +7,6 @@ Henning Westerholt
1&1 Internet AG
<henning.westerholt@1und1.de>
Edited by
Pawel Kuzak
1&1 Internet AG
@ -89,7 +87,7 @@ Pawel Kuzak
1.13. Set globalblacklist_whitelist_col parameter
1.14. Set globalblacklist_description_col parameter
1.15. check_user_blacklist usage
1.16. check_user_blacklist usage
1.16. check_user_whitelist usage
1.17. check_blacklist usage
1.18. check_whitelist usage
1.19. userblacklist.reload_blacklist usage
@ -407,7 +405,7 @@ table)
are optional, the defaults are used if they are omitted. The number
parameter can be used to check for example against the from URI user.
Example 1.16. check_user_blacklist usage
Example 1.16. check_user_whitelist usage
...
$avp(i:80) = $rU;
# rewrite the R-URI

@ -324,7 +324,7 @@ if (!check_user_blacklist("$avp(i:80)", "$avp(i:82)")) {
parameter can be used to check for example against the from URI user.
</para>
<example>
<title><function>check_user_blacklist</function> usage</title>
<title><function>check_user_whitelist</function> usage</title>
<programlisting format="linespecific">
...
$avp(i:80) = $rU;

@ -12,12 +12,8 @@ Edited by
Jan Janak
Edited by
Bogdan-Andrei Iancu
Edited by
Carsten Bock
ng-voice GmbH
@ -44,7 +40,7 @@ Carsten Bock
3. Parameters
3.1. nat_bflag (integer)
3.1. nat_bflag (int)
3.2. user_column (string)
3.3. domain_column (string)
3.4. contact_column (string)
@ -65,17 +61,17 @@ Carsten Bock
3.19. connection_id_column (string)
3.20. keepalive_column (string)
3.21. partition_column (string)
3.22. use_domain (integer)
3.23. desc_time_order (integer)
3.24. timer_interval (integer)
3.22. use_domain (int)
3.23. desc_time_order (int)
3.24. timer_interval (int)
3.25. db_url (string)
3.26. db_mode (integer)
3.27. db_load (integer)
3.28. db_insert_update (integer)
3.29. matching_mode (integer)
3.30. cseq_delay (integer)
3.31. fetch_rows (integer)
3.32. hash_size (integer)
3.26. db_mode (int)
3.27. db_load (int)
3.28. db_insert_update (int)
3.29. matching_mode (int)
3.30. cseq_delay (int)
3.31. fetch_rows (int)
3.32. hash_size (int)
3.33. preload (string)
3.34. db_update_as_insert (int)
3.35. db_check_update (int)
@ -91,7 +87,7 @@ Carsten Bock
3.45. db_timer_clean (int)
3.46. rm_expired_delay (int)
3.47. server_id_filter (int)
3.48. version_table (integer)
3.48. version_table (int)
4. RPC Commands
@ -203,7 +199,7 @@ Chapter 1. Admin Guide
3. Parameters
3.1. nat_bflag (integer)
3.1. nat_bflag (int)
3.2. user_column (string)
3.3. domain_column (string)
3.4. contact_column (string)
@ -224,17 +220,17 @@ Chapter 1. Admin Guide
3.19. connection_id_column (string)
3.20. keepalive_column (string)
3.21. partition_column (string)
3.22. use_domain (integer)
3.23. desc_time_order (integer)
3.24. timer_interval (integer)
3.22. use_domain (int)
3.23. desc_time_order (int)
3.24. timer_interval (int)
3.25. db_url (string)
3.26. db_mode (integer)
3.27. db_load (integer)
3.28. db_insert_update (integer)
3.29. matching_mode (integer)
3.30. cseq_delay (integer)
3.31. fetch_rows (integer)
3.32. hash_size (integer)
3.26. db_mode (int)
3.27. db_load (int)
3.28. db_insert_update (int)
3.29. matching_mode (int)
3.30. cseq_delay (int)
3.31. fetch_rows (int)
3.32. hash_size (int)
3.33. preload (string)
3.34. db_update_as_insert (int)
3.35. db_check_update (int)
@ -250,7 +246,7 @@ Chapter 1. Admin Guide
3.45. db_timer_clean (int)
3.46. rm_expired_delay (int)
3.47. server_id_filter (int)
3.48. version_table (integer)
3.48. version_table (int)
4. RPC Commands
@ -310,7 +306,7 @@ Chapter 1. Admin Guide
To find out how to control/select the contact matching algorithm,
please see the module parameter matching_mode - Section 3.29,
“matching_mode (integer)”.
“matching_mode (int)”.
2. Dependencies
@ -330,7 +326,7 @@ Chapter 1. Admin Guide
3. Parameters
3.1. nat_bflag (integer)
3.1. nat_bflag (int)
3.2. user_column (string)
3.3. domain_column (string)
3.4. contact_column (string)
@ -351,17 +347,17 @@ Chapter 1. Admin Guide
3.19. connection_id_column (string)
3.20. keepalive_column (string)
3.21. partition_column (string)
3.22. use_domain (integer)
3.23. desc_time_order (integer)
3.24. timer_interval (integer)
3.22. use_domain (int)
3.23. desc_time_order (int)
3.24. timer_interval (int)
3.25. db_url (string)
3.26. db_mode (integer)
3.27. db_load (integer)
3.28. db_insert_update (integer)
3.29. matching_mode (integer)
3.30. cseq_delay (integer)
3.31. fetch_rows (integer)
3.32. hash_size (integer)
3.26. db_mode (int)
3.27. db_load (int)
3.28. db_insert_update (int)
3.29. matching_mode (int)
3.30. cseq_delay (int)
3.31. fetch_rows (int)
3.32. hash_size (int)
3.33. preload (string)
3.34. db_update_as_insert (int)
3.35. db_check_update (int)
@ -377,9 +373,9 @@ Chapter 1. Admin Guide
3.45. db_timer_clean (int)
3.46. rm_expired_delay (int)
3.47. server_id_filter (int)
3.48. version_table (integer)
3.48. version_table (int)
3.1. nat_bflag (integer)
3.1. nat_bflag (int)
The index of the branch flag to be used as NAT marker (if the contact
is or not natted). This is a branch flag and it will be imported and
@ -616,7 +612,7 @@ modparam("usrloc", "keepalive_column", "kalive")
modparam("usrloc", "partition_column", "part")
...
3.22. use_domain (integer)
3.22. use_domain (int)
If the domain part of the user should be also saved and used for
identifying the user (along with the username part). Useful in multi
@ -629,7 +625,7 @@ modparam("usrloc", "partition_column", "part")
modparam("usrloc", "use_domain", 1)
...
3.23. desc_time_order (integer)
3.23. desc_time_order (int)
If the user's contacts should be kept timestamp ordered; otherwise the
contact will be ordered based on q value. Non 0 value means true.
@ -641,7 +637,7 @@ modparam("usrloc", "use_domain", 1)
modparam("usrloc", "desc_time_order", 1)
...
3.24. timer_interval (integer)
3.24. timer_interval (int)
Number of seconds between two timer runs. The module uses a timer to
delete expired contacts, synchronize with database and other tasks,
@ -665,7 +661,7 @@ modparam("usrloc", "timer_interval", 120)
modparam("usrloc", "db_url", "dbdriver://username:password@dbhost/dbname")
...
3.26. db_mode (integer)
3.26. db_mode (int)
The usrloc module can utilize a database for persistent contact
storage. If a database is used, the location database (contacts) will
@ -716,7 +712,7 @@ Warning
modparam("usrloc", "db_mode", 2)
...
3.27. db_load (integer)
3.27. db_load (int)
Determine if the usrloc module should load contacts from the database
storage during module initialization A value of 0 disable the loading
@ -726,10 +722,10 @@ modparam("usrloc", "db_mode", 2)
Example 1.27. Set db_load parameter
...
modparam("usrloc", "db_load", "0")
modparam("usrloc", "db_load", 0)
...
3.28. db_insert_update (integer)
3.28. db_insert_update (int)
Determine if the usrloc module should do an update when a duplicate key
is found while inserting A value of 1 will activate update on duplicate
@ -739,13 +735,13 @@ modparam("usrloc", "db_load", "0")
Example 1.28. Set db_insert_update parameter
...
modparam("usrloc", "db_insert_update", "1")
modparam("usrloc", "db_insert_update", 1)
...
3.29. matching_mode (integer)
3.29. matching_mode (int)
What contact matching algorithm to be used. Refer to section
Section 1.1, “Contact matching” for the description of the algorithms.
What contact matching algorithm to be used. Refer to section ??? for
the description of the algorithms.
The parameter may take the following values:
* 0 - CONTACT ONLY based matching algorithm.
@ -763,7 +759,7 @@ modparam("usrloc", "db_insert_update", "1")
modparam("usrloc", "matching_mode", 1)
...
3.30. cseq_delay (integer)
3.30. cseq_delay (int)
Delay (in seconds) for accepting as retransmissions register requests
with same Call-ID and Cseq. The delay is calculated starting from the
@ -782,7 +778,7 @@ modparam("usrloc", "matching_mode", 1)
modparam("usrloc", "cseq_delay", 5)
...
3.31. fetch_rows (integer)
3.31. fetch_rows (int)
The number of the rows to be fetched at once from database when loading
the location records. This value can be used to tune the load time at
@ -796,7 +792,7 @@ modparam("usrloc", "cseq_delay", 5)
modparam("usrloc", "fetch_rows", 3000)
...
3.32. hash_size (integer)
3.32. hash_size (int)
The number of entries of the hash table used by usrloc to store the
location records is 2^hash_size. For hash_size=4, the number of slots
@ -1019,7 +1015,7 @@ modparam("usrloc", "rm_expired_delay", 30)
modparam("usrloc", "server_id_filter", 1)
...
3.48. version_table (integer)
3.48. version_table (int)
If set to 0, the module will skip checking the version for location
table.

@ -20,7 +20,7 @@
provides access to the table for other modules. The module exports no
functions that can be used directly from routing scripts.
</para>
<section id="contact-matching-algs">
<section id="usrloc.o.contact-matching-algs">
<title>Contact matching</title>
<para>
How the contacts are matched (for the same AOR - Address of Record) is an
@ -112,7 +112,7 @@
<section>
<title>Parameters</title>
<section id="usrloc.p.nat_bflag">
<title><varname>nat_bflag</varname> (integer)</title>
<title><varname>nat_bflag</varname> (int)</title>
<para>
The index of the branch flag to be used as NAT marker (if the contact
is or not natted). This is a branch flag and it will be imported and
@ -537,7 +537,7 @@ modparam("usrloc", "partition_column", "part")
</section>
<section id="usrloc.p.use_domain">
<title><varname>use_domain</varname> (integer)</title>
<title><varname>use_domain</varname> (int)</title>
<para>
If the domain part of the user should be also saved and used for
identifying the user (along with the username part). Useful in
@ -559,7 +559,7 @@ modparam("usrloc", "use_domain", 1)
</section>
<section id="usrloc.p.desc_time_order">
<title><varname>desc_time_order</varname> (integer)</title>
<title><varname>desc_time_order</varname> (int)</title>
<para>
If the user's contacts should be kept timestamp ordered; otherwise the
contact will be ordered based on q value.
@ -581,7 +581,7 @@ modparam("usrloc", "desc_time_order", 1)
</section>
<section id="usrloc.p.timer_interval">
<title><varname>timer_interval</varname> (integer)</title>
<title><varname>timer_interval</varname> (int)</title>
<para>
Number of seconds between two timer runs. The module uses a timer to
delete expired contacts, synchronize with database and other tasks,
@ -623,7 +623,7 @@ modparam("usrloc", "db_url", "&exampledb;")
</section>
<section id="usrloc.p.db_mode">
<title><varname>db_mode</varname> (integer)</title>
<title><varname>db_mode</varname> (int)</title>
<para>
The usrloc module can utilize a database for persistent contact storage.
If a database is used, the location database (contacts) will survive
@ -708,7 +708,7 @@ modparam("usrloc", "db_mode", 2)
</section>
<section id="usrloc.p.db_load">
<title><varname>db_load</varname> (integer)</title>
<title><varname>db_load</varname> (int)</title>
<para>
Determine if the usrloc module should load contacts from the database storage during module initialization
A value of 0 disable the loading from the database, this parameter is ignored if db_mode 4 is set
@ -722,14 +722,14 @@ modparam("usrloc", "db_mode", 2)
<title>Set <varname>db_load</varname> parameter</title>
<programlisting format="linespecific">
...
modparam("usrloc", "db_load", "0")
modparam("usrloc", "db_load", 0)
...
</programlisting>
</example>
</section>
<section id="usrloc.p.db_insert_update">
<title><varname>db_insert_update</varname> (integer)</title>
<title><varname>db_insert_update</varname> (int)</title>
<para>
Determine if the usrloc module should do an update when a duplicate key is found while inserting
A value of 1 will activate update on duplicate key
@ -743,14 +743,14 @@ modparam("usrloc", "db_load", "0")
<title>Set <varname>db_insert_update</varname> parameter</title>
<programlisting format="linespecific">
...
modparam("usrloc", "db_insert_update", "1")
modparam("usrloc", "db_insert_update", 1)
...
</programlisting>
</example>
</section>
<section id="usrloc.p.matching_mode">
<title><varname>matching_mode</varname> (integer)</title>
<title><varname>matching_mode</varname> (int)</title>
<para>
What contact matching algorithm to be used. Refer to section
<xref linkend="contact-matching-algs"/> for the description of the
@ -800,7 +800,7 @@ modparam("usrloc", "matching_mode", 1)
</section>
<section id="usrloc.p.cseq_delay">
<title><varname>cseq_delay</varname> (integer)</title>
<title><varname>cseq_delay</varname> (int)</title>
<para>
Delay (in seconds) for accepting as retransmissions register requests
with same Call-ID and Cseq. The delay is calculated starting from the
@ -830,7 +830,7 @@ modparam("usrloc", "cseq_delay", 5)
</section>
<section id="usrloc.p.fetch_rows">
<title><varname>fetch_rows</varname> (integer)</title>
<title><varname>fetch_rows</varname> (int)</title>
<para>
The number of the rows to be fetched at once from database
when loading the location records. This value can be used
@ -854,7 +854,7 @@ modparam("usrloc", "fetch_rows", 3000)
</section>
<section id="usrloc.p.hash_size">
<title><varname>hash_size</varname> (integer)</title>
<title><varname>hash_size</varname> (int)</title>
<para>
The number of entries of the hash table used by usrloc to store the
location records is 2^hash_size. For hash_size=4, the number of slots
@ -1221,7 +1221,7 @@ modparam("usrloc", "server_id_filter", 1)
</section>
<section id="usrloc.p.version_table">
<title><varname>version_table</varname> (integer)</title>
<title><varname>version_table</varname> (int)</title>
<para>
If set to 0, the module will skip checking the version
for location table.

@ -169,4 +169,13 @@ int uldb_delete_attrs(str* _dname, str *_user, str *_domain, str *_ruid);
*/
int uldb_insert_attrs(str *_dname, str *_user, str *_domain,
str *_ruid, sr_xavp_t *_xhead);
/*!
* \brief Set the value for cloning the xavp list to contact structure
* \param v - the value to be set
*/
void ul_set_xavp_contact_clone(int v);
int uldb_delete_attrs_ruid(str* _dname, str *_ruid);
#endif

@ -83,7 +83,7 @@ int new_udomain(str* _n, int _s, udomain_t** _d)
#ifdef STATISTICS
char *name;
#endif
/* Must be always in shared memory, since
* the cache is accessed from timer which
* lives in a separate process
@ -150,7 +150,7 @@ error0:
void free_udomain(udomain_t* _d)
{
int i;
if (_d->table) {
for(i = 0; i < _d->size; i++) {
deinit_slot(_d->table + i);
@ -215,7 +215,7 @@ void print_udomain(FILE* _f, udomain_t* _d)
/*!
* \brief Convert database values into ucontact_info
*
* Convert database values into ucontact_info,
* Convert database values into ucontact_info,
* expects 12 rows (contact, expirs, q, callid, cseq, flags,
* ua, received, path, socket, methods, last_modified)
* \param vals database values
@ -294,7 +294,7 @@ static inline ucontact_info_t* dbrow2info(db_val_t *vals, str *contact, int rcon
received.len = strlen(received.s);
}
ci.received = received;
path.s = (char*)VAL_STRING(vals+9);
if (VAL_NULL(vals+9) || !path.s || !path.s[0]) {
path.len = 0;
@ -309,7 +309,7 @@ static inline ucontact_info_t* dbrow2info(db_val_t *vals, str *contact, int rcon
if (VAL_NULL(vals+10) || p==0 || p[0]==0){
ci.sock = 0;
} else {
if (parse_phostport( p, &host.s, &host.len,
if (parse_phostport( p, &host.s, &host.len,
&port, &proto)!=0) {
LM_ERR("bad socket <%s>\n", p);
return 0;
@ -509,7 +509,6 @@ int preload_udomain(db1_con_t* _c, udomain_t* _d)
}
}
lock_udomain(_d, &user);
if (get_urecord(_d, &user, &r) > 0) {
if (mem_insert_urecord(_d, &user, &r) < 0) {
@ -657,7 +656,7 @@ urecord_t* db_load_urecord(db1_con_t* _c, udomain_t* _d, str *_aor)
_aor->len, _aor->s, _d->name->s);
continue;
}
if ( r==0 )
get_static_urecord( _d, _aor, &r);
@ -910,6 +909,9 @@ int udomain_contact_expired_cb(db1_con_t* _c, udomain_t* _d)
int n;
urecord_t* r;
ucontact_t* c;
#define RUIDBUF_SIZE 128
char ruidbuf[RUIDBUF_SIZE];
str ruid;
if (db_mode!=DB_ONLY) {
return 0;
@ -948,13 +950,13 @@ int udomain_contact_expired_cb(db1_con_t* _c, udomain_t* _d)
UL_DB_EXPIRES_SET(&query_vals[1], 0);
if (ul_db_srvid != 0) {
query_cols[2] = &srv_id_col;
query_ops[2] = OP_EQ;
query_vals[2].type = DB1_INT;
query_vals[2].nul = 0;
query_vals[2].val.int_val = server_id;
key_num = 3;
}
query_cols[2] = &srv_id_col;
query_ops[2] = OP_EQ;
query_vals[2].type = DB1_INT;
query_vals[2].nul = 0;
query_vals[2].val.int_val = server_id;
key_num = 3;
}
if (ul_dbf.use_table(_c, _d->name) < 0) {
LM_ERR("sql use_table failed\n");
@ -985,8 +987,8 @@ int udomain_contact_expired_cb(db1_con_t* _c, udomain_t* _d)
if (RES_ROW_N(res) == 0) {
LM_DBG("no rows to be contact expired\n");
ul_dbf.free_result(_c, res);
return 0;
ul_dbf.free_result(_c, res);
return 0;
}
n = 0;
@ -1011,14 +1013,11 @@ int udomain_contact_expired_cb(db1_con_t* _c, udomain_t* _d)
}
lock_udomain(_d, &user);
if (get_urecord(_d, &user, &r) > 0) {
LM_ERR("failed to get a record\n");
unlock_udomain(_d, &user);
goto error;
}
get_static_urecord(_d, &user, &r);
if ( (c=mem_insert_ucontact(r, &contact, ci)) == 0) {
LM_ERR("inserting contact failed\n");
LM_ERR("inserting temporary contact failed for %.*s\n",
user.len, user.s);
release_urecord(r);
unlock_udomain(_d, &user);
goto error;
@ -1029,8 +1028,25 @@ int udomain_contact_expired_cb(db1_con_t* _c, udomain_t* _d)
run_ul_callbacks( UL_CONTACT_EXPIRE, c);
}
c->state = CS_SYNC;
ruid.len = 0;
if(c->ruid.len > 0 && ul_xavp_contact_name.s != NULL) {
/* clone ruid to delete attributes out of lock */
if(c->ruid.len < RUIDBUF_SIZE - 2) {
memcpy(ruidbuf, c->ruid.s, c->ruid.len);
ruidbuf[c->ruid.len] = '\0';
ruid.s = ruidbuf;
ruid.len = c->ruid.len;
} else {
LM_ERR("ruid is too long %d for %.*s\n", c->ruid.len,
user.len, user.s);
}
}
release_urecord(r);
unlock_udomain(_d, &user);
if(ruid.len > 0 && ul_xavp_contact_name.s != NULL) {
/* delete attributes by ruid */
uldb_delete_attrs_ruid(_d->name, &ruid);
}
}
if (DB_CAPABILITY(ul_dbf, DB_CAP_FETCH)) {
@ -1059,7 +1075,7 @@ error:
/*!
* \brief Timer function to cleanup expired contacts, db_mode: DB_ONLY
* \brief Timer function to cleanup expired contacts, db_mode: DB_ONLY
* and for WRITE_BACK, WRITE_THROUGH on config param
* \param _d cleaned domain
* \return 0 on success, -1 on failure
@ -1097,7 +1113,7 @@ int db_timer_udomain(udomain_t* _d)
LM_ERR("use_table failed\n");
return -1;
}
if (ul_dbf.delete(ul_dbh, keys, ops, vals, key_num) < 0) {
LM_ERR("failed to delete from table %s\n",_d->name->s);
return -1;
@ -1131,7 +1147,7 @@ int testdb_udomain(db1_con_t* con, udomain_t* d)
VAL_TYPE(val) = DB1_STRING;
VAL_NULL(val) = 0;
VAL_STRING(val) = "dummy_user";
VAL_TYPE(val+1) = DB1_STRING;
VAL_NULL(val+1) = 0;
VAL_STRING(val+1) = "dummy_domain";
@ -1157,7 +1173,7 @@ int testdb_udomain(db1_con_t* con, udomain_t* d)
int mem_insert_urecord(udomain_t* _d, str* _aor, struct urecord** _r)
{
int sl;
if (new_urecord(_d->name, _aor, _r) < 0) {
LM_ERR("creating urecord failed\n");
return -1;

@ -421,6 +421,7 @@ static void ul_rpc_lookup(rpc_t* rpc, void* ctx)
if (rpc->add(ctx, "{", &th) < 0)
{
release_urecord(rec);
unlock_udomain(dom, &aor);
rpc->fault(ctx, 500, "Internal error creating outer rpc");
return;
@ -429,6 +430,7 @@ static void ul_rpc_lookup(rpc_t* rpc, void* ctx)
"AoR", &aor,
"Contacts", &ih)<0)
{
release_urecord(rec);
unlock_udomain(dom, &aor);
rpc->fault(ctx, 500, "Internal error creating aor struct");
return;
@ -439,12 +441,13 @@ static void ul_rpc_lookup(rpc_t* rpc, void* ctx)
if (VALID_CONTACT( con, act_time)) {
rpl_tree++;
if (rpc_dump_contact(rpc, ctx, ih, con) == -1) {
release_urecord(rec);
unlock_udomain(dom, &aor);
return;
}
}
}
release_urecord(rec);
unlock_udomain( dom, &aor);
if (rpl_tree==0) {
@ -533,17 +536,20 @@ static void ul_rpc_rm_contact(rpc_t* rpc, void* ctx)
ret = get_ucontact( rec, &contact, &rpc_ul_cid, &rpc_ul_path, RPC_UL_CSEQ+1, &con);
if (ret < 0) {
release_urecord(rec);
unlock_udomain( dom, &aor);
rpc->fault(ctx, 500, "Internal error (can't get contact)");
return;
}
if (ret > 0) {
release_urecord(rec);
unlock_udomain( dom, &aor);
rpc->fault(ctx, 404, "Contact not found");
return;
}
if (delete_ucontact(rec, con) < 0) {
release_urecord(rec);
unlock_udomain( dom, &aor);
rpc->fault(ctx, 500, "Internal error (can't delete contact)");
return;

@ -94,7 +94,7 @@ void free_urecord(urecord_t* _r)
_r->contacts = _r->contacts->next;
free_ucontact(ptr);
}
/* if mem cache is not used, the urecord struct is static*/
if (db_mode!=DB_ONLY) {
if (_r->aor.s) shm_free(_r->aor.s);
@ -117,7 +117,7 @@ void print_urecord(FILE* _f, urecord_t* _r)
fprintf(_f, "aor : '%.*s'\n", _r->aor.len, ZSW(_r->aor.s));
fprintf(_f, "aorhash: '%u'\n", (unsigned)_r->aorhash);
fprintf(_f, "slot: '%d'\n", _r->aorhash&(_r->slot->d->size-1));
if (_r->contacts) {
ptr = _r->contacts;
while(ptr) {
@ -201,7 +201,7 @@ void mem_remove_ucontact(urecord_t* _r, ucontact_t* _c)
_c->next->prev = 0;
}
}
}
}
/*!
@ -534,7 +534,7 @@ int db_delete_urecord_by_ruid(str *_table, str *_ruid)
}
if (ul_dbf.affected_rows(ul_dbh) == 0) {
return -2;
return -2;
}
return 0;
@ -653,12 +653,12 @@ int delete_ucontact(urecord_t* _r, struct ucontact* _c)
int delete_urecord_by_ruid(udomain_t* _d, str *_ruid)
{
if (db_mode != DB_ONLY) {
LM_ERR("delete_urecord_by_ruid currently available only in db_mode=3\n");
return -1;
}
if (db_mode != DB_ONLY) {
LM_ERR("delete_urecord_by_ruid currently available only in db_mode=3\n");
return -1;
}
return db_delete_urecord_by_ruid(_d->name, _ruid);
return db_delete_urecord_by_ruid(_d->name, _ruid);
}
@ -674,7 +674,7 @@ static inline struct ucontact* contact_match( ucontact_t* ptr, str* _c)
if ((_c->len == ptr->c.len) && !memcmp(_c->s, ptr->c.s, _c->len)) {
return ptr;
}
ptr = ptr->next;
}
return 0;
@ -698,30 +698,29 @@ static inline struct ucontact* contact_callid_match( ucontact_t* ptr,
) {
return ptr;
}
ptr = ptr->next;
}
return 0;
}
/*!
+ * \brief Match a contact record to a contact string and path
+ * \param ptr contact record
+ * \param _c contact string
+ * \param _path path
+ * \return ptr on successfull match, 0 when they not match
+ */
/*!
* \brief Match a contact record to a contact string and path
* \param ptr contact record
* \param _c contact string
* \param _path path
* \return ptr on successfull match, 0 when they not match
*/
static inline struct ucontact* contact_path_match( ucontact_t* ptr, str* _c, str *_path)
{
/* if no path is preset (in REGISTER request) or use_path is not configured
in registrar module, default to contact_match() */
* in registrar module, default to contact_match() */
if( _path == NULL) return contact_match(ptr, _c);
while(ptr) {
if ( (_c->len==ptr->c.len) && (_path->len==ptr->path.len)
&& !memcmp(_c->s, ptr->c.s, _c->len)
&& !memcmp(_path->s, ptr->path.s, _path->len)
) {
&& !memcmp(_c->s, ptr->c.s, _c->len)
&& !memcmp(_path->s, ptr->path.s, _path->len) ) {
return ptr;
}
@ -744,7 +743,7 @@ static inline struct ucontact* contact_match_callidonly( ucontact_t* ptr, str* _
if ((_callid->len == ptr->callid.len) && !memcmp(_callid->s, ptr->callid.s, _callid->len)) {
return ptr;
}
ptr = ptr->next;
}
return 0;
@ -759,7 +758,7 @@ static inline struct ucontact* contact_match_callidonly( ucontact_t* ptr, str* _
* \param _path path
* \param _cseq CSEQ number
* \param _co found contact
* \return 0 - found, 1 - not found, -1 - invalid found,
* \return 0 - found, 1 - not found, -1 - invalid found,
* -2 - found, but to be skipped (same cseq)
*/
int get_ucontact(urecord_t* _r, str* _c, str* _callid, str* _path, int _cseq,
@ -818,7 +817,7 @@ int get_ucontact_by_instance(urecord_t* _r, str* _c, ucontact_info_t* _ci,
ucontact_t* ptr;
str i1;
str i2;
if (_ci->instance.s == NULL || _ci->instance.len <= 0) {
return get_ucontact(_r, _c, _ci->callid, _ci->path, _ci->cseq, _co);
}
@ -843,7 +842,7 @@ int get_ucontact_by_instance(urecord_t* _r, str* _c, ucontact_info_t* _ci,
return 0;
}
}
ptr = ptr->next;
}
return 1;

@ -377,8 +377,11 @@ static int mod_init(void)
if (handle_lost_tcp && db_mode == DB_ONLY)
LM_WARN("handle_lost_tcp option makes nothing in DB_ONLY mode\n");
init_flag = 1;
if(db_mode != DB_ONLY) {
ul_set_xavp_contact_clone(1);
}
init_flag = 1;
return 0;
}

@ -40,7 +40,7 @@ Options:
-h Help message
address:
[proto:]name[:port] where proto is one of tcp, udp, unixs, unix or unixd
e.g.: tcp:localhost:2048 , unixs:/tmp/ser_ctl
e.g.: tcp:localhost:2049 , unixs:/tmp/ser_ctl
If the protocol is not specified, unixs will be
used if name is a filesystem path and udp if not.
"unixs" or "unix" stand for unix stream sockets
@ -141,12 +141,12 @@ $ kamcmd cfg.cfg_set_int_now debug 5 # turn debug level to 5 (needs cfg)
$ kamcmd # enters interactive mode
Using a tcp socket
(assumes modparam("ctl", "binrpc", "tcp:localhost:2048") in kamailio.cfg)
(assumes modparam("ctl", "binrpc", "tcp:localhost:2049") in kamailio.cfg)
$ kamcmd -s tcp:localhost:2048 core.version
$ kamcmd -s tcp:localhost:2049 core.version
Server: Kamailio (3.3.2 (i386/linux))
$ kamcmd -s tcp:localhost:2048 SRV _sip._udp.iptel.org
$ kamcmd -s tcp:localhost:2049 SRV _sip._udp.iptel.org
name: _sip._udp.iptel.org
type: SRV
size (bytes): 104
@ -161,7 +161,7 @@ $ kamcmd -s tcp:localhost:2048 SRV _sip._udp.iptel.org
rr expires in (s): 67693
rr error flags: 0
kamcmd -s tcp:127.0.0.1:2048 # enters interactive mode over tcp
kamcmd -s tcp:127.0.0.1:2049 # enters interactive mode over tcp
For more examples see utils/kamcmd/EXAMPLES
[http://git.sip-router.org/cgi-bin/gitweb.cgi?p=sip-router;a=blob;f=utils/kamcmd/EXAMPLES].

@ -103,7 +103,7 @@ Options:\n\
-h This help message\n\
address:\n\
[proto:]name[:port] where proto is one of tcp, udp, unixs or unixd\n\
e.g.: tcp:localhost:2048 , unixs:/tmp/kamailio_ctl\n\
e.g.: tcp:localhost:2049 , unixs:/tmp/kamailio_ctl\n\
cmd:\n\
method [arg1 [arg2...]]\n\
arg:\n\

@ -11,7 +11,11 @@ PATH=$PATH:/usr/local/sbin/
# for testing only, please don't enable this in production environments
# as this introduce security risks
TEST="false"
if [ -z "$KAMCTL_TEST" ]; then
TEST="false"
else
TEST="true"
fi
### include config files

@ -649,7 +649,7 @@ in SIP_DOMAIN"
# check the parameter if it is a valid address of record (user@domain)
check_aor() {
echo "$1" | $EGREP "^$USERNAME_RE@.*\..*" >/dev/null
echo "$1" | $EGREP "^$USERNAME_RE@.+" >/dev/null
if [ $? -ne 0 ] ; then
echo "error: invalid AoR: $1" > /dev/stderr
exit 1
@ -658,7 +658,7 @@ check_aor() {
# check the parameter if it is a valid address of record (user@domain)
is_aor() {
echo "$1" | $EGREP "^$USERNAME_RE@.*\..*" >/dev/null
echo "$1" | $EGREP "^$USERNAME_RE@.+" >/dev/null
if [ $? -ne 0 ] ; then
false
else
@ -668,7 +668,7 @@ is_aor() {
# check the parameter if it is a valid SIP address of record (sip:user@domain)
check_sipaor() {
echo "$1" | $EGREP "^sip(s)?:$USERNAME_RE@.*\..*" >/dev/null
echo "$1" | $EGREP "^sip(s)?:$USERNAME_RE@.+" >/dev/null
if [ $? -ne 0 ] ; then
echo "error: invalid SIP AoR: $1" > /dev/stderr
exit 1
@ -679,7 +679,7 @@ check_sipaor() {
# quite simplified now -- it captures just very basic
# errors
check_uri() {
echo "$1" | $EGREP "^sip(s)?:($USERNAME_RE@)?.*\..*" > /dev/null
echo "$1" | $EGREP "^sip(s)?:($USERNAME_RE@)?.+" > /dev/null
if [ $? -ne 0 ] ; then
echo "error: invalid SIP URI: $1" > /dev/stderr
exit 1

Loading…
Cancel
Save