Andrei Pelinescu-Onciul [Thu, 26 Aug 2010 19:44:59 +0000 (21:44 +0200)]
core: pointer aliasing warning fixes for fix_rval_expr
Andrei Pelinescu-Onciul [Thu, 26 Aug 2010 19:42:54 +0000 (21:42 +0200)]
core: use const in some ip_addr functions
Fixes various warnings (gcc-4.2) in other parts of the code.
Andrei Pelinescu-Onciul [Thu, 26 Aug 2010 19:40:45 +0000 (21:40 +0200)]
core: use const char*/str* for hash functions
Andrei Pelinescu-Onciul [Thu, 26 Aug 2010 19:39:33 +0000 (21:39 +0200)]
core: typo fix in dns_cache_clone_entry()
Andrei Pelinescu-Onciul [Thu, 26 Aug 2010 19:33:45 +0000 (21:33 +0200)]
tm: warnings and avp param init. fixes
- wrong pointer was passed to pv_get_avp_name(): int instead of
unsigned short ( => not the whole int was set and problems on
big endian archs).
- unneeded pointer casts removed
- variables declared at the function start (otherwise older
compilers won't work)
Andrei Pelinescu-Onciul [Thu, 26 Aug 2010 19:30:44 +0000 (21:30 +0200)]
nat_traversal(k): register stats only ifdef STATISTICS
Andrei Pelinescu-Onciul [Thu, 26 Aug 2010 19:29:28 +0000 (21:29 +0200)]
sst(k): don't register statistics twice
Include kstats_wraper.h and don't register statistics twice (both
form mod_init() and via the module exports structure).
Andrei Pelinescu-Onciul [Thu, 26 Aug 2010 19:22:50 +0000 (21:22 +0200)]
nathelper(k): add missing mi.h include
Juha Heinanen [Thu, 26 Aug 2010 16:54:49 +0000 (19:54 +0300)]
modules_k/nathelper: better add_contact_alias/handle_ruri_alias fix
- In add_contact_alias/handle_ruri_alias functions, use ~ char both
as port and transport protocol separator in
Juha Heinanen [Wed, 25 Aug 2010 19:30:00 +0000 (22:30 +0300)]
modules_k/nathelper: replaced offending contact alias character
- Changed character ':' in contact alias paramater value to '~',
because ':' is not allowed in value field of generic contact
parameter.
Andrei Pelinescu-Onciul [Wed, 25 Aug 2010 16:59:21 +0000 (18:59 +0200)]
lcr: fix load_gws() 2nd param
load_gws() 2nd optional parameter was treated like a fparam
instead of a pv_spec_t (the fixup_igp_pvar function converts the
first parameter to a fparam and the second one to a pv_spec).
Daniel-Constantin Mierla [Wed, 25 Aug 2010 13:10:14 +0000 (15:10 +0200)]
textopsx: changed fixup to use fixup_var_pve_str_12()
- accept PVs inside str params
Daniel-Constantin Mierla [Wed, 25 Aug 2010 13:09:26 +0000 (15:09 +0200)]
auth: changed fixup to use fixup_var_pve_str_12()
- accept PVs inside str params
Daniel-Constantin Mierla [Wed, 25 Aug 2010 11:33:20 +0000 (13:33 +0200)]
sl: changed fixup to use fixup_var_pve_str_12()
- accept PV inside reason phrase param
Marius Zbihlei [Wed, 25 Aug 2010 11:08:35 +0000 (14:08 +0300)]
Modules_k:pv No warning message for branch(count) if no branches
Patch by Carsten Gross (carsten.gross at 1und1 dot de)
Andrei Pelinescu-Onciul [Tue, 24 Aug 2010 19:14:50 +0000 (21:14 +0200)]
core: counters can be used before forking
Counters can now be incremented (not only registered) before
counters_prefork_init(). This enables using them also from
mod_init() or the fixup functions (not recommended but needed for
"indirect" calls).
Fixes crashes when modules call a counter using function from
mod_init() or a fixup.
E.g.: xlog(s) does a dns lookup from mod_init. If the lookup fails
the dns code will try to increment the new dns.failed_dns_request
counter.
Reported-by: Michal Matyska michal.matyska iptel org
Andrei Pelinescu-Onciul [Tue, 24 Aug 2010 10:27:08 +0000 (12:27 +0200)]
core: don't try to fixup to PVE in fixup_var_str*
Moved PVE (PV based format string) fixing attempts from
fixup_var_str* into new fixup functions: fixup_var_pve_str*.
If the argument is a constant string, fixup_var_pve_str*() will
try first "fixing" it to a PVAR, then (if it fails) to an AVP,
SELECT, PVE and finally normal string. If the PVE fixup returned a
"static" PVE, the result will be discarded and a normal string
fparam will be created (a little bit faster at runtime).
The only difference between fixup_var_str*() and
fixup_var_pve_str*() is that fixup_var_str*() will not attempt
fixing to PVE (does not support PV style format strings).
Andrei Pelinescu-Onciul [Tue, 24 Aug 2010 09:43:36 +0000 (11:43 +0200)]
core: fix mod_register & dlflags
dlflags changes in mod_register() functions were discarded
resulting in modules failing to load.
Andrei Pelinescu-Onciul [Thu, 19 Aug 2010 18:03:54 +0000 (20:03 +0200)]
core: daemon status/pipe fixes & interface changes
- moved most of the daemon status stuff to daemonize.[ch].
- nicer interface (e.g. daemon_status_send(code))
- send/read only 1 byte which will be used as exit code
- send an error status on error (fixes
"Main process exited before writing to pipe" error message)
- disabled the timeout. Not needed (now a status is sent always
and even an unlikely process crash before sending it is detected via
the read() failure) and very hard to find a good value (some
setups start very slow).
- close the pipe "send" fd in processes not needing it
- attempt to send back status only if dont_daemonize is not set
(not only if dont_fork==0, it is possible to have forking
enabled, but daemonize disabled: ser -DD)
- BSDed daemonize.[ch] and pt.[ch]
Andrei Pelinescu-Onciul [Wed, 18 Aug 2010 18:06:25 +0000 (20:06 +0200)]
modules*: add k stats. includes where needed
Add k statistics includes (../../lib/kcore/kstats_wrapper.h) for
modules using k statistics and missing them (needed after no
longer automatically including k stats via sr_module.h)
Andrei Pelinescu-Onciul [Wed, 18 Aug 2010 18:01:31 +0000 (20:01 +0200)]
kstats: cleanup - move type defs. to separate file
- moved kamailio statistics type defs to kstats_types.h (from
lib/kcore/kstats_wrapper.h). This removes core dependency on
lib/kcore include files (the statistics types are needed for the
kamailio module interface defs).
- removed statistics.h (it is obsolete, counters.h should be used
instead and if somebody really needs it, it should include
lib/kcore/kstats_wrapper.h or lib/kcore/statistics.h).
Andrei Pelinescu-Onciul [Wed, 18 Aug 2010 17:58:44 +0000 (19:58 +0200)]
modules_k/*: add missing lib/kmi/mi.h include
Andrei Pelinescu-Onciul [Wed, 18 Aug 2010 17:54:09 +0000 (19:54 +0200)]
mi: cleanup - move type defs. to separate file
Moved MI types defs to mi/mi_types.h (from lib/kmi/mi.h).
This removes core dependency on lib/mi include files
(mi types are needed for kamailio module interface defs).
Andrei Pelinescu-Onciul [Wed, 18 Aug 2010 16:39:43 +0000 (18:39 +0200)]
tm: don't reply if the reply dest. is not yet set
- relay_reply() doesn't attempt to send the reply if the reply
destination is not yet fully set. This can happen for example
if reply_to_via is set, Via contains a host name (and not an ip)
and before having a chance to resolve the name a reply must be
sent (reply for a message that hasn't been sent yet: very
unlikely, but possible).
- use a membar_write() in init_rb(), before setting the reply send
socket (the reply send socket is also used as a flag for a fully
initialized reply destination and the membar_write() makes sure
that everything else was written before the send socket and no
re-ordering will take place).
Andrei Pelinescu-Onciul [Wed, 18 Aug 2010 16:36:14 +0000 (18:36 +0200)]
tcp: fix double increment for the established stats
The counter/stats for established TCP connections were incremented
twice in the case of accept()-ed connections: once immediately
after the accept() and another time after the first packet
received or sent on the connection.
Now they are incremented only after the first successful send or
receive.
Daniel-Constantin Mierla [Wed, 18 Aug 2010 15:21:14 +0000 (17:21 +0200)]
pua: updated devel API documentation
- updated documentation to reflect latest source code
- patch by Nikita Kozlov
Miklos Tirpak [Wed, 18 Aug 2010 13:32:36 +0000 (15:32 +0200)]
dns cache: fix manually inserted SRV record order
The manually inserted SRV records thought the RPC interface
were not ordered by their priority and weight which resulted in
wrong SRV look-ups, i.e. not the highest priority record
was chosen first.
Henning Westerholt [Wed, 18 Aug 2010 11:45:37 +0000 (13:45 +0200)]
pdbt: fix two bugs in debian packaging
Daniel-Constantin Mierla [Wed, 18 Aug 2010 09:01:46 +0000 (11:01 +0200)]
kamailio.cfg: db_url parameters are set via defined DBURL ID
- one value to be updated in order to change DB connectivity URL, i.e.,
#!define DBURL "mysql://openser:openserrw@localhost/openser"
modparam("xyz", "db_url", DBURL)
Daniel-Constantin Mierla [Wed, 18 Aug 2010 08:48:16 +0000 (10:48 +0200)]
kamailio.cfg: updated users list email address
- fixed small typo
Daniel-Constantin Mierla [Tue, 17 Aug 2010 18:35:22 +0000 (20:35 +0200)]
rtpproxy(k): renamed files to reflect module name
Ovidiu Sas [Tue, 17 Aug 2010 17:10:33 +0000 (13:10 -0400)]
modules_k:rtpproxy - remove trailing whitespaces from documentation
Ovidiu Sas [Tue, 17 Aug 2010 17:06:25 +0000 (13:06 -0400)]
modules_k:rtpproxy - documentation update
Daniel-Constantin Mierla [Tue, 17 Aug 2010 15:26:36 +0000 (17:26 +0200)]
kamailio.cfg: load rtpproxy module
- update for nathelper module split
- rtpproxy module needed when WITH_NAT is defined
Ovidiu Sas [Tue, 17 Aug 2010 15:18:30 +0000 (11:18 -0400)]
modules_k:rtpproxy - silence a noisy probe
Ovidiu Sas [Tue, 17 Aug 2010 14:22:58 +0000 (10:22 -0400)]
modules_k:nathelper: updated documentation
Ovidiu Sas [Tue, 17 Aug 2010 14:16:03 +0000 (10:16 -0400)]
modules_k:nathelper - restore nortpproxy_str parameter
Marius Zbihlei [Tue, 17 Aug 2010 08:24:43 +0000 (11:24 +0300)]
core:sr_module If offsetof is not found in stddef.h define it as a macro
This is very unlikely; the macro uses the null pointer dereference
Marius Zbihlei [Tue, 17 Aug 2010 08:12:38 +0000 (11:12 +0300)]
core: use offsetof() extension to finding the memory offset of a member of a structure
This replaces some undefined behavior code in the form of null pointer dereferences
Offsetof is present in stddef.h and it is fairly portable across platforms/compilers.
Daniel-Constantin Mierla [Mon, 16 Aug 2010 16:35:45 +0000 (18:35 +0200)]
tmx: updated for last tm changes
- cancel_uacs() takes new type of paraeters
- reply function takes str* parameters
Daniel-Constantin Mierla [Mon, 16 Aug 2010 16:32:48 +0000 (18:32 +0200)]
tm: update to make seas module work
- worked from patch provided by Elias Baixas
- new function to build uac cancel exported via API
- several parameters for reply functions converted from char* to str*
as lenght was available or needed anyhow
- updated cancel_uacs() type definition
Daniel-Constantin Mierla [Mon, 16 Aug 2010 16:31:58 +0000 (18:31 +0200)]
makefile: for kamailio flavour define AS support
- needed by seas module
Daniel-Constantin Mierla [Mon, 16 Aug 2010 16:31:09 +0000 (18:31 +0200)]
sl: quick update to provie reason param as str*
Daniel-Constantin Mierla [Mon, 16 Aug 2010 16:28:03 +0000 (18:28 +0200)]
core: reason phrase param updated to be str*
- build_res_buf_from_sip_req() takes reply reason phrase parameter as
str*
- many calls of this function have already the reason length
Ovidiu Sas [Mon, 16 Aug 2010 13:15:50 +0000 (09:15 -0400)]
modules_k:rtpproxy - updated examples
- load rtpproxy module for rtpproxy functions
Ovidiu Sas [Mon, 16 Aug 2010 13:11:04 +0000 (09:11 -0400)]
modules_k:nathelper - updated examples
- load rtpproxy module for rtpproxy functions
Andrei Pelinescu-Onciul [Mon, 16 Aug 2010 12:13:17 +0000 (14:13 +0200)]
core: fix fixup_pvar_pvar bug
Fix typo-bug introduced in
d756b6bfb:
fixup_pvar_pvar() called fixup_free_pvar_all() instead of
fixup_pvar_all().
Reported-by: Juha Heinanen jh tutpro com
Ovidiu Sas [Mon, 16 Aug 2010 04:17:35 +0000 (00:17 -0400)]
Makefile: enable rtpproxy
Ovidiu Sas [Mon, 16 Aug 2010 04:14:20 +0000 (00:14 -0400)]
modules_k/nathelper: remove rtpproxy functionality from nathelper
Ovidiu Sas [Mon, 16 Aug 2010 04:09:42 +0000 (00:09 -0400)]
modules_k/rtpproxy: update files
- remove nathelper functionality from rtpproxy code
Ovidiu Sas [Mon, 16 Aug 2010 04:05:11 +0000 (00:05 -0400)]
modules_k/rtpproxy: new module
- copy initial files from nathelper to rtpproxy
Andrei Pelinescu-Onciul [Mon, 16 Aug 2010 00:18:57 +0000 (02:18 +0200)]
Merge remote branch 'origin/andrei/tcp_tls_changes'
Asynchronous TLS support and various TCP and io_wait fixes
(especially on BSDs).
* origin/andrei/tcp_tls_changes: (67 commits)
tls: fix partial write on write-wants-read queue flush
tls: more config vars displayed by the tls.options RPC
tls: fix trailing space in new modparams
tls: verbose debugging for SSL_ERROR_WANT_WRITE
tls: add lib64 to LIBS path
tls: doc - notes about enabling debugging
tls: added debug log level modparam
tls: modparams for ct write queue params
tls: doc - new & async related config options
tls: no tls_bio debugging by default
tls: change read_ahead, buffers and freelist defaults
tcp: verbose and safer close()
tls: enable PARTIAL_WRITE by default
tls: partial SSL_write support when reading (tls_read_f)
tls: don't report SSL protocol errors as bugs
tls: more consistent low memory checking
io_wait: kqueue: use the entire array during too many errors fallback
tcp: fix dispatching closed connections to tcp readers
tcp: more complete error messages
tls: support for partial encoding and reseting send_flags
tcp: support for tls partial encoding
tls: update & fix repeated send & delayed send
tcp: change tls send callback interface
tsend: s/char*/const char*/ in function params.
tls: very verbose debug logging
tls: fix tls_send out-of-mem on new connection
tcp: force eof after read if write side hangup
tcp: don't reset read_flags on RD_CONN_REPEAT_READ
tls: deal with internal openssl buffering
tls: fix initial state error handling
tcp: more consistent IO_FD_CLOSING usage
io_wait: kqueue: use a bigger array
io_wait: kqueue: handle ENOENT and more robust error handling
io_wait: fix kqueue io_wait_add & POLLIN
io_wait: don't update FD watched status on error
io_wait: fix kqueue and too many errors in changelist
io_wait: fix: check for EV_ERROR for kqueue()
tcp: fix fd passing bug
tls: config option for sending close notify alerts
tls: SSL_shutdown() only fully established connections
tls: ssl_flush() fix and re-worked error reporting
tls: tls.list rpc: fix timeout & ip display
tls: fix queue accounting
tls: rpc: tls.list and tls.options update
tls: config options for the internal queues
tls: fix wrong wbio usage
tls: fix empty files treatment
tls: added tls.options rpc
tls: migrated to the runtime cfg framework
db_flatstore: updated get_abs_pathname use
core: get_abs_pathname() uses now pkg_malloc()
core: str.h - s/NULL/0/
tls: doc - removed handshake_timeout and send_timeout
tls: removed handshake_timeout and send_timeout
tls: s/tls_cfg/tls_domains_cfg
tls: added tls_info rpc
tls: fix unregistered rpc commands
tls: async support (major tls core rewrite)
tls: tls_bio ctrl cmd support, fixes and debug
tls: clear text write queue implementation
tls: added a minimum overhead shm buffer queue
tls: safer destroy_cfg
tcp: new tls hooks interface and async tls changes
tls: added custom memory based bio
tcp: minor cleanups & spelling
tcp: tcp_send() split in 3 smaller functions
tcp: comments & new internal command
Andrei Pelinescu-Onciul [Sun, 15 Aug 2010 23:12:41 +0000 (01:12 +0200)]
tls: fix partial write on write-wants-read queue flush
When flushing the queue the SSL_write() should be retried until
the queue is empty or there is an error (SSL_WANT_READ or
SSL_WANT_WRITE), since it is possible to have partial writes
smaller then the block size (SSL_write() will write at most 1
record when partial writes are enabled and with the
ssl_max_send_fragment option it is possible to set/have record
sizes smaller then typical writes).
Andrei Pelinescu-Onciul [Sun, 15 Aug 2010 23:04:18 +0000 (01:04 +0200)]
tls: more config vars displayed by the tls.options RPC
Added send_close_notify and debug to the list of displayed config
options.
Andrei Pelinescu-Onciul [Sun, 15 Aug 2010 23:02:19 +0000 (01:02 +0200)]
tls: fix trailing space in new modparams
Fix typo (trailing space) in recently added modparams:
con_ct_wq_max, ct_wq_max and ct_wq_blk_size.
Andrei Pelinescu-Onciul [Sun, 15 Aug 2010 16:10:42 +0000 (18:10 +0200)]
tls: verbose debugging for SSL_ERROR_WANT_WRITE
Debugging messages for partial write and SSL_ERROR_WANT_WRITE
(enabled only if the tls module is compiled with
-DTLS_WR_DEBUG and -DTLS_RD_DEBUG).
Andrei Pelinescu-Onciul [Sun, 15 Aug 2010 16:07:38 +0000 (18:07 +0200)]
tls: add lib64 to LIBS path
Add default openssl install path on 64 bit systems
($(LOCALBASE)/ssl/lib64).
Andrei Pelinescu-Onciul [Sun, 15 Aug 2010 16:55:15 +0000 (18:55 +0200)]
tls: doc - notes about enabling debugging
- notes about compiling with debugging enabled
- document tls_debug modparam
Andrei Pelinescu-Onciul [Sun, 15 Aug 2010 16:51:38 +0000 (18:51 +0200)]
tls: added debug log level modparam
The log level used for debug messages can now be configured via
the new tls_debug modparam. It can be also changed at runtime
(tls.debug).
Note that for now debug messages will be logged only if tls is
compiled with one of -DTLS_RD_DEBUG, -DTLS_WR_DEBUG or
-DTLS_BIO_DEBUG.
Andrei Pelinescu-Onciul [Sun, 15 Aug 2010 16:03:43 +0000 (18:03 +0200)]
tls: modparams for ct write queue params
Added missing modparams for: con_ct_wq_max, ct_wq_max and
ct_wq_blk_size (until now they were configurable only at runtime).
Andrei Pelinescu-Onciul [Sun, 15 Aug 2010 15:47:17 +0000 (17:47 +0200)]
tls: doc - new & async related config options
- document send_close_notify con_ct_wq_max, ct_wq_max and
ct_wq_blk_size.
- document runtime support for tls_log, low_mem_threshold1,
low_mem_threshold2, connection_timeout and config
- note about compression being now disabled by default
- changed defaults for ssl_release_buffers, ssl_freelist_max_len
and ssl_read_ahead.
Andrei Pelinescu-Onciul [Fri, 13 Aug 2010 20:25:34 +0000 (22:25 +0200)]
core: fix unclosed comment
Andrei Pelinescu-Onciul [Fri, 13 Aug 2010 19:44:36 +0000 (21:44 +0200)]
Merge remote branch 'origin/andrei/cancel_reason'
CANCEL Reason support, according to RFC 3326.
The Reason headers are added both for CANCELs generated due to a
received final reply and hop by hop CANCELs generated because of
a received CANCEL. Both cases can be turned on/off individually.
* origin/andrei/cancel_reason:
tm: no reason modparams if compiled with no cancelr. support
tm: option to compile without reason support
tm: docs: reason header modparams and script function
tm: improved Reason support for E2E CANCELs
tm: fix Reason generation for on-the-fly branch CANCELs
tm: CANCEL reason header on/off switches
tm: Reason header copy for received CANCELs
tm: Reason header generation for local CANCELs
Andrei Pelinescu-Onciul [Fri, 13 Aug 2010 19:39:03 +0000 (21:39 +0200)]
tm: no reason modparams if compiled with no cancelr. support
Don't register cancel_reason modparams and script functions if
compiled with -DNO_CANCEL_REASON_SUPPORT.
Henning Westerholt [Fri, 13 Aug 2010 16:07:48 +0000 (18:07 +0200)]
sms(k): delete after merge with the module from ser
Henning Westerholt [Fri, 13 Aug 2010 16:05:57 +0000 (18:05 +0200)]
sms(s): delete after copy to common directory
Henning Westerholt [Fri, 13 Aug 2010 16:05:22 +0000 (18:05 +0200)]
sms: adapt user agent string
Henning Westerholt [Fri, 13 Aug 2010 16:03:31 +0000 (18:03 +0200)]
sms(s): move to common modules directory
Henning Westerholt [Fri, 13 Aug 2010 15:58:42 +0000 (17:58 +0200)]
sms(s): merge changes from sms(k) (log file refactorings and one security fix)
Andrei Pelinescu-Onciul [Fri, 13 Aug 2010 15:20:26 +0000 (17:20 +0200)]
tm: option to compile without reason support
If compiled with -DNO_CANCEL_REASON_SUPPORT, the reason header
support will not be enabled.
Marius Zbihlei [Fri, 13 Aug 2010 11:39:49 +0000 (14:39 +0300)]
modules/db_mysql: Improved handling of driver error counter
Marius Zbihlei [Thu, 12 Aug 2010 15:11:16 +0000 (18:11 +0300)]
modules/db_mysql Added statistics (via counter framework) for mysql driver error
These errors are caused by lost connectivity to the server.
Andrei Pelinescu-Onciul [Fri, 13 Aug 2010 10:30:26 +0000 (12:30 +0200)]
tm: docs: reason header modparams and script function
- docs for:
local_cancel_reason = 0|1
e2e_cancel_reason = 0|1
t_set_no_e2e_cancel_reason(0|1)
- regenerated README
Andrei Pelinescu-Onciul [Fri, 13 Aug 2010 09:45:39 +0000 (11:45 +0200)]
core: DragonFly kqueue support enabled
- fixed kqueue support check for DragonFly (seems to be always
supported since it was forked from FreeBSD 4.8).
- in dragonfly case define both __OS_freebsd and __OS_dragonfly so
that we can make some exceptions for dragonfly (e.g. no >= 4.1
version check at runtime before enabling kqueue).
- assume SCTP in 2.6 is at least on par with SCTP in FreeBSD 7.1.
Marius Zbihlei [Fri, 13 Aug 2010 08:35:51 +0000 (11:35 +0300)]
core:dns_cache When dns_cache is disabled, increment dns error counter on failure
This affects dns_resolvehost() and resolvehost() when dns_cache is disabled
Marius Zbihlei [Fri, 13 Aug 2010 08:21:51 +0000 (11:21 +0300)]
test/unit: Cleaned up cfg for unit tests
As modules migrate from modules_k/ to modules/ using relative path in loadmodule statement becomes difficult,
so both modules/ and modules_k/ path are searched.
Daniel-Constantin Mierla [Thu, 12 Aug 2010 18:41:08 +0000 (20:41 +0200)]
presence(k): add option to keep subscriptions on timed out NOTIFY
- patch by Alex Hermann, closes SF#
3035794
Daniel-Constantin Mierla [Thu, 12 Aug 2010 15:14:38 +0000 (17:14 +0200)]
presence(k): copy evs_subs_handl to presence event list
- patch by Nikita Kozlov, closes FS#82
Henning Westerholt [Thu, 12 Aug 2010 15:11:40 +0000 (17:11 +0200)]
test: fix path in one test after sl move
Daniel-Constantin Mierla [Thu, 12 Aug 2010 14:00:35 +0000 (16:00 +0200)]
pv: allow From header attributes to be updated with assignment
- same as for To header attributes
- writable PVs: $fu, $fU, $fd and $fn
Daniel-Constantin Mierla [Thu, 12 Aug 2010 13:47:12 +0000 (15:47 +0200)]
pv: more To hdr attributes allowed in assignment
- values of username, domain and display name of To header can be set
via PV assignmet ($tU, $td, $tn)
- use carefully, don't do many assignments to these variables for same
message - it can results in strange output due to lumps system used
behind. However, you can do msg_apply_changes() after one assignment
Daniel-Constantin Mierla [Thu, 12 Aug 2010 12:38:36 +0000 (14:38 +0200)]
pv: $tu can be used in assignments
- update sip URI in To header
$tu = "sip:test@sip-router.org";
- note that this should be avoided unless strictly necessary (can break
compatibility with some old devices that match on To uri instead of To
tag
Marius Zbihlei [Thu, 12 Aug 2010 09:14:59 +0000 (12:14 +0300)]
core:resolve.c Added counter increment on error case for another function present in the interface
TThe get_record() is called when resolving new entries in dns_cache(if compiled).
Marius Zbihlei [Wed, 11 Aug 2010 14:54:27 +0000 (17:54 +0300)]
core:dns Added failed DNS requests statistics when dns cache is not used
DNS statistics can be seen with:
sercmd> cnt.get dns failed_dns_request
Still TODO: failed statistics for DNS cache
Andrei Pelinescu-Onciul [Wed, 11 Aug 2010 20:49:04 +0000 (22:49 +0200)]
Merge remote branch 'origin/andrei/raw_sock'
Raw socket support for sending UDP IPv4 packets
(major performance increase on multi-cpu machines running linux:
40-50% faster at least in stateless mode).
* origin/andrei/raw_sock:
NEWS: notes about the new udp4_raw mode
raw sockets: added info rpc
core: compile raw socket support by default on freebsd
raw sockets: freebsd support
cfg: delay cfg_shmize to just before forking
core: always compile the raw sockets code on linux
raw sockets: ttl can be set from the config file
raw sockets: ttl can be set or auto-detected
core: include raw socket support in version info
raw sockets: use BSD ip & udp structure versions
raw sockets: config file support
raw sockets: udp send will use now raw sockets if enabled
raw sockets: runtime config support
raw sockets: build ip header & fragmentation support
raw socket: compilation fixes
raw sockets: get dst. ip from the ip header
core: basic support for receiving udp sip packets on raw sockets
core: basic raw socket support functions
Andrei Pelinescu-Onciul [Wed, 11 Aug 2010 20:27:53 +0000 (22:27 +0200)]
app_lua: updated to the sr31 export records
- use the new unified sr31_cmd_export_t (removed checks for v0 or
v1 modules).
- set the correct module function type in the created action (in
function of the function export record number of parameters one
of the MODULE[0-5]_T or MODULEX_T).
Andrei Pelinescu-Onciul [Wed, 11 Aug 2010 20:24:46 +0000 (22:24 +0200)]
debugger: update the module functions types
Updated to the current module function types (MODULE*_T), after
the rve_f_params merge.
Removed MODULE_T and added MODULE0_T, MODULE1_T, MODULE2_T,
MODULE1_RVE_T, MODULE2_RVE_T, MODULE3_RVE_T, MODULE4_RVE_T,
MODULE5_RVE_T, MODULE6_RVE_T, MODULEX_RVE_T.
Andrei Pelinescu-Onciul [Wed, 11 Aug 2010 20:18:06 +0000 (22:18 +0200)]
Merge remote branch 'origin/andrei/rve_f_params'
Automatic support for expressions or variables in lots of module
functions. It applies to all the module functions declared without
a fixup, with a fixup and the corresponding free_fixup function or
with a compatible ser or kamailio style standard fixup (declared
in sr_module.h or mod_fix.h).
E.g.: f($a, "b = " + $b); t_set_fr($v + 2 + $x).
t_set_fr($foo) (equivalent now with t_set_fr("$foo")).
If the expression is constant, then there is no restriction, all the
module functions can take it as parameter.
E.g.: f("7 *" +" 6 = " + 7 * 6) # equivalent to f("7 * 6 = 42")
* origin/andrei/rve_f_params: (21 commits)
NEWS: notes about expressions in function parameters
core: enable RVE fixup support when fixup_free is present
core: automatically fill known fixup_free functions
core: functions to get a fixup corresp. fixup_free function
core: k style fixup_free fixes
core: added generic fparam fixup_free functions
core: pvapi: added pv_spec_free_contents()
core: fix "unsigned" bug in sint2str*()
core: fix auto-deref. for vars in fparam fixups
perl(k): use sr31_cmd_export_t
app_python: use sr31_cmd_export_t
core: internal module interface changes
print(s): fparam fixup example
core: support for RVEs in fparam fixups
core: rval - don't use static buffer for int conversions
core: ut.* - BSD licence
core: ut.h: added sint2strbuf()
perl(k): update api calls: s/MODULE_T/MODULE2_T/
app_python: update api calls: s/MODULE_T/MODULE2_T
print(s): more module function examples
core: support for expressions/variables in function parameters
Conflicts:
NEWS
action.c
modules/app_python/python_msgobj.c
modules_k/perl/openserxs.xs
pkg/kamailio/debian-lenny
pvapi.c
route.c
route_struct.h
sr_module.c
Andrei Pelinescu-Onciul [Wed, 11 Aug 2010 17:49:09 +0000 (19:49 +0200)]
kamctl: fix make use and make install
- use $(MAKE) instead of directly using make.
- added targets for the install dirs (create bin_dir, cfg_dir and
man_dirs if missing). This fixes make -C utils/kamctl install
(allows installing only kamctl).
Andrei Pelinescu-Onciul [Wed, 11 Aug 2010 17:31:14 +0000 (19:31 +0200)]
presence_dialoginfo(k): fix bsd compilation
On FreeBSD don't define _XOPEN_SOURCE (define it only on linux).
It's not needed for strptime() and worse will cause some other
defines to be missing, like INADDR_LOOPBACK ( if_XOPEN_SOURCE
is defined, __BSD_VISIBLE will be undefined => lots of missing
defines).
Reported-by: Reported-by: Olle E. Johansson oej edvina net
Andrei Pelinescu-Onciul [Wed, 11 Aug 2010 16:56:57 +0000 (18:56 +0200)]
xmlrpc: fix includes and libs
Reported-by: Olle E. Johansson oej edvina net
Andrei Pelinescu-Onciul [Wed, 11 Aug 2010 16:51:09 +0000 (18:51 +0200)]
sercmd: fix LIBS - don't link -lresolv if not needed
- link with libresolv only on linux, solaris and darwin
- on solaris link also witl -lxnet and -lnsl
(bugs introduced in
b0f00c3348b9)
Andrei Pelinescu-Onciul [Wed, 11 Aug 2010 15:04:14 +0000 (17:04 +0200)]
NEWS: notes about Dragonfly BSD support
Vincent Stemen [Wed, 11 Aug 2010 14:58:04 +0000 (16:58 +0200)]
makefile: Dragonfly BSD support
This also simplifies the platform directory path settings so that
the ifeq() statements are not nested 5 levels deep.
Signed-off-by: Andrei Pelinescu-Onciul <andrei@iptel.org>
Vincent Stemen [Wed, 11 Aug 2010 14:49:40 +0000 (16:49 +0200)]
sercmd: Patch to add Dragonfly BSD support (makefile)
Signed-off-by: Andrei Pelinescu-Onciul <andrei@iptel.org>
Vincent Stemen [Wed, 11 Aug 2010 14:45:05 +0000 (16:45 +0200)]
db_text(k) makefile: fix make use
This fixes a bug. It called make directly which breaks on
platforms where it is being compiled under gmake.
Signed-off-by: Andrei Pelinescu-Onciul <andrei@iptel.org>
Vincent Stemen [Wed, 11 Aug 2010 14:40:41 +0000 (16:40 +0200)]
makefile: fix $DESTDIR
This fixes Makefile.defs to properly handle $DESTDIR as a base
installation directory for packaging, etc (equivalent to BASEDIR).
Signed-off-by: Andrei Pelinescu-Onciul <andrei@iptel.org>
Andrei Pelinescu-Onciul [Wed, 11 Aug 2010 14:16:54 +0000 (16:16 +0200)]
NEWS: notes about expressions in function parameters
Andrei Pelinescu-Onciul [Wed, 11 Aug 2010 14:03:55 +0000 (16:03 +0200)]
NEWS: notes about the new udp4_raw mode
Andrei Pelinescu-Onciul [Wed, 11 Aug 2010 14:02:10 +0000 (16:02 +0200)]
raw sockets: added info rpc
Added core.udp4_raw_info RPC for getting information about the raw
mode state.
E.g.:
sercmd> core.udp4_raw_info
{
udp4_raw: 1
udp4_raw_mtu: 1500
udp4_raw_ttl: 64
}