sip-router
10 years agoMerge remote branch 'origin/sr_3.0'
Andrei Pelinescu-Onciul [Wed, 3 Feb 2010 22:32:55 +0000 (23:32 +0100)]
Merge remote branch 'origin/sr_3.0'

* origin/sr_3.0:
  core: new param to give outbut buffer size
  core: use one buffer for int2str
  core: use dlflags to load modules
  uac(k): use header types for detection
  uac(k): proper test for send failure
  uac(k): set type for tm callback
  modules/mediaproxy: take boundary string from Content-Type header.
  core: stats events cbs are called only if USE_CORE_STATS is defined
  update drp_reqs statistics
  update drp_rpls statistics
  update fwd_rpls statistics
  update err_reqs statistics
  update err_rpls statistics
  update bad_URIs statistics
  update bad_msg_hdr statistics
  core: update fwd_reqs stat
  kex: support to update core stats via core events
  core: added new event SREV_CORE_STATS

10 years agoMerge remote branch 'origin/tmp/k3.0_sr_backports' into sr_3.0
Andrei Pelinescu-Onciul [Wed, 3 Feb 2010 22:09:26 +0000 (23:09 +0100)]
Merge remote branch 'origin/tmp/k3.0_sr_backports' into sr_3.0

statistics callback support (enabled only if compiled with
-DUSE_CORE_STATS) and latest kamailio 3.0 fixes

* origin/tmp/k3.0_sr_backports:
  core: new param to give outbut buffer size
  core: use one buffer for int2str
  core: use dlflags to load modules
  uac(k): use header types for detection
  uac(k): proper test for send failure
  uac(k): set type for tm callback
  core: stats events cbs are called only if USE_CORE_STATS is defined
  update drp_reqs statistics
  update drp_rpls statistics
  update fwd_rpls statistics
  update err_reqs statistics
  update err_rpls statistics
  update bad_URIs statistics
  update bad_msg_hdr statistics
  core: update fwd_reqs stat
  kex: support to update core stats via core events
  core: added new event SREV_CORE_STATS

10 years agocore: new param to give outbut buffer size
Daniel-Constantin Mierla [Tue, 2 Feb 2010 14:06:34 +0000 (15:06 +0100)]
core: new param to give outbut buffer size

- int2strbuf requires now outbut buffer size as parameter
- safer against misuses, suggested by Andrei Pelinescu-Onciul
- if size is less than INT2STR_MAX_LEN, return null pointer
(cherry picked from commit a765213ffa3769577dd7438c95737cb6b98bff74)

10 years agocore: use one buffer for int2str
Daniel-Constantin Mierla [Tue, 2 Feb 2010 12:23:03 +0000 (13:23 +0100)]
core: use one buffer for int2str

- static declaration inside ut.h function results in hard copy to many
  places, affecting acc detection of int to str conversions in buffer
- reported by Alex Balashov
(cherry picked from commit 229496c7170bcc85f517a4985f7ab4bad553c8d3)

10 years agocore: use dlflags to load modules
Daniel-Constantin Mierla [Sat, 30 Jan 2010 16:02:37 +0000 (17:02 +0100)]
core: use dlflags to load modules

- dlflags var used for dlopen function
(cherry picked from commit 055915a558a485cda17c9bb1c8e43aca12d116b5)

10 years agouac(k): use header types for detection
Daniel-Constantin Mierla [Sun, 24 Jan 2010 20:21:59 +0000 (21:21 +0100)]
uac(k): use header types for detection
(cherry picked from commit 369d7598244c60c2c8e4d601e166a03cb211128c)

10 years agouac(k): proper test for send failure
Daniel-Constantin Mierla [Sun, 24 Jan 2010 20:20:02 +0000 (21:20 +0100)]
uac(k): proper test for send failure
(cherry picked from commit 1479cd808ea8e5025bfa8400a257e3f89db4ab68)

10 years agouac(k): set type for tm callback
Daniel-Constantin Mierla [Sun, 24 Jan 2010 18:43:09 +0000 (19:43 +0100)]
uac(k): set type for tm callback

- requires to be TMCB_LOCAL_COMPLETED
(cherry picked from commit f4f9207f77883efa4dab67b3afe7c693585dc32c)

10 years agomodules_k/siptutils : Fixed small typo
Marius Zbihlei [Wed, 3 Feb 2010 12:25:18 +0000 (14:25 +0200)]
modules_k/siptutils : Fixed small typo

10 years agotest:unit Fixed unixodbc tests (tested with mysql connector)
Marius Zbihlei [Wed, 3 Feb 2010 12:19:51 +0000 (14:19 +0200)]
test:unit Fixed unixodbc tests (tested with mysql connector)

10 years agoModules_k/siputils : config framework implementation start
Marius Zbihlei [Mon, 1 Feb 2010 10:26:21 +0000 (12:26 +0200)]
Modules_k/siputils : config framework implementation start

Started for ring_timeout

10 years agodebian: Module xmlrpc was moved to "modules".
Jan Janak [Tue, 2 Feb 2010 20:54:42 +0000 (15:54 -0500)]
debian: Module xmlrpc was moved to "modules".

Update the packaging scripts.

10 years agocore: fix bogus gcc-4.4 warning
Andrei Pelinescu-Onciul [Tue, 2 Feb 2010 16:40:22 +0000 (17:40 +0100)]
core: fix bogus gcc-4.4 warning

10 years agoxlog(k): parameter to control printing cfg name
Elena-Ramona Modroiu [Tue, 2 Feb 2010 14:45:58 +0000 (15:45 +0100)]
xlog(k): parameter to control printing cfg name

- long_format set to 1 makes xlogl() and xdbgl() to print config file
  name before line number (useful for usage of 'include_file')

10 years agomqueue: new module offering memory queues
Elena-Ramona Modroiu [Tue, 2 Feb 2010 11:37:59 +0000 (12:37 +0100)]
mqueue: new module offering memory queues

- for usage in cfg file
- many queues can be defined
- one item in queue is a pair (key, value), both string
- functions to add and consume items in the queue
- fetching the oldest item makes it available to pseudo-variables
- example of usage: send tasks from SIP workers to a timer process
  (e.g., defined by rtimer module) that consumes them. Can be some time
  expensive operation, like email notification, etc.

10 years agocore:forward.c Small typo regarding tested socket
Marius Zbihlei [Tue, 2 Feb 2010 09:23:59 +0000 (11:23 +0200)]
core:forward.c Small typo regarding tested socket

10 years agocore: fix missing close() in get_out_socket()
Andrei Pelinescu-Onciul [Tue, 2 Feb 2010 09:09:15 +0000 (10:09 +0100)]
core: fix missing close() in get_out_socket()

- errorpath for EISCONN missed close()-ing the sockets
- added unlikely() on all the error checks

10 years agomodules/mediaproxy: take boundary string from Content-Type header.
Juha Heinanen [Tue, 2 Feb 2010 08:09:32 +0000 (10:09 +0200)]
modules/mediaproxy: take boundary string from Content-Type header.
(cherry picked from commit 2031721948bfa6b444d9b18f7e3f195cfd7e1427)

10 years agomodules/mediaproxy: take boundary string from Content-Type header.
Juha Heinanen [Tue, 2 Feb 2010 08:09:32 +0000 (10:09 +0200)]
modules/mediaproxy: take boundary string from Content-Type header.

10 years agoser_mysql.sh: Switch to /bin/bash
Jan Janak [Tue, 2 Feb 2010 00:24:47 +0000 (19:24 -0500)]
ser_mysql.sh: Switch to /bin/bash

The ser_mysql.sh script is probably not POSIX clean and currently does
not work with dash (the new default interpreter for /bin/sh in debian).

Switch back to /bin/bash, this makes the script work again across
distributions.

10 years agopackaging: Make postinst scripts dash compatible
Jan Janak [Tue, 2 Feb 2010 00:04:19 +0000 (19:04 -0500)]
packaging: Make postinst scripts dash compatible

Debian Squeeze uses dash as the shell for systems scripts by default
and dash does not support the keyword "function" like bash does.

10 years agocore: mhomed: fix fd leak on error, ipv6, fd no
Andrei Pelinescu-Onciul [Mon, 1 Feb 2010 19:15:27 +0000 (20:15 +0100)]
core: mhomed: fix fd leak on error, ipv6, fd no

- on error the cached fds were set to 0, without closing them. Now
  they are not overwritten anymore (opening another one would not
  help).
- try ipv6 only if USE_IPV6 is defined
- 0 is a valid value for a fd => changed the initial values and
  the comparisons to use -1 / <0
- if connect fails with EISCONN disable future caching of the
  socket (return to the old open new socket, connect(), close()
  mode). This way mhomed will work even in the unlikely case of
  an OS where connect()-ing multiple times the same udp socket is
  not allowed.

10 years agocore: take into account mhomed when estimated max_fd_no
Andrei Pelinescu-Onciul [Mon, 1 Feb 2010 18:55:30 +0000 (19:55 +0100)]
core: take into account mhomed when estimated max_fd_no

Since commit ead9f3f, mhomed might use 1 or 2 (IPV6 enabled) fds
per process for caching socket descriptors.

10 years agocore: stats events cbs are called only if USE_CORE_STATS is defined
Andrei Pelinescu-Onciul [Mon, 1 Feb 2010 17:20:10 +0000 (18:20 +0100)]
core: stats events cbs are called only if USE_CORE_STATS is defined

Use macros instead of triggering directly various SREV_CORE_STATS
callbacks. This way if compiled without core stats support
(USE_CORE_STATS), there will be no performance impact (the macros
will be empty). All the macros are defined in core_stats.h.

10 years agoupdate drp_reqs statistics
Daniel-Constantin Mierla [Fri, 23 Oct 2009 14:48:16 +0000 (16:48 +0200)]
update drp_reqs statistics
(cherry picked from commit f4b64fc173c4ecc470346f05514af43adbda294a)

10 years agoupdate drp_rpls statistics
Daniel-Constantin Mierla [Fri, 23 Oct 2009 14:39:59 +0000 (16:39 +0200)]
update drp_rpls statistics

(cherry picked from commit 770ced3)

10 years agoupdate fwd_rpls statistics
Daniel-Constantin Mierla [Fri, 23 Oct 2009 14:20:19 +0000 (16:20 +0200)]
update fwd_rpls statistics
(cherry picked from commit 058f978739d0642d3332301eb8f0a0cd2bc64f37)

10 years agoupdate err_reqs statistics
Daniel-Constantin Mierla [Fri, 23 Oct 2009 14:08:40 +0000 (16:08 +0200)]
update err_reqs statistics
(cherry picked from commit e524a9512dbd24b56713dcf8f0fce1d44b46ae0b)

10 years agoupdate err_rpls statistics
Daniel-Constantin Mierla [Fri, 23 Oct 2009 14:04:21 +0000 (16:04 +0200)]
update err_rpls statistics
(cherry picked from commit b542c1c71ed132e58d0d07d5ba66a241384ae6a2)

10 years agoupdate bad_URIs statistics
Daniel-Constantin Mierla [Fri, 23 Oct 2009 13:57:40 +0000 (15:57 +0200)]
update bad_URIs statistics
(cherry picked from commit feef8d66b067e34459660be78b1f6b2625eaa533)

10 years agoupdate bad_msg_hdr statistics
Daniel-Constantin Mierla [Fri, 23 Oct 2009 13:51:39 +0000 (15:51 +0200)]
update bad_msg_hdr statistics
(cherry picked from commit 0c7926f1a854aed5af4541518bc0cacdf4fce7e7)

10 years agocore: update fwd_reqs stat
Daniel-Constantin Mierla [Tue, 13 Oct 2009 19:40:04 +0000 (21:40 +0200)]
core: update fwd_reqs stat
(cherry picked from commit 6a84eeebc2575d90d5795abb95af33ab37407aef)

10 years agokex: support to update core stats via core events
Daniel-Constantin Mierla [Tue, 13 Oct 2009 19:28:42 +0000 (21:28 +0200)]
kex: support to update core stats via core events
(cherry picked from commit ea5ee19268c6a7e6f69df674b16fb19d2a2d6409)

10 years agocore: added new event SREV_CORE_STATS
Daniel-Constantin Mierla [Tue, 13 Oct 2009 18:47:35 +0000 (20:47 +0200)]
core: added new event SREV_CORE_STATS

- to be used by Kamailio core statistics not included in stock SR core
(cherry picked from commit 47c89177ce276cdf8f6a2d06fdd3359ba283fe4c)

10 years agoMerge remote branch 'origin/sr_3.0'
Andrei Pelinescu-Onciul [Mon, 1 Feb 2010 11:44:30 +0000 (12:44 +0100)]
Merge remote branch 'origin/sr_3.0'

* origin/sr_3.0:
  tm: fix setting the pre-T callbacks
  drouting: register MI commands
  drouting(k): Makefile updated to link libs
  registrar(k): preserve old bflags upon lookup
  pv: fixed author name
  tm: set request and reply for TMCB_RESPONSE_SENT
  tm: run release function for tmcb parameters
  tm: t_on_xyz("0") fixup updates
  core: usage of drop in onsend_route for Kamailio compatibility
  core: exit() is now equivalent to exit 1
  core: drop reply ser compatibility
  core: drop reply in K compatible style
  sanity: fix include file due to previous re-location
  sanity: moved module from modules_s to modules

10 years agoMerge remote branch 'origin/tmp/k3.0_sr_backports' into sr_3.0
Andrei Pelinescu-Onciul [Mon, 1 Feb 2010 11:36:49 +0000 (12:36 +0100)]
Merge remote branch 'origin/tmp/k3.0_sr_backports' into sr_3.0

* origin/tmp/k3.0_sr_backports:
  tm: fix setting the pre-T callbacks
  drouting: register MI commands
  drouting(k): Makefile updated to link libs
  registrar(k): preserve old bflags upon lookup
  pv: fixed author name
  tm: set request and reply for TMCB_RESPONSE_SENT
  tm: run release function for tmcb parameters
  tm: t_on_xyz("0") fixup updates
  core: usage of drop in onsend_route for Kamailio compatibility
  core: exit() is now equivalent to exit 1
  core: drop reply ser compatibility
  core: drop reply in K compatible style
  sanity: fix include file due to previous re-location
  sanity: moved module from modules_s to modules

10 years agotm: fix setting the pre-T callbacks
Daniel-Constantin Mierla [Mon, 1 Feb 2010 10:27:20 +0000 (11:27 +0100)]
tm: fix setting the pre-T callbacks

- introduced in the fix for uac module (affecting only uac)
- credits to Andrei Pelinescu-Onciul
(cherry picked from commit 32d3e9c98943ad298f09d26db83ecf4ce5c2cc0e)

10 years agodrouting: register MI commands
Daniel-Constantin Mierla [Wed, 27 Jan 2010 11:33:26 +0000 (12:33 +0100)]
drouting: register MI commands

- the module didn't register the MI commands in mod init
- reported by Denis Putyato
(cherry picked from commit f12562923e580644f20ae964264747be849d1ce9)
(cherry picked from commit c2f9d800c367d614411159c599f078fbcc0e311e)

10 years agodrouting(k): Makefile updated to link libs
Daniel-Constantin Mierla [Mon, 25 Jan 2010 09:06:41 +0000 (10:06 +0100)]
drouting(k): Makefile updated to link libs

- fixed missing core libs in Makefile
- reported by Denis Pulyato
(cherry picked from commit f572564e862a56470ccb2bc2aa2b23fcbb5dd318)

10 years agoregistrar(k): preserve old bflags upon lookup
Daniel-Constantin Mierla [Mon, 18 Jan 2010 14:43:32 +0000 (15:43 +0100)]
registrar(k): preserve old bflags upon lookup

- lookup was resetting bflags value with what was retrieved from
  location table
- preserve now bflags set in config before
- reported by Ricardo Martinez
(cherry picked from commit e6eceeb8ccce8b37d09f5f69cafb97e007467d78)

10 years agopv: fixed author name
Daniel-Constantin Mierla [Mon, 18 Jan 2010 11:35:46 +0000 (12:35 +0100)]
pv: fixed author name

- forgotten when creating readme files starting from another module
  docbook files
(cherry picked from commit 45f76f44abca5d049c3d289a1f9d09c6821c92d9)

10 years agotm: set request and reply for TMCB_RESPONSE_SENT
Daniel-Constantin Mierla [Mon, 18 Jan 2010 10:59:19 +0000 (11:59 +0100)]
tm: set request and reply for TMCB_RESPONSE_SENT

- for some reason they were NULL
- affected was sip_trace
- credits to Nguyen Quang Tri fore report and troubleshooting
(cherry picked from commit 03ab185bca42e5788eeef5f5c13e02e547c524a1)

10 years agotm: run release function for tmcb parameters
Daniel-Constantin Mierla [Fri, 15 Jan 2010 21:09:01 +0000 (22:09 +0100)]
tm: run release function for tmcb parameters

- allow early registration of tm cb (in use by k uac module for example,
  reported by Vulpyne)
- release function calling was missing
(cherry picked from commit 68d63835c6ec1a3fa4984aa3eb3fcc081a4f1f86)

10 years agotm: t_on_xyz("0") fixup updates
Daniel-Constantin Mierla [Fri, 15 Jan 2010 19:29:46 +0000 (20:29 +0100)]
tm: t_on_xyz("0") fixup updates

- if parameter of t_on_reply, t_on_failure, t_on_branch is 0 do not call
  fix_routes and set the parameter value to 0
- resets previous calls of the function with non-zero value and does not
  print warning message at startup because the route is not found
(cherry picked from commit 53d7cb1dae02e4709a10f869e8ec748df73bec37)

10 years agocore: usage of drop in onsend_route for Kamailio compatibility
Daniel-Constantin Mierla [Thu, 24 Dec 2009 16:11:58 +0000 (17:11 +0100)]
core: usage of drop in onsend_route for Kamailio compatibility

- in K exit and drop have different behavior in some cases
- fr onsend_route exit means stop executing the actions and drop does in
  addition discard sending the message
(cherry picked from commit 8a43c6fcb21ff7aeb097b1d8791bfc3d8f020bcb)

10 years agocore: exit() is now equivalent to exit 1
Andrei Pelinescu-Onciul [Mon, 1 Feb 2010 11:16:50 +0000 (12:16 +0100)]
core: exit() is now equivalent to exit 1

exit or exit() no longer drop messages by default. They now end
the script with return==1 (instead of 0).
Note that exit 0 is equivalent with DROP in non-kamailio mode and
in most routes, but this kind of usage is deprecated (use drop
instead of exit 0).

10 years agocore: drop reply ser compatibility
Andrei Pelinescu-Onciul [Mon, 1 Feb 2010 11:06:08 +0000 (12:06 +0100)]
core: drop reply ser compatibility

- drop reply also if ret==0, not only on DROP
  (e.g. modules function returning 0). This preserves
  compatibility with old scripts.
- uncomment the onreply_route error handling. It was commented out
  by the last commit
  (0621319 core: drop reply in K compatible style). To disable it,
  define NO_ONREPLY_ROUTE_ERROR.

10 years agocore: drop reply in K compatible style
Daniel-Constantin Mierla [Thu, 29 Oct 2009 10:28:20 +0000 (11:28 +0100)]
core: drop reply in K compatible style

- drop reply in default onreply_route when using 'drop'

10 years agosanity: fix include file due to previous re-location
Daniel-Constantin Mierla [Wed, 28 Oct 2009 22:38:07 +0000 (23:38 +0100)]
sanity: fix include file due to previous re-location
(cherry picked from commit f771b05fe8f24bebe18962c4169176e47e099ef8)

10 years agosanity: moved module from modules_s to modules
Daniel-Constantin Mierla [Wed, 28 Oct 2009 22:07:45 +0000 (23:07 +0100)]
sanity: moved module from modules_s to modules

- modules_k/sanity removed (it was an adapted version for k 1.5)
(cherry picked from commit 011cc3ffacfbc6faf65a879d3558cd789f101237)

10 years agoapp_lua: do basic Lua probing before fork
Daniel-Constantin Mierla [Sat, 30 Jan 2010 16:05:12 +0000 (17:05 +0100)]
app_lua: do basic Lua probing before fork

- check if Lua files given to load parameter exist

10 years agocore: use dlflags to load modules
Daniel-Constantin Mierla [Sat, 30 Jan 2010 16:02:37 +0000 (17:02 +0100)]
core: use dlflags to load modules

- dlflags var used for dlopen function

10 years agoapp_lua: function params can be dynamic strings
Daniel-Constantin Mierla [Fri, 29 Jan 2010 21:52:45 +0000 (22:52 +0100)]
app_lua: function params can be dynamic strings

- all functions accept parameters with PVs that are evaluated at runtime
- new function lua_runstring() to run lua script in the context of
  loaded lua files at startup
- helper functions to return boolean to lua and print lua stack in c
  side

10 years agoapp_lua: added helper function to return bool
Daniel-Constantin Mierla [Fri, 29 Jan 2010 17:42:10 +0000 (18:42 +0100)]
app_lua: added helper function to return bool

10 years agoapp_lua: exported sl get_reply_totag() to Lua
Daniel-Constantin Mierla [Fri, 29 Jan 2010 17:36:59 +0000 (18:36 +0100)]
app_lua: exported sl get_reply_totag() to Lua

10 years agoxlog(k): two new functions xlogl and xdbgl
Elena-Ramona Modroiu [Fri, 29 Jan 2010 16:55:45 +0000 (17:55 +0100)]
xlog(k): two new functions xlogl and xdbgl

- xlogl is similar to xlog, in adition prints the config line number at
  the beninning of message
- xdbgl is similar to xdbg, in adition prints the config line number at
  the beninning of message
- (c) updated to reflect current content
- handy for troubleshooting as same messages might be used across
  config, making easier to follow the execution path

10 years agoMakefile: app_python added to exclude_modules
Daniel-Constantin Mierla [Fri, 29 Jan 2010 14:00:12 +0000 (15:00 +0100)]
Makefile: app_python added to exclude_modules

- depends on python devel libs

10 years agoRevert "Revert "Add Python module, still WIP, but should be usable. No xml"."
sobomax [Fri, 29 Jan 2010 12:48:21 +0000 (04:48 -0800)]
Revert "Revert "Add Python module, still WIP, but should be usable. No xml"."

This reverts commit e08eaddb181637f4fbb3a165fb0827b9a964f6bd.

10 years agoRevert "Add Python module, still WIP, but should be usable. No xml".
sobomax [Fri, 29 Jan 2010 12:42:06 +0000 (04:42 -0800)]
Revert "Add Python module, still WIP, but should be usable. No xml".
Hopefully Gods of GIT will be more forgiving to poor me this time.

This reverts commit cfd0e860c912645708c7286f02d8fc92b2f1f61d.

10 years agoAdd Python module, still WIP, but should be usable. No xml
sobomax [Fri, 29 Jan 2010 12:30:28 +0000 (04:30 -0800)]
Add Python module, still WIP, but should be usable. No xml
documentation yet, some notes can be found here:

http://www.b2bua.org/wiki/PythonSEROpenSIPSKamailio

If anybody wants to step in and lend me a helping hand with the
xml docs please be my guest.

Thanks to the Daniel-Constantin Mierla for the help with the
port.

10 years agopv: fix compile warning for snprintf
Daniel-Constantin Mierla [Fri, 29 Jan 2010 12:08:04 +0000 (13:08 +0100)]
pv: fix compile warning for snprintf

10 years agoMerge remote branch 'origin/andrei/pointer_alias_warnings'
Andrei Pelinescu-Onciul [Thu, 28 Jan 2010 19:19:49 +0000 (20:19 +0100)]
Merge remote branch 'origin/andrei/pointer_alias_warnings'

compile warning fixes

* origin/andrei/pointer_alias_warnings:
  rr(s): fix recently introduced avp_cookie name bug
  core: avp aliasing warning fixes
  group: fix pointer aliasing warnings
  rr: pointer aliasing warning fixes
  db_postgres: pointer aliasing warnings fixes
  core: pointer aliasing warnings fixed
  cfg: fixed pointer aliasing warnings

Conflicts:
cfg/cfg_ctx.h
route.c

10 years agorr(s): fix recently introduced avp_cookie name bug andrei/pointer_alias_warnings
Andrei Pelinescu-Onciul [Thu, 28 Jan 2010 18:58:06 +0000 (19:58 +0100)]
rr(s): fix recently introduced avp_cookie name bug

- fix bug introduced in 34dc702 (while trying to fix pointer
  aliasing warnings)

10 years agocore: avp aliasing warning fixes
Andrei Pelinescu-Onciul [Thu, 28 Jan 2010 18:52:37 +0000 (19:52 +0100)]
core: avp aliasing warning fixes

- fixed bug introduced in e95c077.

10 years agopv(k): use $TV(Sn) for string timeval
Daniel-Constantin Mierla [Thu, 28 Jan 2010 18:43:50 +0000 (19:43 +0100)]
pv(k): use $TV(Sn) for string timeval

- previous commit introduced a naming conflict on 'sn'

10 years agopv(k): added $PV(sn)
Daniel-Constantin Mierla [Thu, 28 Jan 2010 18:35:10 +0000 (19:35 +0100)]
pv(k): added $PV(sn)

- string representation of current timeval (not cached)
- idea by Klaus Darilion

10 years agokamctl: added mtree sql scripts
Daniel-Constantin Mierla [Thu, 28 Jan 2010 17:57:39 +0000 (18:57 +0100)]
kamctl: added mtree sql scripts

10 years agomtree: added db table definition
Daniel-Constantin Mierla [Thu, 28 Jan 2010 17:54:08 +0000 (18:54 +0100)]
mtree: added db table definition

10 years agokamctl: added files for uac remote registrations
Daniel-Constantin Mierla [Thu, 28 Jan 2010 14:49:07 +0000 (15:49 +0100)]
kamctl: added files for uac remote registrations

10 years agouac(k): added table for remote user registration
Daniel-Constantin Mierla [Thu, 28 Jan 2010 14:47:02 +0000 (15:47 +0100)]
uac(k): added table for remote user registration

- xml files to generate db schema for uac module for remote server
  registrations

10 years agorenamed kamailio radius dictionary
Daniel-Constantin Mierla [Thu, 28 Jan 2010 13:21:57 +0000 (14:21 +0100)]
renamed kamailio radius dictionary

- matches the pattern used for install dictionary.$cfg_name

10 years agoMakefile: test if cfg, -basic and -oob exist
Daniel-Constantin Mierla [Thu, 28 Jan 2010 13:07:45 +0000 (14:07 +0100)]
Makefile: test if cfg, -basic and -oob exist

- cfg install check the existence of the files before atempting to copy
- name of cfg to install depends on flavour

10 years agoMakefile: use pkg/$MAIN_NAME/debian for defs
Daniel-Constantin Mierla [Thu, 28 Jan 2010 12:53:58 +0000 (13:53 +0100)]
Makefile: use pkg/$MAIN_NAME/debian for defs

- if pkg/$MAIN_NAME/debian dir exists use it to build debs, otherwise
  use pkg/debian

10 years agoMakefile: install kamctl for kamailio flavour
Daniel-Constantin Mierla [Thu, 28 Jan 2010 12:52:00 +0000 (13:52 +0100)]
Makefile: install kamctl for kamailio flavour

10 years agomtree: module compiles now
Daniel-Constantin Mierla [Thu, 28 Jan 2010 12:46:46 +0000 (13:46 +0100)]
mtree: module compiles now

- after early shm intialization was merged back from 3.0

10 years agoMakefile.defs: moved init of vars before FLAVOUR updates
Daniel-Constantin Mierla [Thu, 28 Jan 2010 12:44:08 +0000 (13:44 +0100)]
Makefile.defs: moved init of vars before FLAVOUR updates

- some vars might depend on type of FLAVOUR installed
- kamailio flavour compiles shm stats by default

10 years agoMakefile: version set to 3.0.99-dev1
Daniel-Constantin Mierla [Thu, 28 Jan 2010 12:34:21 +0000 (13:34 +0100)]
Makefile: version set to 3.0.99-dev1

10 years agopv(k): new PV class to select next hop attributes
Daniel-Constantin Mierla [Thu, 28 Jan 2010 11:53:08 +0000 (12:53 +0100)]
pv(k): new PV class to select next hop attributes

- use dst_uri if set otherwise new r-uri or original r-uri
- $nh(u) - uri
- $nh(U) - username
- $nh(d) - domain
- $nh(p) - port
- $nh(P) - protocol

10 years agopresence(k): dynamic support for new event package
Daniel-Constantin Mierla [Thu, 28 Jan 2010 11:06:07 +0000 (12:06 +0100)]
presence(k): dynamic support for new event package

- patch by Aymeric Moizard
- events can be given as EVENT_OTHER, matching being done on string
  value

10 years agomodules_k:siputils Improved documentation of ring_timeout parameter
Marius Zbihlei [Thu, 28 Jan 2010 10:10:24 +0000 (12:10 +0200)]
modules_k:siputils Improved documentation of ring_timeout parameter

10 years agopv(k): added new PV class to get timeval attributes
Daniel-Constantin Mierla [Wed, 27 Jan 2010 22:17:59 +0000 (23:17 +0100)]
pv(k): added new PV class to get timeval attributes

- $TV(s) - struct timeval tv_sec (cached per sip message)
- $TV(u) - struct timeval tv_usec (cached per sip message)
- $TV(sn) - struct timeval tv_sec (not cached)
- $TV(un) - struct timeval tv_usec (not cached)

10 years agosl(k): docs extension, dependency on tm
Henning Westerholt [Wed, 27 Jan 2010 16:38:17 +0000 (17:38 +0100)]
sl(k): docs extension, dependency on tm

10 years agodrouting: register MI commands
Daniel-Constantin Mierla [Wed, 27 Jan 2010 11:33:26 +0000 (12:33 +0100)]
drouting: register MI commands

- the module didn't register the MI commands in mod init
- reported by Denis Putyato

10 years agodrouting: updated db schema definition
Daniel-Constantin Mierla [Wed, 27 Jan 2010 11:27:51 +0000 (12:27 +0100)]
drouting: updated db schema definition

- use module name in description
- more appropriate field sizes

10 years agoMakefile: intialization of FLAVOUR var
Daniel-Constantin Mierla [Wed, 27 Jan 2010 11:15:14 +0000 (12:15 +0100)]
Makefile: intialization of FLAVOUR var

- use ?= instead of = to enable usage of value from env

10 years agoMerge remote branch 'origin/sr_3.0'
Andrei Pelinescu-Onciul [Wed, 27 Jan 2010 10:31:25 +0000 (11:31 +0100)]
Merge remote branch 'origin/sr_3.0'

latest sr_3.0 and kamailio_3.0 backports

* origin/sr_3.0: (90 commits)
  usrloc(k): rpc version for ul.dump
  core: init the len of sock_str attribute
  ctl: added parameters to control buffer size
  htable(k): rpc commad to dump htable
  pv(k): fixed $shv engine
  sanity: print From hdr in warning message
  nathelper(k): print bad contact uri
  core: more verbose when error parsing hdr
  kamailio.cfg: updated cfg with sample PSTN gw routing
  nathelper(k): fix for swap scenario
  presence(k): aliased MLA to SLA
  core: event parsing enahced for dialog;ma
  tm: documented t_relay_to() function
  tm: added t_relay_to(proxy, flags)
  tm: documented t_replicate() functions
  tm: t_replicate() can take avps & select as params
  tm: added t_replicate(uri)
  db_oracle: use PARAM_TYPE_MASK when checking param type
  snmpstats: fix param type checking
  core: define module_loaded to use find_module_by_name
  ...

Conflicts:
lib/srdb1/schema/dr_gateways.xml
lib/srdb1/schema/dr_groups.xml
lib/srdb1/schema/dr_gw_lists.xml
lib/srdb1/schema/dr_rules.xml
lib/srdb1/schema/kamailio-drouting.xml
modules/ctl/README
modules/topoh/README
modules_k/uac/auth.c
modules_k/uac/uac_send.c
parser/parse_param.h
utils/kamctl/mysql/drouting-create.sql
utils/kamctl/oracle/drouting-create.sql
utils/kamctl/postgres/drouting-create.sql

10 years agoapp_lua: added sl module to Lua
Daniel-Constantin Mierla [Tue, 26 Jan 2010 22:40:49 +0000 (23:40 +0100)]
app_lua: added sl module to Lua

- sl send_reply() function exported to Lua under module sr.sl
- restructured existing code for easier extensibility
- allow to register optional modules to Lua via new parameter 'register'

10 years agoMakefile: excluded app_lua from compile list
Daniel-Constantin Mierla [Tue, 26 Jan 2010 19:31:18 +0000 (20:31 +0100)]
Makefile: excluded app_lua from compile list

- depends on liblua5.1-dev

10 years agoMerge remote branch 'origin/tmp/k3.0_sr_backports' into sr_3.0
Andrei Pelinescu-Onciul [Tue, 26 Jan 2010 19:10:53 +0000 (20:10 +0100)]
Merge remote branch 'origin/tmp/k3.0_sr_backports' into sr_3.0

* origin/tmp/k3.0_sr_backports: (86 commits)
  usrloc(k): rpc version for ul.dump
  core: init the len of sock_str attribute
  ctl: added parameters to control buffer size
  htable(k): rpc commad to dump htable
  pv(k): fixed $shv engine
  sanity: print From hdr in warning message
  nathelper(k): print bad contact uri
  core: more verbose when error parsing hdr
  kamailio.cfg: updated cfg with sample PSTN gw routing
  nathelper(k): fix for swap scenario
  presence(k): aliased MLA to SLA
  core: event parsing enahced for dialog;ma
  tm: documented t_relay_to() function
  tm: added t_relay_to(proxy, flags)
  tm: documented t_replicate() functions
  tm: t_replicate() can take avps & select as params
  tm: added t_replicate(uri)
  db_oracle: use PARAM_TYPE_MASK when checking param type
  snmpstats: fix param type checking
  core: define module_loaded to use find_module_by_name
  ...

10 years agoreg(k): fix a (probably) copy and paste error
Henning Westerholt [Tue, 26 Jan 2010 16:50:02 +0000 (17:50 +0100)]
reg(k): fix a (probably) copy and paste error

10 years agoapp_lua: run Lua scripts from cfg
Daniel-Constantin Mierla [Mon, 25 Jan 2010 23:11:02 +0000 (00:11 +0100)]
app_lua: run Lua scripts from cfg

- new module to run embedded Lua scripts from cfg
- module exports functions to Lua in order to access current processed
  SIP message
- uses two Lua contexts, one for cached scripts (run functions from them
  at runtime) and one for execution of entire Lua scripts at runtime
- so far exported to Lua
- dbg, err and log functions - print messages using internal DBG API
- sr.hdr.{append, insert, remove, append_to_reply} - header
  management
- sr.pv.{get, seti, setf, unset, is_null} - PV management

10 years agouac(k): added remote registration capability
Daniel-Constantin Mierla [Sun, 24 Jan 2010 20:48:20 +0000 (21:48 +0100)]
uac(k): added remote registration capability

- uac module can register contacts to a remote server
- can auth REGISTER challenges
- uses db table uacreg to load credentials at startup
- no reload for now (have to restart to get the db updates)
- rpc function uac.reg_dump to dump in-memory table

10 years agouac(k): use header types for detection
Daniel-Constantin Mierla [Sun, 24 Jan 2010 20:21:59 +0000 (21:21 +0100)]
uac(k): use header types for detection

10 years agouac(k): renamed static var to avoid conflicts
Daniel-Constantin Mierla [Sun, 24 Jan 2010 20:21:08 +0000 (21:21 +0100)]
uac(k): renamed static var to avoid conflicts

10 years agouac(k): proper test for send failure
Daniel-Constantin Mierla [Sun, 24 Jan 2010 20:20:02 +0000 (21:20 +0100)]
uac(k): proper test for send failure

10 years agouac(k): exported functions for auth
Daniel-Constantin Mierla [Sun, 24 Jan 2010 18:49:21 +0000 (19:49 +0100)]
uac(k): exported functions for auth

- added prototypes and structures to .h

10 years agouac(k): set type for tm callback
Daniel-Constantin Mierla [Sun, 24 Jan 2010 18:43:09 +0000 (19:43 +0100)]
uac(k): set type for tm callback

- requires to be TMCB_LOCAL_COMPLETED

10 years agomodules_k/ratelimit Using ser's cfg framework for modifying module parameters at...
Marius Zbihlei [Fri, 22 Jan 2010 10:23:33 +0000 (12:23 +0200)]
modules_k/ratelimit Using ser's cfg framework for modifying module parameters at runtime(reply_code and reply_reason).

The patch allow reply_code and reply_reason to be modified using sercmd (modules/ctl/ctl.so and
modules/cfg_rpc/cfg_rpc.so must be loaded).Check module documentation for example.
Also it is interesting if we can modify at runtime other parameters of the module, like queue and pipe

10 years agoldap(k): fix ldapsearch with empty filter
Henning Westerholt [Thu, 21 Jan 2010 18:26:08 +0000 (19:26 +0100)]
ldap(k): fix ldapsearch with empty filter

  * fix ldapsearch with empty filter
  * When in routing script ldapsearch() is executed on LDAP query URL without
    the ‘filter’ section, request forming fails:
    ERROR: ldap [ldap_api_fn.c:193]: vsnprintf failed
  * Workaround for administrators can be filling filter section with
    ‘(objectclass=*)’, what is anyway substituted by ldap library to request
    in case filter parameter set to NULL.
 * Please notice that va_end() call is missing in original code.
 * Patch FS#23 from andrey dot utkin at wildix dot com

10 years agoutils/sercmd: Fixed getopt() missing param
Marius Zbihlei [Thu, 21 Jan 2010 15:32:42 +0000 (17:32 +0200)]
utils/sercmd: Fixed getopt() missing param

Getopt was missing the -U param