sip-router
10 years agoadded kamailio in ingnore list
Daniel-Constantin Mierla [Fri, 30 Oct 2009 12:04:42 +0000 (13:04 +0100)]
added kamailio in ingnore list

10 years agoset default debug level to 2
Daniel-Constantin Mierla [Fri, 30 Oct 2009 10:46:44 +0000 (11:46 +0100)]
set default debug level to 2

- load sl after tm so it can do stateful reply via send_reply()
(cherry picked from commit 762ab0f1ce81dedaab3cc8ad20103317f06da75d)

10 years agoset branch flags before saving location
Daniel-Constantin Mierla [Fri, 30 Oct 2009 10:21:45 +0000 (11:21 +0100)]
set branch flags before saving location

- enclose parameters in double-quotes
(cherry picked from commit 2a67b2533742f7e969d17b027ca7dfea77701415)

10 years agosupport for defines
Daniel-Constantin Mierla [Fri, 30 Oct 2009 10:05:28 +0000 (11:05 +0100)]
support for defines

- applied patch from Bogdan Harjoc
- support for define/ifdef/ifndef
- nicer way to build config file
- additions to preprocessor directives, so far was 'include'
- format is:
  #!define ID
  #!ifdef ID
  #!ifndef ID
  #!else
  #!endif
(cherry picked from commit 744813329639b323e77a148aebb83112ec1039d1)

10 years agokamctl: include core config.mak in Makefile
Daniel-Constantin Mierla [Wed, 28 Oct 2009 23:51:44 +0000 (00:51 +0100)]
kamctl: include core config.mak in Makefile
(cherry picked from commit 1180ee4d1f5de178f1a16785c3ff573aec00bd70)

10 years agoMakefile: adding data vars
Daniel-Constantin Mierla [Wed, 28 Oct 2009 23:50:54 +0000 (00:50 +0100)]
Makefile: adding data vars

- they are used to install shared resources from kamctl/kamdbctl
(cherry picked from commit f6b97e137b44a420d13eeeb45218df1e7b618393)

10 years agokamailio.cfg: load ctl and mi_rpc modules
Daniel-Constantin Mierla [Wed, 28 Oct 2009 22:54:33 +0000 (23:54 +0100)]
kamailio.cfg: load ctl and mi_rpc modules

- enables usage of sercmd tool with default config
(cherry picked from commit 80a8fc22b8488c358fc12f0a6ce684ffe32f1d1c)

10 years agokamailio.cfg: do sanity check by default
Daniel-Constantin Mierla [Wed, 28 Oct 2009 22:38:58 +0000 (23:38 +0100)]
kamailio.cfg: do sanity check by default

- use sanity module to catch parsing errors early in config
- replaces error_route from kamailio 1.5
(cherry picked from commit aa569991b9c184003ccfd805978930f6cf9ccf2e)

10 years agoMakefile: introducing SRC_NAME var
Daniel-Constantin Mierla [Wed, 28 Oct 2009 21:43:14 +0000 (22:43 +0100)]
Makefile: introducing SRC_NAME var

- store the name as it is in source tree, updated by
  installation to MAIN_NAME (used for man pages install)
(slightly modified version of 3a7b050)

10 years agokamailio.cfg: use name for routes
Daniel-Constantin Mierla [Wed, 28 Oct 2009 21:07:00 +0000 (22:07 +0100)]
kamailio.cfg: use name for routes

- switched from index to names for routes
- 1 => RELAY
- 2 => PRESENCE
- 3 => AUTH
- 4 => NAT
- 5 => RTPPROXY
- failure route: 1 = > FAIL_ONE
- onreply route: 1 = > REPLY_ONE
- branch route:  1 = > BRANCH_ONE
(cherry picked from commit 489ddd1336d3bd703ea0b393226631469883b4f3)

10 years agokamaili.cfg: basic updates to make it work with SR core
Daniel-Constantin Mierla [Wed, 28 Oct 2009 20:53:27 +0000 (21:53 +0100)]
kamaili.cfg: basic updates to make it work with SR core
(cherry picked from commit 5adb83ef2c7e6f1e07a2df1f7f26e6933f7f34ab)

10 years agopv: $snd(xyz) - new pv class to handle dst filtering
Daniel-Constantin Mierla [Thu, 22 Oct 2009 21:02:50 +0000 (23:02 +0200)]
pv: $snd(xyz) - new pv class to handle dst filtering

- return attributes of destination address, valid in onsend_route
- woraround the DNS blacklisting from K 1.5 by using the new PVs and
  onsend_route
- inner name can be: ip, af, proto and port
(cherry picked from commit be72d02a81f4508e6666e5992c52b788422cd398)

10 years agoetc: add modules_k to search path of modules
Daniel-Constantin Mierla [Tue, 13 Oct 2009 21:46:46 +0000 (23:46 +0200)]
etc: add modules_k to search path of modules
(cherry picked from commit 974e91436a5cf2bdab0f0e6d9d94d4425c2320ac)

10 years agokamctl: added install-if-newer in Makefile
Daniel-Constantin Mierla [Tue, 13 Oct 2009 21:29:04 +0000 (23:29 +0200)]
kamctl: added install-if-newer in Makefile
(cherry picked from commit 418bbf80cfc3d4efa2334c1b3bdbfb6e91853f7a)

10 years agokamctl: Makefile action for simple 'make'
Daniel-Constantin Mierla [Tue, 13 Oct 2009 18:41:38 +0000 (20:41 +0200)]
kamctl: Makefile action for simple 'make'

- avoid kamctl installation if 'make' is typed
(cherry picked from commit e77ff6f4c9fa32e0bc527d72dc54317658ac448a)

10 years agoMerge remote branch 'origin/andrei/shm_early_init' into sr_3.0
Andrei Pelinescu-Onciul [Wed, 13 Jan 2010 16:39:01 +0000 (17:39 +0100)]
Merge remote branch 'origin/andrei/shm_early_init' into sr_3.0

* origin/andrei/shm_early_init:
  NEWS: notes about the shm related changes
  core: shm mem size can now be set in the config script
  core: early shm init while parsing the cfg
  core: moved shm init into separate files

10 years agoNEWS: notes about the shm related changes
Andrei Pelinescu-Onciul [Sun, 10 Jan 2010 12:15:57 +0000 (13:15 +0100)]
NEWS: notes about the shm related changes

10 years agocore: shm mem size can now be set in the config script
Andrei Pelinescu-Onciul [Sun, 10 Jan 2010 12:10:43 +0000 (13:10 +0100)]
core: shm mem size can now be set in the config script

shm mem size can now be set in the cfg script using
shm=size_in_mb,  shm_mem=size_in_mb or shm_mem_size=size_in_mb.
It must be set prior to any modparam or route block.
Specifying the memory size on the command line (-m size_in_mb)
will override the size from the config file.

10 years agocore: early shm init while parsing the cfg
Andrei Pelinescu-Onciul [Sun, 10 Jan 2010 11:54:05 +0000 (12:54 +0100)]
core: early shm init while parsing the cfg

 - shm memory is now initialized before the first modparam or the
   first route block. This allows using shm memory early, in
   modparam fixups or route block parsing functions.
   user and shm_force_alloc must be used _before_ any  modparam or
   route block (using them after a modparam or a route block will
   now generate an error).
 - the user in the cfg is ignored if already set from the command
   line

10 years agocore: moved shm init into separate files
Andrei Pelinescu-Onciul [Sun, 10 Jan 2010 11:50:15 +0000 (12:50 +0100)]
core: moved shm init into separate files

- shm init moved from main.c into shm_init.c and shm_init.h.
- added a function to check if shm was already intialized
  (shm_intialized()).
- make sure the user is set before parsing the config, if present
  on the command line (the user is needed to initialize the shared
  memory when sysv semaphores are used as the locking method).

10 years agoBackport of the changes (see previous commits).
Carsten Bock [Fri, 8 Jan 2010 09:15:29 +0000 (10:15 +0100)]
Backport of the changes (see previous commits).
Thanks to Klaus and Juha for reminding me to add the patches here as well (i am new to git and to the new structure).

10 years agokex: documented missing functions
Daniel-Constantin Mierla [Thu, 7 Jan 2010 17:38:52 +0000 (18:38 +0100)]
kex: documented missing functions

- reported by Santiago Gimeno
(cherry picked from commit e97f68ebe9d909f56577b3abdc305395df9db5ba)

10 years agokex: aliased avp_printf to pv_printf
Daniel-Constantin Mierla [Thu, 7 Jan 2010 17:40:29 +0000 (18:40 +0100)]
kex: aliased avp_printf to pv_printf

- backward compatibility reasons
- reported by Santiago Gimeno
(cherry picked from commit 0408f81197da38a9ab94c46698d3db10e01b39c1)

10 years agoMerge branch 'sr_3.0' of ssh://henning@git.sip-router.org/sip-router into backport-tmp
Henning Westerholt [Thu, 7 Jan 2010 17:56:32 +0000 (18:56 +0100)]
Merge branch 'sr_3.0' of ssh://henning@git.sip-router.org/sip-router into backport-tmp

* 'sr_3.0' of ssh://henning@git.sip-router.org/sip-router:
  - fix bug in encode_contact()
  - fix bug when RURI was changed before and newuri will be used
  - remove unused code

10 years agoauth_diameter(k): remove redundant declaration of find_credentials, now in core
Henning Westerholt [Tue, 5 Jan 2010 10:27:34 +0000 (11:27 +0100)]
auth_diameter(k): remove redundant declaration of find_credentials, now in core
(cherry picked from commit fc323d03688bc93560a56cec9b2713c57a72389c)

10 years ago- fix bug in encode_contact()
Klaus Darilion [Wed, 30 Dec 2009 15:53:12 +0000 (15:53 +0000)]
- fix bug in encode_contact()
- fix and extend documentation about contact encoding/decoding
(cherry picked from commit 8929913f5edb519b7ed280a12728376ed872ec53)

10 years ago- fix bug when RURI was changed before and newuri will be used
Klaus Darilion [Wed, 30 Dec 2009 13:51:24 +0000 (13:51 +0000)]
- fix bug when RURI was changed before and newuri will be used
(cherry picked from commit 1e663ffa8129c4b24f21563c09a5bea4ecd65784)

10 years ago- remove unused code
root [Wed, 30 Dec 2009 13:25:01 +0000 (13:25 +0000)]
- remove unused code
- correct indention and make code more readable
(cherry picked from commit 9eacaacb45fe700615ac94cc3944824f1b22fdc4)

10 years agomodules_k/nathelper: removed garbage from documentation (credits to Klaus)
Juha Heinanen [Thu, 31 Dec 2009 12:57:01 +0000 (14:57 +0200)]
modules_k/nathelper: removed garbage from documentation (credits to Klaus)

10 years agomodules_k/nathelper: improved handle_ruri_alias() documentation
Juha Heinanen [Wed, 30 Dec 2009 20:47:35 +0000 (22:47 +0200)]
modules_k/nathelper:  improved handle_ruri_alias() documentation

- Improved handle_ruri_alias() documentation based on suggestion by Klaus.

10 years agomodules/lcr and modules_k/nathelper: fixed compiler warnings
Juha Heinanen [Wed, 30 Dec 2009 17:22:14 +0000 (19:22 +0200)]
modules/lcr and modules_k/nathelper: fixed compiler warnings

- Fixed compiler warnings that went earlier unnoticed, because I didn't
  have -Wall gcc option.

10 years agomodules_k/nathelper: handle_uri_alias() alias handling fix
Juha Heinanen [Wed, 30 Dec 2009 10:19:03 +0000 (12:19 +0200)]
modules_k/nathelper: handle_uri_alias() alias handling fix
- handle_uri_alias() now finds ;alias r-uri param even if it is not
   the first param.

10 years agomodules_k/usrloc: changed 'Kamailio' to 'SIP Router' in user agent string.
Juha Heinanen [Tue, 29 Dec 2009 19:13:05 +0000 (21:13 +0200)]
modules_k/usrloc: changed 'Kamailio' to 'SIP Router' in user agent string.

10 years agoMerge branch 'sr_3.0' of ssh://jh@git.sip-router.org/sip-router into sr_3.0
Juha Heinanen [Sat, 26 Dec 2009 14:00:55 +0000 (16:00 +0200)]
Merge branch 'sr_3.0' of ssh://jh@git.sip-router.org/sip-router into sr_3.0

* 'sr_3.0' of ssh://jh@git.sip-router.org/sip-router:
  tm: safer handling for local transactions and drop_replies!=0
  sctp: stats: don't increment ASSOC_SHUTDOWN on COMM_LOST
  sctp: SCTP_STATS_ASSOC_SHUTDOWN
  tm doc: local_ack_mode documentation
  tm: new param: local_ack_mode
  makefile: fix make bin &  basedir
  core: fix parsing for avps with the same name as a pv class

10 years agotm: safer handling for local transactions and drop_replies!=0
Andrei Pelinescu-Onciul [Wed, 23 Dec 2009 19:44:31 +0000 (20:44 +0100)]
tm: safer handling for local transactions and drop_replies!=0

- if all the replies are dropped in the failure route and the
  transaction is local, return the current reply. This makes the
  code more future safe (currently there is no way for the failure
  route to be executed and hence for replies to be dropped for
  local transactions).

- check for FAKED_REPLY in local_reply() error path.

10 years agosctp: stats: don't increment ASSOC_SHUTDOWN on COMM_LOST
Libor Chocholaty [Wed, 23 Dec 2009 16:06:36 +0000 (17:06 +0100)]
sctp: stats: don't increment ASSOC_SHUTDOWN on COMM_LOST

Signed-off-by: Andrei Pelinescu-Onciul <andrei@iptel.org>
10 years agosctp: SCTP_STATS_ASSOC_SHUTDOWN
Andrei Pelinescu-Onciul [Wed, 23 Dec 2009 15:58:45 +0000 (16:58 +0100)]
sctp: SCTP_STATS_ASSOC_SHUTDOWN

Statistics placeholder for counting shutdowns.

10 years agotm doc: local_ack_mode documentation
Andrei Pelinescu-Onciul [Wed, 23 Dec 2009 15:46:18 +0000 (16:46 +0100)]
tm doc: local_ack_mode documentation

10 years agotm: new param: local_ack_mode
Andrei Pelinescu-Onciul [Wed, 23 Dec 2009 12:16:01 +0000 (13:16 +0100)]
tm: new param: local_ack_mode

local_ack_mode controls how local 200 ACKs (ACKs to 2xx replies
for local transactions, created via t_uac*) are sent.
There are 3 possible modes:
- 0 (default) - ACK is sent according to the rfc (the next hop is
  found using the contact and the route set and then dns
  resolution is used on it).
- 1 - the ACK is sent to the same address as the corresponding
  INVITE branch.
- 2 - the ACL is sent to the same address as the source of the 2xx
  reply.

Modes 1 and 2 break the rfc, but are useful to deal with
some simple UA behind the NAT cases.
Note that mode 1 is not similar to generating ACKs for negative
replies. Even if the ACK will be sent to the same address as the
INVITE, it will contain the correct route set and uri.

10 years agomakefile: fix make bin & basedir
Andrei Pelinescu-Onciul [Mon, 14 Dec 2009 23:58:14 +0000 (00:58 +0100)]
makefile: fix make bin &  basedir

- make bin and make sunpkg fixed (basedir was not an absolute
  path)
- auto-transform basedir to an absolute path if it does not start
  with '/'
- fix unexported makefile_defs, after loading the config in the
  main Makefile

10 years agocore: fix parsing for avps with the same name as a pv class
Andrei Pelinescu-Onciul [Mon, 14 Dec 2009 12:00:07 +0000 (13:00 +0100)]
core: fix parsing for avps with the same name as a pv class

When a pv lookup fails, sometimes the pvspec is partially filled
which, if not clean might mess-up the avp flags in the lval union.
E.g.: $avp="..." caused problems (avp was marked as RE name).

10 years agotls: name the certificates based on $MAIN_NAME
Daniel-Constantin Mierla [Fri, 11 Dec 2009 22:07:27 +0000 (23:07 +0100)]
tls: name the certificates based on $MAIN_NAME
(cherry picked from commit 6ecc6c13f63dab04083f61aa1b7ee767f9441ee0)

10 years agocore: use NAME to build User-Agent and Server headers
Daniel-Constantin Mierla [Fri, 11 Dec 2009 09:29:06 +0000 (10:29 +0100)]
core: use NAME to build User-Agent and Server headers
(cherry picked from commit e1c36fdfc9b8f30a4271ee6823a2288dcf9c3833)

10 years agocore: fix define of rval_get_int_handle_ret
Daniel-Constantin Mierla [Fri, 11 Dec 2009 09:29:50 +0000 (10:29 +0100)]
core: fix define of rval_get_int_handle_ret
(cherry picked from commit a75b03f72e42740b410815330c895f16368895bd)

10 years agocore: mod fixup spve_uint and spve_str fix
Andrei Pelinescu-Onciul [Fri, 11 Dec 2009 10:33:57 +0000 (11:33 +0100)]
core: mod fixup spve_uint and spve_str fix

fixup_spve_uint() and fixup_spve_str() wrongly converted the
second parameter to a spve instead of an int or str.

Reported-by: Daniel-Constantin Mierla <miconda@gmail.com>
10 years agotm: onreply_route executed under lock to protect the avps
Andrei Pelinescu-Onciul [Thu, 10 Dec 2009 17:35:17 +0000 (18:35 +0100)]
tm: onreply_route executed under lock to protect the avps

Quick fix for the onreply_route possible avp corruption: execute
the onreply route under lock.

10 years agomodule groups: add k modules to the presence group
Andrei Pelinescu-Onciul [Wed, 9 Dec 2009 10:08:18 +0000 (11:08 +0100)]
module groups: add k modules to the presence group

- added kamailio modules to the presence group:
  presence presence_dialoginfo presence_mwi presence_xml
  pua pua_bla pua_dialoginfo pua_mi pua_usrloc pua_xmpp
  rls xcap_client.
- removed obsoleted ser presence modules: pa rls.

10 years agorls(s): obsoleted
Andrei Pelinescu-Onciul [Wed, 9 Dec 2009 09:59:28 +0000 (10:59 +0100)]
rls(s): obsoleted

Moved pa to obsolete/ because it does not compile (needs upgrade
to the current DB libs) and it does not have a maintainer.

10 years agopa(s): obsoleted
Andrei Pelinescu-Onciul [Wed, 9 Dec 2009 09:53:51 +0000 (10:53 +0100)]
pa(s): obsoleted

Moved pa to obsolete/ because it does not compile (needs upgrade
to the current DB libs) and it does not have a maintainer.

10 years agomodules_k/registrar: Removed tcp_persistent_flag module parameter.
Juha Heinanen [Wed, 9 Dec 2009 08:19:54 +0000 (10:19 +0200)]
modules_k/registrar: Removed tcp_persistent_flag module parameter.

- Commented out tcp_persistent_flag module parameter, because sr_3.0 tm
  does not support it.
- Removed the flags also from module README.

10 years agomakefiles: clean-utils and proper-utils fix
Andrei Pelinescu-Onciul [Fri, 4 Dec 2009 17:16:25 +0000 (18:16 +0100)]
makefiles: clean-utils and proper-utils fix

- clean-utils and proper-utils now work both from the main
  directory (for utils compiled by make utils or installed by make
  install-utils) and from the modules directories (for utils
  installed by a module)
- make utils now works in module directories (compiles utils that
  would be installed by the module)

10 years agosercmd: fix LIBS when installing from a module
Andrei Pelinescu-Onciul [Fri, 4 Dec 2009 16:39:46 +0000 (17:39 +0100)]
sercmd: fix LIBS when installing from a module

Don't rely on LIBS having a valid value, since we might get called
from a module Makefile. Use needed libs in function of $(OS).

10 years agocore: pid_t warning fixes for solaris
Andrei Pelinescu-Onciul [Thu, 3 Dec 2009 01:15:36 +0000 (20:15 -0500)]
core: pid_t warning fixes for solaris

10 years agoctl: fix #includes on solaris
Andrei Pelinescu-Onciul [Thu, 3 Dec 2009 01:14:54 +0000 (20:14 -0500)]
ctl: fix #includes on solaris

10 years agoparser: fix for solaris yacc compatibility
Andrei Pelinescu-Onciul [Thu, 3 Dec 2009 01:12:40 +0000 (20:12 -0500)]
parser: fix for solaris yacc compatibility

%prec was used in a wrong way (not at the end of the rule),
causing problems with some yacc implementations.

10 years agomakefile: fix assembler detection on solaris
Andrei Pelinescu-Onciul [Thu, 3 Dec 2009 01:07:13 +0000 (20:07 -0500)]
makefile: fix assembler detection on solaris

Assembler test waited forever for input (missing /dev/null input
redirection for as -V).

10 years agopresence(k): fix off-by-one memory allocation
Andrei Pelinescu-Onciul [Mon, 30 Nov 2009 11:29:20 +0000 (12:29 +0100)]
presence(k): fix off-by-one memory allocation

Due to some missing '()' ( (...)?resource.len:event.len + 1
instead of ((...)?resource.len:event.len) + 1 ) sometimes the
memory allocated was less with one byte then what was needed.
The fixed version also replaces ?: with MAX_unsigned() (does the
same thing and it's easier to read).

Reported-by: Andres Moya andres.moya.i gmail com
10 years agosctp: fix cfg.set_delayed* setting some config options immediately
Andrei Pelinescu-Onciul [Mon, 30 Nov 2009 11:02:37 +0000 (12:02 +0100)]
sctp: fix cfg.set_delayed* setting some config options immediately

- all the runtime cfg options that involve setting socket options
  are now set using a per-child cfg callback with
  CFG_CB_ONLY_ONCE and not in the value fixup function. This fixes
  cfg.set_delayed* (up until now it did set these options
  immediately and not after cfg.commit).
- init_max_timeo valid range fixed (from 0-1024 to 0-2^30).

10 years agoscript engine: verbose conversion-to-int errors
Andrei Pelinescu-Onciul [Mon, 16 Nov 2009 18:41:02 +0000 (19:41 +0100)]
script engine: verbose conversion-to-int errors

- more verbose errors (all of them contain now the config file
  position for the error).
- integer conversion errors will now by default log a warning
  message. Like before they won't cause the expression evaluation
  to fail, they'll just evaluate the failed conversion to 0.
  The behaviour can be changed using the defines at the top of
  rvalue.c. To restore the old behaviour (no int conversion error
  message and error ignored), comment out the following defines:
  RV_STR2INT_VERBOSE_ERR, RV_STRINT_ERR, EVAL_GET_INT_ERR_WARN,
  RVAL_GET_INT_ERR_IGN. For more info see the comments in the
  file.

10 years agoxlog(k): updated log levels
Daniel-Constantin Mierla [Fri, 6 Nov 2009 20:51:47 +0000 (21:51 +0100)]
xlog(k): updated log levels

- new level L_BUG
- updated the documentation to match the code
- L_CRIT uses in the code L_CRIT2
- L_CRIT2 can be used in config as well, detection is based on the third
  caracter
- credits to Klaus Darilion
(cherry picked from commit 42d70e2e4826be99a063a3d900b167a62ae12985)

10 years agodialog(k): set dlg context after pre script callback
Daniel-Constantin Mierla [Fri, 6 Nov 2009 12:57:22 +0000 (13:57 +0100)]
dialog(k): set dlg context after pre script callback

- applies for the case of timeout route
- the prescript callback resets it otherwise
- reported by Nathan Angelacos, SF svn # 5927
(cherry picked from commit 1efaa9c19279a5dded570fb60621b45191d46027)

10 years agopv: reset local var for tobody trans
Daniel-Constantin Mierla [Fri, 6 Nov 2009 12:45:16 +0000 (13:45 +0100)]
pv: reset local var for tobody trans

- from SF svn, #5951
(cherry picked from commit d4a1d5146773eac1d82b8abb39747cc8ec427801)

10 years agoremove some modules from excluded_modules list
Daniel-Constantin Mierla [Fri, 6 Nov 2009 12:33:03 +0000 (13:33 +0100)]
remove some modules from excluded_modules list

- they compile and were K default
(cherry picked from commit 93b42945ad2a57c84626cdd08ec40aa17c06036d)

10 years agorls(k): set callback type for local requests
Daniel-Constantin Mierla [Fri, 6 Nov 2009 11:30:31 +0000 (12:30 +0100)]
rls(k): set callback type for local requests

- type has to be TMCB_LOCAL_COMPLETED to execute transaction callback
(cherry picked from commit dfefc8a15e9b059cf16d4930d12437948307568a)

10 years agopua(k): : set callback type for local requests
Daniel-Constantin Mierla [Fri, 6 Nov 2009 11:30:18 +0000 (12:30 +0100)]
pua(k): : set callback type for local requests

- type has to be TMCB_LOCAL_COMPLETED to execute transaction callback
(cherry picked from commit ab31636c85552d48610c65d65afd4eaa126cf6a0)

10 years agojabber(k): : set callback type for local requests
Daniel-Constantin Mierla [Fri, 6 Nov 2009 11:30:02 +0000 (12:30 +0100)]
jabber(k): : set callback type for local requests

- type has to be TMCB_LOCAL_COMPLETED to execute transaction callback
(cherry picked from commit 2e88092d23443985f7d8459c2815cf91f68d752e)

10 years agoimc(k): : set callback type for local requests
Daniel-Constantin Mierla [Fri, 6 Nov 2009 11:29:48 +0000 (12:29 +0100)]
imc(k): : set callback type for local requests

- type has to be TMCB_LOCAL_COMPLETED to execute transaction callback
(cherry picked from commit 9eb765ffc7f6e9eac99b7f998b37f56338d8c285)

10 years agopresence(k): : set callback type for local requests
Daniel-Constantin Mierla [Fri, 6 Nov 2009 11:29:31 +0000 (12:29 +0100)]
presence(k): : set callback type for local requests

- type has to be TMCB_LOCAL_COMPLETED to execute transaction callback
(cherry picked from commit 598aea444e9f8b2a1c610daa363723e2d38496b7)

10 years agodialog(k): : set callback type for local requests
Daniel-Constantin Mierla [Fri, 6 Nov 2009 11:29:09 +0000 (12:29 +0100)]
dialog(k): : set callback type for local requests

- type has to be TMCB_LOCAL_COMPLETED to execute transaction callback
(cherry picked from commit 0bcc7d5f76ec897f748857befbbdcdc265d0b970)

10 years agodispatcher(k): set callback type for local requests
Daniel-Constantin Mierla [Fri, 6 Nov 2009 11:27:44 +0000 (12:27 +0100)]
dispatcher(k): set callback type for local requests

- type has to be TMCB_LOCAL_COMPLETED to execute transaction callback
(cherry picked from commit 58c75326614ccc3805640c2a15d95b4ad5e8e6d4)

10 years ago* modules_k/nathelper
Juha Heinanen [Sun, 15 Nov 2009 22:45:27 +0000 (00:45 +0200)]
* modules_k/nathelper

Added two new functions add_contact_alias() and handle_ruri_alias() and
two new pseudo variables $rr_count and $rr_top_count that can be used to
implement tcp connection sharing and produce correct Request URI for
in-dialog requests to NATed UAs.

10 years agoprint the cfg file in fixup error message
Daniel-Constantin Mierla [Sun, 15 Nov 2009 13:32:40 +0000 (14:32 +0100)]
print the cfg file in fixup error message

- line is not enough when include_file is used

10 years agoprint line for fixing action error
Daniel-Constantin Mierla [Sun, 15 Nov 2009 11:51:27 +0000 (12:51 +0100)]
print line for fixing action error

- reported by Juha Heinanen

10 years agocore rpc: core.shmmem can take an optional size parameter
Andrei Pelinescu-Onciul [Thu, 12 Nov 2009 16:24:27 +0000 (17:24 +0100)]
core rpc: core.shmmem can take an optional size parameter

core.shmmem can take now an optional size parameter, which can
have one of the following values: b - bytes, k or kb - kilobytes,
m or mb - megabytes, g or gb - gigabytes. By default (no
parameter) the values displayed are in bytes. Note that when using
something different from bytes the value are truncated (no
floating point).
The new parameter can be used as workaround on 64 bits systems
when sr is started with more then 2Gb of memory (due to the RPC
interface limitation to int32 in this case the values displayed
would be negative or 0).
E.g:
sercmd> core.shmmem k

10 years agosctp rpc: core.sctp_options debugging version
Andrei Pelinescu-Onciul [Thu, 12 Nov 2009 15:29:40 +0000 (16:29 +0100)]
sctp rpc: core.sctp_options debugging version

core.sctp_options can now have 1 optional parameter. If the
parameter is missing it works as before: displays ser's idea of
all the sctp config options. If the parameter is present it should
have one of the following values: "default" (default send socket),
"first" (first sctp socket) or  addr[:port]. In this case the
kernel sctp options for that particular socket will be displayed,
with 0 used for the options that are userspace only.
E.g.:  sercmd core.sctp_options 127.0.0.1

10 years agosctp: workaround SCTP_DELAYED_SACK lksctp typo
Andrei Pelinescu-Onciul [Thu, 12 Nov 2009 15:24:08 +0000 (16:24 +0100)]
sctp: workaround SCTP_DELAYED_SACK lksctp typo

- workaround typo in linux libsctp api: SCTP_DELAYED_ACK is
  used/defined instead of SCTP_DELAYED_SACK.
- to support older kernels (< 2.6.27), if setting/getting the
  socket options with SCTP_DELAYED_SACK fails, fallback to
  SCTP_DELAYED_ACK_TIME for sctp sack_delay and report an error if
  the user tries to set sack_freq (not supported on older
  kernels).
- split sctp_get_os_default() into sctp_get_os_default() and
  sctp_get_cfg_from_sock() for debugging purposes.

10 years agomodules/lcr: use append_branch instead of do_action for appending branch
Juha Heinanen [Thu, 12 Nov 2009 06:11:57 +0000 (08:11 +0200)]
modules/lcr: use append_branch instead of do_action for appending branch

For some reason appending branch using do_action had stopped working.
Instead of trying to find out why, replaced do_action() call with
append_branch() call.

10 years agodeb: fix mysql scripts install path problem
Klaus Darilion [Wed, 11 Nov 2009 18:52:55 +0000 (19:52 +0100)]
deb: fix mysql scripts install path problem

Signed-off-by: Andrei Pelinescu-Onciul <andrei@iptel.org>
10 years agomake: db_flatstore moved in the standard package
Klaus Darilion [Wed, 11 Nov 2009 18:47:28 +0000 (19:47 +0100)]
make: db_flatstore moved in the standard package

db_flatstore was in db_modules package and ser standard package.
I think it should be removed from db_modules packages as it does
not have any dependencies on db-libraries.

Signed-off-by: Andrei Pelinescu-Onciul <andrei@iptel.org>
10 years agomsilo(k): set tm callback type for sent messages
Daniel-Constantin Mierla [Fri, 6 Nov 2009 10:42:35 +0000 (11:42 +0100)]
msilo(k): set tm callback type for sent messages

- it must be TMCB_LOCAL_COMPLETED
- otherwise the callback is not executed when transaction completes
- delivered messages were not deleted from db
- reported by Juha Heinanen
(cherry picked from commit d8dde2fe2e7004c69a6241a054c5febe73548267)

10 years agocore: added id to every field of gw table schema
Juha Heinanen [Fri, 6 Nov 2009 03:58:59 +0000 (05:58 +0200)]
core: added id to every field of gw table schema

10 years agotcp: use the forced socket ip as source
Andrei Pelinescu-Onciul [Thu, 5 Nov 2009 15:21:35 +0000 (16:21 +0100)]
tcp: use the forced socket ip as source

- if a socket is forced always use the forced socket ip as source
 (if a connection exists with different ip as source, open a new
 one with the forced ip).

10 years agotmx: pv_t_copy_msg: copy also the send flags
Andrei Pelinescu-Onciul [Thu, 5 Nov 2009 14:19:29 +0000 (15:19 +0100)]
tmx: pv_t_copy_msg: copy also the send flags

10 years agotextops(k): msg_apply_changes: preserve the send flags
Andrei Pelinescu-Onciul [Thu, 5 Nov 2009 14:17:56 +0000 (15:17 +0100)]
textops(k): msg_apply_changes: preserve the send flags

- restore also the msg send flags

10 years agoseas: use set_force_socket()
Andrei Pelinescu-Onciul [Thu, 5 Nov 2009 14:17:15 +0000 (15:17 +0100)]
seas: use set_force_socket()

- use set_force_socket() instead of msg->force_send_socket

10 years agorr(k): use set_force_socket()
Andrei Pelinescu-Onciul [Thu, 5 Nov 2009 14:16:44 +0000 (15:16 +0100)]
rr(k): use set_force_socket()

- use set_force_socket() instead of msg->force_send_socket

10 years agoregistrar(k): use set_force_socket()
Andrei Pelinescu-Onciul [Thu, 5 Nov 2009 14:16:05 +0000 (15:16 +0100)]
registrar(k): use set_force_socket()

- use set_force_socket() instead of msg->force_send_socket

10 years agopv: use set_force_socket()
Andrei Pelinescu-Onciul [Thu, 5 Nov 2009 14:15:33 +0000 (15:15 +0100)]
pv: use set_force_socket()

- use set_force_socket() instead of msg->force_send_socket

10 years agokex: use set_force_socket()
Andrei Pelinescu-Onciul [Thu, 5 Nov 2009 14:14:31 +0000 (15:14 +0100)]
kex: use set_force_socket()

- use set_force_socket() instead of msg->force_send_socket

10 years agodomainpolicy: use set_force_socket()
Andrei Pelinescu-Onciul [Thu, 5 Nov 2009 14:13:36 +0000 (15:13 +0100)]
domainpolicy: use set_force_socket()

- use set_force_socket() instead of msg->force_send_socket

10 years agorr(s): use set_force_socket()
Andrei Pelinescu-Onciul [Thu, 5 Nov 2009 14:12:52 +0000 (15:12 +0100)]
rr(s): use set_force_socket()

- use set_force_socket() instead of msg->force_send_socket

10 years agoregistrar(s): use set_force_socket()
Andrei Pelinescu-Onciul [Thu, 5 Nov 2009 14:11:53 +0000 (15:11 +0100)]
registrar(s): use set_force_socket()

- use set_force_socket() instead of msg->force_send_socket

10 years agotm: use set_force_socket() instead of msg->force_send_socket
Andrei Pelinescu-Onciul [Thu, 5 Nov 2009 13:53:55 +0000 (14:53 +0100)]
tm: use set_force_socket() instead of msg->force_send_socket

10 years agotm: preserve forced sockets and send flags during dns failover
Andrei Pelinescu-Onciul [Thu, 5 Nov 2009 13:48:41 +0000 (14:48 +0100)]
tm: preserve forced sockets and send flags during dns failover

- fix for branches introduced as a result of dns failover not
  preserving the forced send socket.
- dns failover branches now preserve also the original branch send
  flags.

10 years agocore: extra flag when forcing a socket
Andrei Pelinescu-Onciul [Thu, 5 Nov 2009 13:43:38 +0000 (14:43 +0100)]
core: extra flag when forcing a socket

- when forcing a socket set an extra send flag
  (SND_F_FORCE_SOCKET), so that later we can tell if the socket in
  the dst structure was forced or not (useful for forcing a
  specific source ip on tcp or for keeping the forced socket
  during dns failover in tm).
- added set_force_socket(msg, sock) and reset_force_socket(msg)
  macros that should be used instead of directly setting
  msg->force_send_socket (they take care of any extra work, like
  setting/resetting flags).

10 years agocore: kamailio mode config parser fix
Andrei Pelinescu-Onciul [Mon, 2 Nov 2009 14:35:42 +0000 (15:35 +0100)]
core: kamailio mode config parser fix

- fixed bug in parsing pvars without (), when in #!KAMAILIO mode

Reported-by: Daniel-Constantin Mierla <miconda@gmail.com>
10 years agocore: PAI and PPI parsing support fixed
Daniel-Constantin Mierla [Sun, 1 Nov 2009 13:06:04 +0000 (14:06 +0100)]
core: PAI and PPI parsing support fixed

- use a new function to identify hdr type instead of 'case' construct
- reported by Juha Heinanen
(cherry picked from commit 78f069c3726085902101a55d3bb98f0be7549b60)

10 years agocore: dset minor cleanups
Andrei Pelinescu-Onciul [Sat, 31 Oct 2009 09:31:18 +0000 (10:31 +0100)]
core: dset minor cleanups

- get_request_uri() is now inline and uses GET_RURI
- DBG msg removed

10 years agocore: append_branch() sets also the send_socket, path & flags
Andrei Pelinescu-Onciul [Sat, 31 Oct 2009 09:27:43 +0000 (10:27 +0100)]
core: append_branch() sets also the send_socket, path & flags

- the script append_branch() sets also the new branch send_socket
 (if forced), path vector and branch flags, making it more
 compatible with the kamailio version.

Reported-by: Juha Heinanen jh at tutpro com
10 years agoremove extra backslash in make modules-doc action
Daniel-Constantin Mierla [Fri, 30 Oct 2009 21:38:21 +0000 (22:38 +0100)]
remove extra backslash in make modules-doc action
(cherry picked from commit f4cb4afc8173e209dbd7a6a522d3b10cc8c5c0ef)