sip-router
10 years agomake: on-the-fly dependency generation
Andrei Pelinescu-Onciul [Wed, 10 Mar 2010 08:25:13 +0000 (09:25 +0100)]
make: on-the-fly dependency generation

- support on-the-fly dependency file generation with gcc >=3.0
 (the dependency files are generated while compiling the object
 file, eliminating another gcc+sed invocation)

- support for using makedepend -f-  for generating dependencies
 E.g.: make cfg MKDEP="makedepend -f-". In general gcc should be
 preferred if available (use this if you don't have gcc and your
 compiler doesn't generate good deps).

10 years agomake: depends move/rm file fix & optimization
Andrei Pelinescu-Onciul [Tue, 9 Mar 2010 20:57:25 +0000 (21:57 +0100)]
make: depends move/rm file fix & optimization

- fix for make failing if the depends were made and a *.h is moved
  or deleted
- avoid restarting make when depends change (make the depends at
  the same moment when the .o are generated)

10 years agomodules/carrierroute Ser cfg framework for some carrierroute parameters (fetch_rows...
Marius Zbihlei [Tue, 9 Mar 2010 12:54:49 +0000 (14:54 +0200)]
modules/carrierroute Ser cfg framework for some carrierroute parameters (fetch_rows, use_domain and fallback_default)

Added support for cfg framework for some parameters
Updated documentation to reflect the changes

10 years agomodules_k/registrar Updated documentation to reflect ser cfg framework integration
Marius Zbihlei [Mon, 8 Mar 2010 14:11:05 +0000 (16:11 +0200)]
modules_k/registrar Updated documentation to reflect ser cfg framework integration

10 years agodoc: select_list regenerated
Andrei Pelinescu-Onciul [Sun, 7 Mar 2010 11:58:06 +0000 (12:58 +0100)]
doc: select_list regenerated

10 years agodoc: cfg_list regenerated
Andrei Pelinescu-Onciul [Sun, 7 Mar 2010 11:57:08 +0000 (12:57 +0100)]
doc: cfg_list regenerated

10 years agodoc: rpc_lists regenerated
Andrei Pelinescu-Onciul [Sun, 7 Mar 2010 11:56:02 +0000 (12:56 +0100)]
doc: rpc_lists regenerated

10 years agotm: rpc doc strings moved to tm.c
Andrei Pelinescu-Onciul [Sun, 7 Mar 2010 11:52:27 +0000 (12:52 +0100)]
tm: rpc doc strings moved to tm.c

Moved all the rpc doc strings into tm.c, close to the rpc exports
declaration. This will also allow automatic documentation
generation for the rpcs (the script that generates the rpc docs,
parses C code and cannot "resolve" symbols defined in other
files).

10 years agodoc rpc: fix xmllint errors
Andrei Pelinescu-Onciul [Sun, 7 Mar 2010 11:31:59 +0000 (12:31 +0100)]
doc rpc: fix xmllint errors

Fix unsupported xmlns:xi attrib., missing example titles and
text or examples outside sections.

10 years agodoc: dump_selects.pl: fix bare <listitem> in generated xmls
Andrei Pelinescu-Onciul [Sun, 7 Mar 2010 11:28:04 +0000 (12:28 +0100)]
doc: dump_selects.pl: fix bare <listitem> in generated xmls

- <listitem></listitem> cannot contain bare text => switched to
  using <simpara></simpara> inside

10 years agodoc: *_list: fix xmllint errors and TOC
Andrei Pelinescu-Onciul [Sun, 7 Mar 2010 11:24:02 +0000 (12:24 +0100)]
doc: *_list: fix xmllint errors and TOC

- fix xmllint erros
- use a 0-level TOC (such that the main TOC will list only the
  chapters and not also the sections)

10 years agodoc: *_list makefiles and files lists updates
Andrei Pelinescu-Onciul [Sat, 6 Mar 2010 12:57:46 +0000 (13:57 +0100)]
doc: *_list makefiles and files lists updates

- added new makefile targets: gen-files-list (generate the file
  lists in a makefile-ready-to-paste format), diff-list
   (searches for files and prints the one which are not listed
   in the makefile).
- updated make autogen to obey the excluded file and group lists
- updated the files lists for cfg_list, rpc_list and select_list.
  Now they are in alphabetical order, with core groups first, as
  generated by make gen-files-list.
- fixed title for the config var list

10 years agodoc: cfg_list regenerated
Andrei Pelinescu-Onciul [Fri, 5 Mar 2010 18:17:06 +0000 (19:17 +0100)]
doc: cfg_list regenerated

10 years agodoc: cfg_list: updated module list
Andrei Pelinescu-Onciul [Fri, 5 Mar 2010 18:14:27 +0000 (19:14 +0100)]
doc: cfg_list: updated module list

Added siputils, registrar(k) and ratelimit.

10 years agodoc: rpc_list regenerated
Andrei Pelinescu-Onciul [Fri, 5 Mar 2010 18:10:22 +0000 (19:10 +0100)]
doc: rpc_list regenerated

10 years agodoc: rpc_list: updated the module list
Andrei Pelinescu-Onciul [Fri, 5 Mar 2010 18:04:25 +0000 (19:04 +0100)]
doc: rpc_list: updated the module list

Removed rls(s), pike(s) and pa(s) (obsolete) and add
debugger htable, usrloc(k) and uac(k).
Changed the name for usrloc(s) and usrloc(k) so that there won't
be name conflicts.

10 years agodoc: select_list regenerated
Andrei Pelinescu-Onciul [Fri, 5 Mar 2010 17:43:44 +0000 (18:43 +0100)]
doc: select_list regenerated

10 years agoMerge remote branch 'origin/andrei/cdefs2doc'
Andrei Pelinescu-Onciul [Fri, 5 Mar 2010 17:33:44 +0000 (18:33 +0100)]
Merge remote branch 'origin/andrei/cdefs2doc'

* origin/andrei/cdefs2doc: (23 commits)
  doc: select_list: added intro & notations sections
  doc: select_list: generated docbook and txt lists
  doc: select_list: added makefiles for auto-gen.
  doc: {rpc,cfg}_list: fix makefile exclude list
  doc: dump_selects.pl: fix for incomplete initializers
  doc: dump_selects.pl: support for docbook output
  doc: cfg_list: generated docbook cfg vars lists
  doc: cfg_list: docbook output directory
  doc: cfg_list: support for generating docbook output
  doc: dump_cfg_defs.pl: support for docbook output
  doc: rpc_list: generated docbook rpc lists
  doc: rpc_list: docbook output directory
  doc: rpc_list: support for generating docbook output
  doc: dump_rpcs.pl: support for docbook output
  doc: select doc generator: more fixes & core selects support
  doc: select doc generator fix flags processing
  doc: generated rpc lists
  doc: generated cfg vars lists
  doc: added makefiles for auto-gen. rpc and cfg vars lists
  doc: script to generate select lists from C code
  ...

10 years agomodules_k/permisssions Fixed a bug that caused a segmentation fault if the mi_fifo...
Marius Zbihlei [Fri, 5 Mar 2010 14:54:58 +0000 (16:54 +0200)]
modules_k/permisssions Fixed a bug that caused a segmentation fault if the mi_fifo subnet_dump was issued
but the permissions module was not fully configured (no db url given)

10 years agomodules_k/userblacklist : check_blacklist function uses globalblacklist_table as...
Marius Zbihlei [Fri, 5 Mar 2010 14:32:49 +0000 (16:32 +0200)]
modules_k/userblacklist : check_blacklist function uses globalblacklist_table as data source if no parameter is given.

Globalblacklist_table parameter was not used at all in the userblacklist module, the check_blacklist funtion always needing
one parameters and the db table. This is not mandatory anymore, as the check_blacklist function with no parameters will use
the globalblacklist_table

10 years agomodules/lcr: improved documentation related to defunct_gw function
Juha Heinanen [Fri, 5 Mar 2010 04:44:03 +0000 (06:44 +0200)]
modules/lcr: improved documentation related to defunct_gw function
(cherry picked from commit 98607744d233e03ba6e71f076ee4dd5e68d4407b)

10 years agodoc: select_list: added intro & notations sections
Andrei Pelinescu-Onciul [Thu, 4 Mar 2010 18:27:33 +0000 (19:27 +0100)]
doc: select_list: added intro & notations sections

10 years agopipelimit: module for pipe traffic limit
Daniel-Constantin Mierla [Sun, 24 Jan 2010 21:25:03 +0000 (22:25 +0100)]
pipelimit: module for pipe traffic limit

- based on ratelimit
- has only pipe functionality so far
- pipe definitions loaded from database
- pipe id is name
- dynamic management of piples
(cherry picked from commit 163cd084ab97d8938dd014867f70811f0cffa54f)

10 years agomakefile: fix modules config overwrite
Andrei Pelinescu-Onciul [Thu, 4 Mar 2010 12:16:06 +0000 (13:16 +0100)]
makefile: fix modules config overwrite

A config file provided by a module was installed even if a
previous version was already installed, overwriting the old
version. Now if a file with the same name already exists, the
module config file will be installed with a .sample extension
added (so only .sample will be overwritten, never an active .cfg).

Reported-by: Klaus Darilion klaus.mailinglists pernau at
Closes FlySpray#38 .

10 years agodoc: fix links & path for ctl & xmlrpc
Andrei Pelinescu-Onciul [Thu, 4 Mar 2010 09:52:50 +0000 (10:52 +0100)]
doc: fix links & path for ctl & xmlrpc

ctl & xmlrpc were moved from modules_s/ to modules/, but the
links to them in the docs were not updated.

10 years agoremoved duplicate modules_s/tls
Andrei Pelinescu-Onciul [Thu, 4 Mar 2010 09:07:48 +0000 (10:07 +0100)]
removed duplicate modules_s/tls

The up-to-date tls module is modules/tls.

10 years ago* modules_k/permissions: subnet matching fix (credits to anonymous)
Juha Heinanen [Thu, 4 Mar 2010 07:09:22 +0000 (09:09 +0200)]
* modules_k/permissions: subnet matching fix (credits to anonymous)

10 years agotest: added parse to body test program
Andrei Pelinescu-Onciul [Wed, 3 Mar 2010 18:30:04 +0000 (19:30 +0100)]
test: added parse to body test program

- added parse to body test program that uses the same code as
  sip-router. E.g. test/parse_to_body "Foo <foo@bar>CR".
- update p_uri (parse uri test) to compile with sip-router.

10 years agocore: define shm_str_dup() only ifdef SHM_MEM
Andrei Pelinescu-Onciul [Wed, 3 Mar 2010 18:29:04 +0000 (19:29 +0100)]
core: define shm_str_dup() only ifdef SHM_MEM

10 years agocore: parse_to display name multi-token no-quotes fix
Andrei Pelinescu-Onciul [Wed, 3 Mar 2010 18:24:08 +0000 (19:24 +0100)]
core: parse_to display name multi-token no-quotes fix

Fix for properly returning a non-quoted display name that is
composed of several tokens (contains spaces). The previous version
would set the display name to the first token, in this case
(e.g. Foo Bar <sip:foo@bar> resulted in display_name="Foo" instead
 of "Foo Bar").

Reported-by: Ronald Voermans ronald voermans nu
Closes FlySpray#39 .

10 years agoparse_param: Let the body point behind '=' when body is missing.
Jan Janak [Tue, 2 Mar 2010 21:03:42 +0000 (16:03 -0500)]
parse_param: Let the body point behind '=' when body is missing.

This fixes potential issues with functions that copy parameters
structures from private to shared memory because such functions
usually translate string pointers using a base pointing at the
first character of the parameter list.

Reported by Daniel.

10 years agoparam_parser: Accept parameters with missing bodies.
Jan Janak [Tue, 23 Feb 2010 19:38:31 +0000 (14:38 -0500)]
param_parser: Accept parameters with missing bodies.

This change makes the parameter parser more forgiving. It accepts
parameters with missing bodies (foo=), such parameters will have
the body set to an empty string. Observed on iptel.org

10 years agocore: added missing parsed flags & minor get_hdr optimization
Andrei Pelinescu-Onciul [Tue, 2 Mar 2010 16:41:37 +0000 (17:41 +0100)]
core: added missing parsed flags & minor get_hdr optimization

- parsed flags were not set for some headers (ACCEPTCONTACT,
ALLOWEVENTS, CONTENTENCODING, REFERREDBY, REJECTCONTACT,
REQUESTDISPOSITION, WWW_AUTHENTICATE, PROXY_AUTHENTICATE,
RETRY_AFTER).

- get_hdr() now checks first if the required header type was
  parsed using the parsed flags. If it was not, it exists
  immediately (it does not try to search through all the headers
  anymore).

10 years agocore: msg_parse minor 64bit warning fix
Andrei Pelinescu-Onciul [Fri, 26 Feb 2010 14:21:50 +0000 (15:21 +0100)]
core: msg_parse minor 64bit warning fix

10 years agotm: experimental tm onreply_route final reply DROP support
Andrei Pelinescu-Onciul [Fri, 26 Feb 2010 14:10:49 +0000 (15:10 +0100)]
tm: experimental tm onreply_route final reply DROP support

Experimental support for dropping final replies from tm
onreply_route[]s. It's disabled by default (causes a small
performance hit and it's not needed in most cases).
To enable re-compile tm with -DTM_ONREPLY_FINAL_DROP_OK
(e.g. make cfg extra_defs=-DTM_ONREPLY_FINAL_DROP_OK; make all
 or make -C modules/tm extra_defs=-DTM_ONREPLY_FINAL_DROP_OK)

10 years agotls: TLS_MALLOC_DBG can now be set on make cfg
Andrei Pelinescu-Onciul [Fri, 26 Feb 2010 12:39:55 +0000 (13:39 +0100)]
tls: TLS_MALLOC_DBG can now be set on make cfg

Enabling tls extra malloc debugging info, does not require anymore
editing tls_init.c. It can be enabled at cfg time
(make cfg extra_defs=-DTLS_MALLOC_DBG) or at compile/re-compile
time ( make -C modules/tls clean;
       make -C modules/tls extra_defs=-DTLS_MALLOC_DBG).
When TLS_MALLOC_DBG is enabled, an extra warning will be printed
at compile time. NO_TLS_MALLOC_DBG takes precedence over
TLS_MALLOC_DBG.

10 years agouserblacklist(k): short term fix in the docs for redundant table definition
Henning Westerholt [Wed, 24 Feb 2010 16:04:54 +0000 (17:04 +0100)]
userblacklist(k): short term fix in the docs for redundant table definition

10 years agocfg parser: segfault on case RE parse error fix
Andrei Pelinescu-Onciul [Wed, 24 Feb 2010 14:13:12 +0000 (15:13 +0100)]
cfg parser: segfault on case RE parse error fix

Reported-by: Klaus Feichtinger klaus.feichtinger gmx net
10 years agoreg(k): fix compilation for kamailio flavour, reported from Daniel
Henning Westerholt [Wed, 24 Feb 2010 14:07:38 +0000 (15:07 +0100)]
reg(k): fix compilation for kamailio flavour, reported from Daniel

10 years agotls: disable kerberos more thoroughly [fix]
Andrei Pelinescu-Onciul [Tue, 23 Feb 2010 15:10:21 +0000 (16:10 +0100)]
tls: disable kerberos more thoroughly [fix]

Older openssl versions (< 0.9.8e release) have a bug in the
kerberos code (it uses the wrong malloc, for more details see
openssl bug # 1467). While there is already a workaround for this
openssl bug in the sr code (see commits 36cb8f & 560a42), in some
situations this workaround causes another bug (crash on connection
opening when openssl is compiled with kerberos support and
kerberos is enabled for key exchange).
The current fix will disable automatically all the ciphers containing
KRB5 if the openssl version is < 0.9.8e beta1 or it is between
0.9.9-dev and 0.9.9-beta1.
It iss equivalent to setting cipher_list to "<prev. value>:!KRB5".

Impact: this fix is needed only if openssl is compiled with
kerberos support and the version is < 0.9.8e. It also affects at
least CentOS users with openssl-0.9.8e-12.el5_4.1 (in the centos
openssl package they play some strange games with the version and
report 0.9.8b via SSLeay).

Tested-by: Klaus Darilion klaus.mailinglists at pernau.at
Reported-by: Klaus Darilion klaus.mailinglists at pernau.at
Reported-by: Andreas Rehbein rehbein at e-technik.org
Reported-by: Martin Koenig koenig starface.de
10 years agovarious modules: don't access route_type directly
Andrei Pelinescu-Onciul [Mon, 22 Feb 2010 18:45:14 +0000 (19:45 +0100)]
various modules: don't access route_type directly

route_type should be accessed only through get_route_type() or
is_route_type(FOO).
Replaced all the route_type==FOO_ROUTE with
is_route_type(FOO_ROUTE).

10 years agotmx(k): core & tm onreply route support
Andrei Pelinescu-Onciul [Mon, 22 Feb 2010 18:41:33 +0000 (19:41 +0100)]
tmx(k): core & tm onreply route support

- support for core onreply route (like for tm onreply route, but
  with extra t_unref).
- use get_route_type() instead of directly accessing route_type.

10 years agotm: t_check_status & t_reply main onreply_route fix
Andrei Pelinescu-Onciul [Mon, 22 Feb 2010 18:38:40 +0000 (19:38 +0100)]
tm: t_check_status & t_reply main onreply_route fix

- t_check_status: in some situations t_check_status left the
  transaction referenced when called from main onreply_route (e.g.
  t_check_status(); drop )
- t_reply: unref the transaction only when called from the main
  onreply_route and not from tm onreply route

10 years agotm: onreply_route: fix cleanup after DROP
Andrei Pelinescu-Onciul [Mon, 22 Feb 2010 17:01:26 +0000 (18:01 +0100)]
tm: onreply_route: fix cleanup after DROP

After a DROP in the onreply_route the avp lists where not restored
to their original values and the possible msg flags changes in the
script were dropped.

10 years agoNEWS: note about onreply_route changes & tm
Andrei Pelinescu-Onciul [Mon, 22 Feb 2010 17:00:30 +0000 (18:00 +0100)]
NEWS: note about onreply_route changes & tm

10 years agotm: t_reply can now be used from onreply_routes
Andrei Pelinescu-Onciul [Mon, 22 Feb 2010 16:50:40 +0000 (17:50 +0100)]
tm: t_reply can now be used from onreply_routes

t_reply can now be used both from the main onreply_route
(onreply_route{}) or from tm onreply_routes (onreply_route[x]{},
where x!=0).
In general it should be followed by a DROP. If not you might get
some log warning messages (but besides that nothing bad will
happen).

10 years agotm: _reply cleans up after itself
Andrei Pelinescu-Onciul [Mon, 22 Feb 2010 16:48:45 +0000 (17:48 +0100)]
tm: _reply cleans up after itself

The _reply() function now cleans possible added reply_lumps before
exiting. This allows using it not only from request or failure
route.

10 years agotm: restrict tm onreply_route commands to tm reply routes only
Andrei Pelinescu-Onciul [Mon, 22 Feb 2010 15:41:59 +0000 (16:41 +0100)]
tm: restrict tm onreply_route commands to tm reply routes only

- most tm onreply functions restricted to tm onreply routes only.
  They cannot be executed anymore from the  main/core
  onreply_route (some of them won't work and others would leave the
  transaction referenced).
- don't access route_type directly, but via get_route_type()

10 years agotm: tm onreply route has now TM_ONREPLY_ROUTE type
Andrei Pelinescu-Onciul [Mon, 22 Feb 2010 13:53:42 +0000 (14:53 +0100)]
tm: tm onreply route has now TM_ONREPLY_ROUTE type

10 years agocore: distinct core and tm onreply route tests
Andrei Pelinescu-Onciul [Mon, 22 Feb 2010 13:49:37 +0000 (14:49 +0100)]
core: distinct core and tm onreply route tests

- added TM_ONREPLY_ROUTE and CORE_ONREPLY_ROUTE to the possible
route types. This allows to distinguish between the main reply
route (executed by the core) and onreply routes executed by tm.
ONREPLY_ROUTE was changed to TM_ONREPLY_ROUTE|CORE_ONREPLY_ROUTE,
so that is_route_type(ONREPLY_ROUTE) will return true both for
 CORE_ONREPLY_ROUTE and TM_ONREPLY_ROUTE.

- onreply_route[0] {} is equivalent with onreply_route{}.

- use different route types when parsing the script for
 onreply_route{} (CORE_ONREPLY_ROUTE) and onreply_route[x]{},
  where x!=0 (TM_ONREPLY_ROUTE).

10 years agoMerge remote branch 'origin/andrei/blst_send_flags'
Andrei Pelinescu-Onciul [Fri, 19 Feb 2010 15:37:51 +0000 (16:37 +0100)]
Merge remote branch 'origin/andrei/blst_send_flags'

Support for blacklist ignore flags, both global and on a per
message basis.
E.g.:
per message:
if (method=~"MESSAGE")
blst_set_ignore(6);

global:
sercmd cfg.set_now_int core dst_blacklist_tcp_imask 16

* origin/andrei/blst_send_flags:
  NEWS: minor blacklist flag number correction
  tm: blacklist on 503 reply fixed for send flags
  NEWS: mentioned blacklist ignore masks
  core: cfg script support for blacklist ignore masks
  blst: global config variables for ignoring blacklist events
  blst: docs for blst_{set,clear}_ignore script functions
  blst: functions for ignoring blacklist events
  blst: use dst_blacklist_force_add
  tm: simplified blacklist add code
  blacklist: ignore mask support
  tm: updated to the new snd_flags_t structure
  core: send_flags preliminary blacklist support

Conflicts:
NEWS
cfg.lex
cfg.y
dst_blacklist.h

10 years agoNEWS: minor blacklist flag number correction
Andrei Pelinescu-Onciul [Fri, 19 Feb 2010 15:26:44 +0000 (16:26 +0100)]
NEWS: minor blacklist flag number correction

10 years agotm: blacklist on 503 reply fixed for send flags
Andrei Pelinescu-Onciul [Fri, 19 Feb 2010 14:35:57 +0000 (15:35 +0100)]
tm: blacklist on 503 reply fixed for send flags

Blacklisting the source of a 503 reply now obeys also the
blacklist ignore masks (both global and per message).
The ignore 503 blacklist flag can be set (and it will be obeyed)
in any route (be it main route, on branch, on send or the on_reply
route). E.g.: using blst_set_ignore(32) in the onsend_route for a
specific destination would cause the ignore 503 flag to be
inherited by the 503 reply (this is the only blacklist flag that
it's inherited this way).

10 years agoMerge remote branch 'origin/sr_3.0'
Andrei Pelinescu-Onciul [Fri, 19 Feb 2010 11:05:41 +0000 (12:05 +0100)]
Merge remote branch 'origin/sr_3.0'

The dst_uri fix (see FlySpray#37) and kamctl.

* origin/sr_3.0:
  core: avoid non-null 0-length dst_uri,  ruris and path
  tm: fake_req dst_uri and ruri copy fix
  utils/kamctl: removed unsupported commands to manage lcr gateways and routes

10 years agocore: PAI & PPI header names parser fixes
Andrei Pelinescu-Onciul [Fri, 19 Feb 2010 10:55:44 +0000 (11:55 +0100)]
core: PAI & PPI header names parser fixes

Changed to the usual "case" construct. This also fixes the case
when spaces were present between the header name and ':'
(e.g. "P-Preferred-Identity : ..." was not recognized).

10 years agocore: support for parsing the Reason header
Andrei Pelinescu-Onciul [Thu, 18 Feb 2010 20:20:07 +0000 (21:20 +0100)]
core: support for parsing the Reason header

10 years agodoc: select_list: generated docbook and txt lists
Andrei Pelinescu-Onciul [Thu, 18 Feb 2010 14:19:53 +0000 (15:19 +0100)]
doc: select_list: generated docbook and txt lists

10 years agodoc: select_list: added makefiles for auto-gen.
Andrei Pelinescu-Onciul [Thu, 18 Feb 2010 13:15:31 +0000 (14:15 +0100)]
doc: select_list: added makefiles for auto-gen.

Added a new directory (doc/select_list) complete with a makefile for
auto-generating lists with all the select implemented in the code.
make -C doc/select_list all will generate both .txt and .xml
files. The .xml are in docbook format and are written to
 doc/select_list/docbook, complete with a file that includes them
 all (select_list.xml).

E.g.: to generate a .html file with all the selects:
 make -C doc/select_list all  # generates the docbook
 make -C doc/select_list/docbook html

10 years agodoc: {rpc,cfg}_list: fix makefile exclude list
Andrei Pelinescu-Onciul [Thu, 18 Feb 2010 13:10:08 +0000 (14:10 +0100)]
doc: {rpc,cfg}_list: fix makefile exclude list

- fix makefile exclude groups and files (didn't work for more then
 one entry)
- added default list for make all

10 years agodoc: dump_selects.pl: fix for incomplete initializers
Andrei Pelinescu-Onciul [Thu, 18 Feb 2010 12:41:10 +0000 (13:41 +0100)]
doc: dump_selects.pl: fix for incomplete initializers

Some of the modules (e.g db_ops) omit the last members (flags) in
the select_row_t initializer. The script did not take into account
this possibility when it did parse the C code.

10 years agodoc: dump_selects.pl: support for docbook output
Andrei Pelinescu-Onciul [Thu, 18 Feb 2010 11:31:59 +0000 (12:31 +0100)]
doc: dump_selects.pl: support for docbook output

Added support for generating docbook output (by using the
 --docbook option).

10 years agodoc: cfg_list: generated docbook cfg vars lists
Andrei Pelinescu-Onciul [Wed, 17 Feb 2010 21:39:30 +0000 (22:39 +0100)]
doc: cfg_list: generated docbook cfg vars lists

10 years agodoc: cfg_list: docbook output directory
Andrei Pelinescu-Onciul [Wed, 17 Feb 2010 21:35:09 +0000 (22:35 +0100)]
doc: cfg_list: docbook output directory

Added directory for docbook output, complete with standard doc
makefile (for generating html, pdf, txt a.s.o from docbook
sources).

10 years agodoc: cfg_list: support for generating docbook output
Andrei Pelinescu-Onciul [Wed, 17 Feb 2010 21:31:43 +0000 (22:31 +0100)]
doc: cfg_list: support for generating docbook output

- make docbook will generate the cfg lists in docbook format
- make all will generate both txt and docbook
- generate docbook index file (cfg_var_list.xml)
- configurable output directories (txt_output_dir and
  docbook_output_dir)

10 years agodoc: dump_cfg_defs.pl: support for docbook output
Andrei Pelinescu-Onciul [Wed, 17 Feb 2010 21:27:01 +0000 (22:27 +0100)]
doc: dump_cfg_defs.pl: support for docbook output

Added support for generating docbook output (by using the
--docbook option).

10 years agocore: avoid non-null 0-length dst_uri, ruris and path
Andrei Pelinescu-Onciul [Wed, 17 Feb 2010 19:46:47 +0000 (20:46 +0100)]
core: avoid non-null 0-length dst_uri,  ruris and path

- a dst_uri or ruri that has 0 length should be equivalent to also
having a null corresponding char* pointer.  sip_msg_shm_clone()
will now clone this type of uris to (0,0).
- set_dst_uri() called with "" (a 0-length non-zero string) is now
  equivalent to reset_dst_uri().
- set_path_vector() called with "" is now equivalent with
  reset_path_vector().

10 years agotm: fake_req dst_uri and ruri copy fix
Andrei Pelinescu-Onciul [Wed, 17 Feb 2010 19:40:46 +0000 (20:40 +0100)]
tm: fake_req dst_uri and ruri copy fix

If the uris have 0 len but no 0 value (possible at least for a
manually set dst_uri), set the corresponding fake_req uri to 0,
thus avoiding a potentially disastrous free in free_faked_req().

Should close FS#37.

10 years agodoc: rpc_list: generated docbook rpc lists
Andrei Pelinescu-Onciul [Wed, 17 Feb 2010 16:38:05 +0000 (17:38 +0100)]
doc: rpc_list: generated docbook rpc lists

10 years agodoc: rpc_list: docbook output directory
Andrei Pelinescu-Onciul [Wed, 17 Feb 2010 16:24:46 +0000 (17:24 +0100)]
doc: rpc_list: docbook output directory

Added directory for docbook output, complete with standard doc
makefile (for generating html, pdf, txt a.s.o from docbook
sources).

10 years agodoc: rpc_list: support for generating docbook output
Andrei Pelinescu-Onciul [Wed, 17 Feb 2010 16:21:18 +0000 (17:21 +0100)]
doc: rpc_list: support for generating docbook output

- make docbook will generate the rpc lists in docbook format
- make all will generate both txt and docbook
- generate docbook index file (rpc_list.xml)
- configurable output directories (txt_output_dir and
  docbook_output_dir)

10 years agodoc: dump_rpcs.pl: support for docbook output
Andrei Pelinescu-Onciul [Wed, 17 Feb 2010 16:19:11 +0000 (17:19 +0100)]
doc: dump_rpcs.pl: support for docbook output

Added support for generating docbook output (by using the
 --docbook option).

10 years agoModules/registrar : update stats even if -DSTATISTICS was not passed to the compiles...
Marius Zbihlei [Wed, 17 Feb 2010 11:57:05 +0000 (13:57 +0200)]
Modules/registrar : update stats even if -DSTATISTICS was not passed to the compiles(this was the default)

update_stat was called even if the statistics where not added to the stats framework.

10 years agoModules_k/registrar Other module variables added to configuration framework
Marius Zbihlei [Wed, 17 Feb 2010 11:52:48 +0000 (13:52 +0200)]
Modules_k/registrar Other module variables added to configuration framework

Also added callback that modify the statistics to reflect the changes via sercmd

10 years agoNEWS: mentioned blacklist ignore masks
Andrei Pelinescu-Onciul [Wed, 17 Feb 2010 09:00:57 +0000 (10:00 +0100)]
NEWS: mentioned blacklist ignore masks

10 years agocore: cfg script support for blacklist ignore masks
Andrei Pelinescu-Onciul [Wed, 17 Feb 2010 08:58:21 +0000 (09:58 +0100)]
core: cfg script support for blacklist ignore masks

The blacklist ignore mask can now be set from the script (not only
at runtime):
 dst_blacklist_udp_imask
 dst_blacklist_tcp_imask
 dst_blacklist_tls_imask
 dst_blacklist_sctp_imask

E.g. dst_blacklist_udp_imask=16

Possible values:
0 -disabled
2 - send error
4 - connect error
8 - icmp (reserverd for future use)
16 - transaction timeout
32 - administratively prohibited (manually set)

10 years agomodules_k:registrar Implementing cfg framework for registrar
Marius Zbihlei [Tue, 16 Feb 2010 14:32:16 +0000 (16:32 +0200)]
modules_k:registrar Implementing cfg framework for registrar

Started to implement cfg framework for registrar, having the possibility to change module paraments without restarting k/s

10 years agoblst: global config variables for ignoring blacklist events
Andrei Pelinescu-Onciul [Mon, 15 Feb 2010 20:37:28 +0000 (21:37 +0100)]
blst: global config variables for ignoring blacklist events

Blacklist events can now be ignored on a per protocol basis, by
setting the corresponding new config variable:
 dst_blacklist_udp_imask
 dst_blacklist_tcp_imask
 dst_blacklist_tls_imask
 dst_blacklist_sctp_imask

E.g.: sercmd cfg.set_now_int core dst_blacklist_tcp_imask 6
 (ignore send and connect errors on tcp when deciding whether or
  not to blacklist)

10 years agoMerge remote branch 'origin/daniel/xavp'
Andrei Pelinescu-Onciul [Mon, 15 Feb 2010 14:47:37 +0000 (15:47 +0100)]
Merge remote branch 'origin/daniel/xavp'

* origin/daniel/xavp:
  pv: export new PV class $xavp(name)
  core: introducing xavp (eXtended AVP)
  tm: set/reset head of xavps on TM events
  pv: new pv class $xavp(...)
  core: destroy xavp list once sip msg processing is done

Conflicts:
modules/tm/h_table.c
modules/tm/t_reply.c
modules/tm/uac.c
modules_k/pv/pv.c

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

* origin/tmp/k3.0_sr_backports:
  modules/mediaproxy: properly fix the IP in the RTCP line
  utils/kamctl: removed unsupported commands to manage lcr gateways and routes
  cfg.y: fix warnings introduced in previous commit
  core: added forward()
  Makefile: MEMDBG var to control mem debugging mode

10 years agomodules/mediaproxy: properly fix the IP in the RTCP line
Juha Heinanen [Thu, 11 Feb 2010 20:22:12 +0000 (22:22 +0200)]
modules/mediaproxy: properly fix the IP in the RTCP line

- Properly fix the IP in the RTCP line (if present in the SDP). Patch
  provided by Saul Ibarra Corretge.
(cherry picked from commit 2a95f9bf915cfc3cf11374f9b8f0f547d4eb4955)
(cherry picked from commit ef10212404b9bc5489683fc7429fee40b3495994)

10 years agoutils/kamctl: removed unsupported commands to manage lcr gateways and routes
Juha Heinanen [Wed, 10 Feb 2010 20:37:44 +0000 (22:37 +0200)]
utils/kamctl: removed unsupported commands to manage lcr gateways and routes
(cherry picked from commit d8d9165324f32e82f6e8cbb5e07f33ddd697cd1d)

10 years agocfg.y: fix warnings introduced in previous commit
Daniel-Constantin Mierla [Tue, 9 Feb 2010 10:32:02 +0000 (11:32 +0100)]
cfg.y: fix warnings introduced in previous commit
(cherry picked from commit 318ff6e6884641f3c9788b01e9ac3d859269be30)

10 years agocore: added forward()
Daniel-Constantin Mierla [Tue, 9 Feb 2010 10:23:50 +0000 (11:23 +0100)]
core: added forward()

- aliased forward() to forward(uri:host, uri:port)
- k 1.5.x compatibility
(cherry picked from commit 50237e89964b4fc8a4c8775076c1b75a05ee5e73)

10 years agoMakefile: MEMDBG var to control mem debugging mode
Daniel-Constantin Mierla [Mon, 8 Feb 2010 22:16:47 +0000 (23:16 +0100)]
Makefile: MEMDBG var to control mem debugging mode

- to compile with memory debugging
make MEMDBG=1 cfg; make ...
- default (for now): MEMDBG=1

10 years agodispatcher(k): basic framework for load dispatching
Daniel-Constantin Mierla [Fri, 12 Feb 2010 13:03:24 +0000 (14:03 +0100)]
dispatcher(k): basic framework for load dispatching

- a lightweight system to do a fair distrubution based on load
- no dependency on dialog, by using an internal table of active calls
  with minimal info, to keep the module suitable for small devices and
  have good performances
- not completed, requires xavp support for a compact info structure to
  be carried in transaction for each failover step

10 years agodialog(k): init local parameter
Daniel-Constantin Mierla [Fri, 12 Feb 2010 10:12:37 +0000 (11:12 +0100)]
dialog(k): init local parameter

- memset tm callback param to 0
- safety checks for MI cmd dlg match
- credits to Inaki Baz Castillo and Torben Friese

10 years agomodules/mediaproxy: properly fix the IP in the RTCP line
Juha Heinanen [Thu, 11 Feb 2010 20:22:12 +0000 (22:22 +0200)]
modules/mediaproxy: properly fix the IP in the RTCP line

- Properly fix the IP in the RTCP line (if present in the SDP). Patch
  provided by Saul Ibarra Corretge.

10 years agodispatcher(k): weight based distribution
Daniel-Constantin Mierla [Thu, 11 Feb 2010 14:20:36 +0000 (15:20 +0100)]
dispatcher(k): weight based distribution

- new algorithm 9 for weight based distribution
- new column to hold attributes per destination
- for weight based distribution you have to set for each address in
  destination set: weight=value, for example:

[setid address flags priority attributes]

2 sip:10.10.0.1:5080 0 2 weight=40
2 sip:10.10.0.2:5082 0 1 weight=60

- this will send 60% of the traffic to second address
- note that at startup the distribution is randomized, so traffic is
  directed to first or second desintation alternatively but keeping
  overall percentages

10 years agocore: use the prev. via branch id if it's 3261
Andrei Pelinescu-Onciul [Wed, 10 Feb 2010 20:48:00 +0000 (21:48 +0100)]
core: use the prev. via branch id if it's 3261

When computing the via branch value in syn_branch==0 mode, use the
previous via branch id and not the to_tag, from_tag, callid, ruri,
cseq number, via port and host, if the previous via branch id is
in rfc3261 format (begins with the magic cookie).
See  rfc3261/16.11 P116 for more informations.
To revert to the old behaviour, define BRANCH_IGNORE_3261_VIA.

10 years agocore: include only from/to tags when computing via branch value
Andrei Pelinescu-Onciul [Wed, 10 Feb 2010 20:30:11 +0000 (21:30 +0100)]
core: include only from/to tags when computing via branch value

- use only the to & from tags when computing the via branch value
  in syn_branch==0 mode. This should improve interoperability with
  broken implementations that don't keep the from & to headers
  unchanged. Defining BRANCH_INCLUDE_FROMTO_BODY will revert to
  the old behaviour.
- moved char_msg_val from parser/msg_parser.h to its own file
 (it has nothing to do with parsing).

10 years agocfg.y: fix warnings introduced in previous commit
Daniel-Constantin Mierla [Tue, 9 Feb 2010 10:32:02 +0000 (11:32 +0100)]
cfg.y: fix warnings introduced in previous commit
(cherry picked from commit 318ff6e6884641f3c9788b01e9ac3d859269be30)

10 years agocore: added forward()
Daniel-Constantin Mierla [Tue, 9 Feb 2010 10:23:50 +0000 (11:23 +0100)]
core: added forward()

- aliased forward() to forward(uri:host, uri:port)
- k 1.5.x compatibility
(cherry picked from commit 50237e89964b4fc8a4c8775076c1b75a05ee5e73)

10 years agoMEMDBG set to 1 (memory debugging on)
Daniel-Constantin Mierla [Wed, 10 Feb 2010 18:34:46 +0000 (19:34 +0100)]
MEMDBG set to 1 (memory debugging on)

- default for devel version

10 years agoMakefile: MEMDBG var to control mem debugging mode
Daniel-Constantin Mierla [Mon, 8 Feb 2010 22:16:47 +0000 (23:16 +0100)]
Makefile: MEMDBG var to control mem debugging mode

- to compile with memory debugging
make MEMDBG=1 cfg; make ...

10 years agoapp_python: added skeleton for docs
Daniel-Constantin Mierla [Wed, 10 Feb 2010 18:26:07 +0000 (19:26 +0100)]
app_python: added skeleton for docs

- needs to be filled in

10 years agomodules/lcr: added in docs missing install dependency on libpcre
Juha Heinanen [Wed, 10 Feb 2010 05:34:33 +0000 (07:34 +0200)]
modules/lcr: added in docs missing install dependency on libpcre

- Credits to Kris Amy.
(cherry picked from commit 0c7048297f590f140ae84efdcde8a392ef23527e)

10 years agomodules/lcr: added in docs missing install dependency on libpcre
Juha Heinanen [Wed, 10 Feb 2010 05:34:33 +0000 (07:34 +0200)]
modules/lcr: added in docs missing install dependency on libpcre

- Credits to Kris Amy.

10 years agomodules_k/permissions: group identifier must be positive integer
Juha Heinanen [Wed, 10 Feb 2010 05:15:24 +0000 (07:15 +0200)]
modules_k/permissions: group identifier must be positive integer

- Group Identifier in address permissions must have a positive integer
  value.
(cherry picked from commit c67e72eb16f277eeae16182e15e0e8ebf319dce0)

10 years agomodules_k/permissions: group identifier must be positive integer
Juha Heinanen [Wed, 10 Feb 2010 05:15:24 +0000 (07:15 +0200)]
modules_k/permissions: group identifier must be positive integer

- Group Identifier in address permissions must have a positive integer
  value.

10 years agomakefile: fixed parallel job support for several targets
Andrei Pelinescu-Onciul [Fri, 5 Feb 2010 20:22:47 +0000 (21:22 +0100)]
makefile: fixed parallel job support for several targets

Parallel job support (-jN) warning/support fixed for:
modules*-doc, modules*-readme, modules*-man, install-modules*.