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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

(cherry picked from commit 770ced3)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

- drop reply in default onreply_route when using 'drop'

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

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

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

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

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

10 years agousrloc(k): rpc version for ul.dump
Daniel-Constantin Mierla [Sun, 10 Jan 2010 19:01:01 +0000 (20:01 +0100)]
usrloc(k): rpc version for ul.dump

- ul.dump is rpc alternative for MI ul_dump
- better alternative to avoid pkg frametation in MI process
(cherry picked from commit 3cc229a3c7ba36475c3bd67e4849297f9548bf26)

10 years agocore: init the len of sock_str attribute
Daniel-Constantin Mierla [Sun, 10 Jan 2010 18:02:42 +0000 (19:02 +0100)]
core: init the len of sock_str attribute
(cherry picked from commit f0d89fb89d1b588f253f048ab8fc22e0db7fff66)

10 years agoctl: added parameters to control buffer size
Daniel-Constantin Mierla [Sun, 10 Jan 2010 15:56:54 +0000 (16:56 +0100)]
ctl: added parameters to control buffer size

- new parameters to control binrpc buffers size:
- binrpc_max_body_size
- binrpc_struct_max_body_size
(cherry picked from commit acfc2142ed5ef3e61138792136eb32616502229d)

10 years agohtable(k): rpc commad to dump htable
Daniel-Constantin Mierla [Sun, 10 Jan 2010 14:56:10 +0000 (15:56 +0100)]
htable(k): rpc commad to dump htable

- htable can get big, rpc behaves better than MI
(cherry picked from commit 5997048fdbefee51aebb8c996178ceb44120a482)

10 years agopv(k): fixed $shv engine
Daniel-Constantin Mierla [Sun, 10 Jan 2010 13:25:54 +0000 (14:25 +0100)]
pv(k): fixed $shv engine

- shv relies on early shm initialization
- got rid of hacks to define first in pkg and move in shm at mod_init
- fixes 3.0 specific issues reported by Andrey 'Krieger' Utkin
- closes FS#22
(cherry picked from commit b69e1c96bf65a4c4f8fa6bec28699607ea03e24d)

10 years agosanity: print From hdr in warning message
Daniel-Constantin Mierla [Sun, 10 Jan 2010 11:09:20 +0000 (12:09 +0100)]
sanity: print From hdr in warning message

- when parsing of the header fails
(cherry picked from commit 195cdf43e8eea385330376184f8b78b7d0322780)

10 years agonathelper(k): print bad contact uri
Daniel-Constantin Mierla [Sun, 10 Jan 2010 11:08:45 +0000 (12:08 +0100)]
nathelper(k): print bad contact uri

- help in troubleshooting bad sip clients
(cherry picked from commit a93f7ad1ce21413d0e2a00e4c8579f6bfe0a8a3f)

10 years agocore: more verbose when error parsing hdr
Daniel-Constantin Mierla [Sun, 10 Jan 2010 11:07:34 +0000 (12:07 +0100)]
core: more verbose when error parsing hdr

- give a hint about the content parsing (max first 20 chars of attempted
  string)
(cherry picked from commit 78e8075eea603a854dcf0142dda0f1dae6c69857)

10 years agokamailio.cfg: updated cfg with sample PSTN gw routing
Daniel-Constantin Mierla [Fri, 8 Jan 2010 16:16:28 +0000 (17:16 +0100)]
kamailio.cfg: updated cfg with sample PSTN gw routing

- defined within WITH_PSTN
- calls to numbers starting with + or 00 are sent to PSTN GW
- use of custome cfg parameter to define GW IP
- remove preloaded Route headers for initial requests
(cherry picked from commit a9e4d86edeee7b2f70b33c89c91e800aefe11da0)

10 years agonathelper(k): fix for swap scenario
Daniel-Constantin Mierla [Thu, 7 Jan 2010 10:33:37 +0000 (11:33 +0100)]
nathelper(k): fix for swap scenario

A -> RTPP -> B, offer in INVITE, answer in 200 OK (SDP in INVITE+200 OK)
A -> RTPP -> B, re-Invite on session expiry, SDP in 200 OK + ACK

The from-tag and to-tag are not swapped in the ACK with
rtpproxy_answer(). Options "sl" would do the trick also, but "s" is
deprecated soon

Patch by Walter Schober
(cherry picked from commit 839e2fee663846f68289a519c27aef433a872afa)

10 years agopresence(k): aliased MLA to SLA
Daniel-Constantin Mierla [Wed, 6 Jan 2010 17:50:31 +0000 (18:50 +0100)]
presence(k): aliased MLA to SLA

- doc updated to reflect RFCs and drafts
(cherry picked from commit 1a9f379ed66dbcc05f7750ff961c0a7a6607b0db)

10 years agocore: event parsing enahced for dialog;ma
Daniel-Constantin Mierla [Wed, 6 Jan 2010 17:47:36 +0000 (18:47 +0100)]
core: event parsing enahced for dialog;ma

- event defined by draft-anil-sipping-bla for Multiple Line Appearances,
folloing to Shared/Bridged Line Appearances (SLA, BLA)
- draft is defunct but still some implementations out there
(cherry picked from commit 1e99795d2ddebe8a6794c3b407f96d30378b872f)

10 years agotm: documented t_relay_to() function
Daniel-Constantin Mierla [Wed, 6 Jan 2010 14:39:46 +0000 (15:39 +0100)]
tm: documented t_relay_to() function
(cherry picked from commit d8af3a4b17bf1ca71df1d977d986f407ff34cfc2)

10 years agotm: added t_relay_to(proxy, flags)
Daniel-Constantin Mierla [Wed, 6 Jan 2010 13:36:55 +0000 (14:36 +0100)]
tm: added t_relay_to(proxy, flags)

- parameters compatible with t_relay() in K old version
- proxy value can be: [proto:]host[:port]
- flgas can be 0x01, 0x04 or 0x05, 0x02 flag not supported
- all or any of the parameters can be omitted
(cherry picked from commit fc59de27f87772df40a4408485a34344acbec950)

10 years agotm: documented t_replicate() functions
Daniel-Constantin Mierla [Wed, 6 Jan 2010 11:32:01 +0000 (12:32 +0100)]
tm: documented t_replicate() functions
(cherry picked from commit a511ceccfb593736d44b7701fd07f3f9b5c3a104)

10 years agotm: t_replicate() can take avps & select as params
Andrei Pelinescu-Onciul [Fri, 15 Jan 2010 13:26:22 +0000 (14:26 +0100)]
tm: t_replicate() can take avps & select as params

t_replicate(uri) can now take ser-style avps ($foo) and selects (@ruri)
as params (along PVs and normal strings).

10 years agotm: added t_replicate(uri)
Daniel-Constantin Mierla [Wed, 6 Jan 2010 10:57:24 +0000 (11:57 +0100)]
tm: added t_replicate(uri)

- the parameter has to be a valid SIP uri
- it can be given via a script variable
- K compatibility mode
- reported by Santiago Gimeno
(cherry picked from commit 64e19a6a44a21adf6f743420a26a48cc3acd099a)

10 years agodb_oracle: use PARAM_TYPE_MASK when checking param type
Daniel-Constantin Mierla [Tue, 5 Jan 2010 17:40:17 +0000 (18:40 +0100)]
db_oracle: use PARAM_TYPE_MASK when checking param type
(cherry picked from commit d1e89c65a9412d2a0560c5699a34dd01e231a2d9)

10 years agosnmpstats: fix param type checking
Daniel-Constantin Mierla [Tue, 5 Jan 2010 17:27:46 +0000 (18:27 +0100)]
snmpstats: fix param type checking

- parameter type is given from definition of params not from modparam
  value type, resulting in mismatches for parameters that have
  USE_FUNC_PARAM flag set
- reported by Santiago Gimeno
(cherry picked from commit 9cf36478222aaf573a6cd7b65e6a4fd6227eb8cd)

10 years agocore: define module_loaded to use find_module_by_name
Daniel-Constantin Mierla [Mon, 4 Jan 2010 20:32:24 +0000 (21:32 +0100)]
core: define module_loaded to use find_module_by_name

- it was declared but not implemented
- in use by snmpstats and perlvdb modules
- reported by Santiago Gimeno
(cherry picked from commit d4db8304926d30a4244b9ee05d21b5614eae5f94)

10 years agotopoh: documented mask_ip parameter
Daniel-Constantin Mierla [Mon, 4 Jan 2010 20:11:29 +0000 (21:11 +0100)]
topoh: documented mask_ip parameter
(cherry picked from commit 15ece92703aa691333d06a79b7e9901bf893bf74)

10 years agotopoh: new mod param mask_ip
Daniel-Constantin Mierla [Mon, 4 Jan 2010 19:15:12 +0000 (20:15 +0100)]
topoh: new mod param mask_ip

- allow to set the value of IP address used in masked URIs
- reported by Klaus Darilion
(cherry picked from commit ff748db23dfdbf022d37071181628ddf5591b58b)

10 years agokamctl: regenerate db creation scripts
Daniel-Constantin Mierla [Mon, 4 Jan 2010 13:35:19 +0000 (14:35 +0100)]
kamctl: regenerate db creation scripts
(cherry picked from commit af5463d865bde28d1a2f977d0c9bd9347588b6e0)

10 years agodrouting: updated db schema from master
Daniel-Constantin Mierla [Mon, 4 Jan 2010 13:32:19 +0000 (14:32 +0100)]
drouting: updated db schema from master
(cherry picked from commit 700fb1a97a5c6c089fce85f547117286644872b5)

10 years agokamctl: added new db table definitions
Daniel-Constantin Mierla [Sun, 3 Jan 2010 12:31:23 +0000 (13:31 +0100)]
kamctl: added new db table definitions

- sql to create drouting tables for mysql, postgres and oracle
(cherry picked from commit 0292a4b5f2cb0564649699c592e51a06edbd91a4)

10 years agosrdb1: version table updated
Daniel-Constantin Mierla [Sun, 3 Jan 2010 12:29:58 +0000 (13:29 +0100)]
srdb1: version table updated
(cherry picked from commit df46a824d87dfcf839c175c77addda9eed533c03)

10 years agodrouting: adding db table definitions
Daniel-Constantin Mierla [Sun, 3 Jan 2010 12:27:57 +0000 (13:27 +0100)]
drouting: adding db table definitions

- built based on readme
- needs further updates as the code is ahead of documentation with what
  tables are used and their structure
(cherry picked from commit 53a25f097d127eea7fef3c3c32f7f24421aaad15)

10 years agodrouting: regenerate readme
Daniel-Constantin Mierla [Sun, 3 Jan 2010 12:25:51 +0000 (13:25 +0100)]
drouting: regenerate readme

- it was out of sync with docbook sources
- use entity for application name and corrected db url
(cherry picked from commit 0d88fc527d5ddb90e3d52ca8f369bdcfaab63ed4)

10 years agodrouting: lookup route block by name
Daniel-Constantin Mierla [Sun, 3 Jan 2010 11:38:48 +0000 (12:38 +0100)]
drouting: lookup route block by name

- routes are identified in 3.0 by string name
- if name is "0", do not execute the route (this is the main one) for
  backward compatibility
- based on patch by Andrey 'Krieger' Utkin, FS#24
(cherry picked from commit 94f834041eb43121e6750cf524c32225aaf1c80d)

10 years agotopoh: updated README
Daniel-Constantin Mierla [Sun, 20 Dec 2009 17:48:37 +0000 (18:48 +0100)]
topoh: updated README
(cherry picked from commit 63664db5030d1a6c5e700e645cebac9238e985ba)

10 years agotopoh: update Replaces header
Daniel-Constantin Mierla [Sun, 20 Dec 2009 17:44:33 +0000 (18:44 +0100)]
topoh: update Replaces header

- case when call-id is masked
(cherry picked from commit f03706ce3b8670d052619ac4a38fda4fa35bedfd)

10 years agotopoh: code to update Refer-to URI
Daniel-Constantin Mierla [Sun, 20 Dec 2009 16:50:51 +0000 (17:50 +0100)]
topoh: code to update Refer-to URI
(cherry picked from commit e9400dba371252edef970407be7b85dbe45e1ea3)

10 years agotopoh: callid prefix can be set via param
Daniel-Constantin Mierla [Sun, 20 Dec 2009 11:49:59 +0000 (12:49 +0100)]
topoh: callid prefix can be set via param
(cherry picked from commit a8f1190d0a400c34809af798a482311539b15527)

10 years agotopoh: add prefix to encoded callid
Daniel-Constantin Mierla [Sun, 20 Dec 2009 11:46:10 +0000 (12:46 +0100)]
topoh: add prefix to encoded callid
(cherry picked from commit 9d5a1ff7736d49794d5ca0f29e118d90f0ee5b68)

10 years agopv: completed $snd() pv with buf and len
Daniel-Constantin Mierla [Thu, 24 Dec 2009 16:10:44 +0000 (17:10 +0100)]
pv: completed $snd() pv with buf and len

- missing parts of available info about message to be sent
(cherry picked from commit aedb1ee1f3e43341fe507f41ca12208c2dec3cf7)

10 years agotm: further fixes for t_drop_replies()
Daniel-Constantin Mierla [Wed, 23 Dec 2009 21:34:28 +0000 (22:34 +0100)]
tm: further fixes for t_drop_replies()

- use a dedicated variable replies_dropped to signal that replies were
  dropped instead of using drop_replies marker
(cherry picked from commit e024da1fb6cd4b74d68760070f9e159356d93b0e)

10 years agotm: updated doc for t_drop_replies()
Daniel-Constantin Mierla [Wed, 23 Dec 2009 16:34:09 +0000 (17:34 +0100)]
tm: updated doc for t_drop_replies()
(cherry picked from commit cb1866ee7b23688d12b222d503b1709f16f75a12)

10 years agotm: fix drop reply behavior
Daniel-Constantin Mierla [Wed, 23 Dec 2009 16:24:30 +0000 (17:24 +0100)]
tm: fix drop reply behavior

- Kamailio default behavior after failure route was to drop previous
  received replies. However, if the failure_route didn't add a new
  branch, resulted in a 500 TM reply error
- thanks to Ricardo Martinez for reporting
- credits to Andrei Pelinescu-Onciul for troubleshooting and prviding
  the fix: a new default mode for Kamailio (3) which does not drop
  previous replies if no new branch was added
(cherry picked from commit a883a0b2501ba2b25ca87994d4c211f75a556ebe)

10 years agopua_dialoginfo: use contact addresses in document
Daniel-Constantin Mierla [Sat, 19 Dec 2009 22:26:01 +0000 (23:26 +0100)]
pua_dialoginfo: use contact addresses in document

- for local and remote targets
- patch by Santiago Gimeno, FS#20
(cherry picked from commit d35df0cdab10aa83b3ceedde3a8cde8baeabfc79)

10 years agodialog: new column to hold request uri
Daniel-Constantin Mierla [Sat, 19 Dec 2009 22:02:32 +0000 (23:02 +0100)]
dialog: new column to hold request uri

- table version set to 4
- regenerated db creation scripts
(cherry picked from commit 1f64908ea0e6ad14ad6d209ba0eeb7b11c6b1e18)

10 years agopua_dialoginfo: patch from FS#18
Daniel-Constantin Mierla [Sat, 19 Dec 2009 21:58:26 +0000 (22:58 +0100)]
pua_dialoginfo: patch from FS#18

- applied patch from Francisco Javier Lizaran Vilches
- use r-uri in published document
(cherry picked from commit 09d1bdc38b51619c65c6a9ec8f293cf9c395c6c1)

10 years agodialog(k): patch from FS#18
Daniel-Constantin Mierla [Sat, 19 Dec 2009 21:44:28 +0000 (22:44 +0100)]
dialog(k): patch from FS#18

- reworked part of patch from Francisco Javier Lizaran Vilches
- add r-uri to dialog structure
- r-uri value can be specified as PV via parameter, default is $ru
- for dlg_bridge, r-uri is same as to-uri
(cherry picked from commit df950f2a01f5f3d3da04e84a4f4a1cb810def038)

10 years agoMakefile: fix name of cfgutils in group kstandard
Daniel-Constantin Mierla [Sat, 19 Dec 2009 18:54:16 +0000 (19:54 +0100)]
Makefile: fix name of cfgutils in group kstandard

- wrong name having '_' caused the module not to be packaged in debs
- reported by Klaus Darilion
(cherry picked from commit 78e097fb1f185796abeff27e5978bc82bdb6526f)

10 years agokactl: cisco_restart cmd update to latest t_uac_dlg
Daniel-Constantin Mierla [Tue, 15 Dec 2009 21:58:10 +0000 (22:58 +0100)]
kactl: cisco_restart cmd update to latest t_uac_dlg

- reported by David at lublink.net
(cherry picked from commit 1203f6771a08e499ad0ef39d18f6096814db537a)

10 years agonat_traversal: link with lib kcore
Daniel-Constantin Mierla [Mon, 14 Dec 2009 19:50:17 +0000 (20:50 +0100)]
nat_traversal: link with lib kcore

- include lib/kcore/statistics.h
- fix undefined symbol for register_module_stats
- reported by Ricardo Martinez
(cherry picked from commit 7c6600c007be55263b48ea1114cbecab86347076)

10 years agodbschema: regenerate db creation scripts
Daniel-Constantin Mierla [Mon, 14 Dec 2009 09:22:25 +0000 (10:22 +0100)]
dbschema: regenerate db creation scripts

- get the updates to permissions and lcr tables
(cherry picked from commit 0586447a736900832b116f3a3826ba01d9969b6a)

10 years agoperl: install Perl libs along with module
Daniel-Constantin Mierla [Mon, 14 Dec 2009 09:19:38 +0000 (10:19 +0100)]
perl: install Perl libs along with module
(cherry picked from commit 256423a131e3cf71f20591f3f9066b30bd036726)

10 years agodebian(k): packaging for 3.0
Daniel-Constantin Mierla [Fri, 11 Dec 2009 22:09:29 +0000 (23:09 +0100)]
debian(k): packaging for 3.0

- updated deb packaging specs for 3.0
- use SR makefile groups to build the packages
- all module packages are named kamailio-*-modules
- kamailio-dbg not packaged for now
(cherry picked from commit 72692ea1af122b12e1071e364063fcc1a182cbd0)

10 years agokamctl: install of berkeley and oracle tools
Daniel-Constantin Mierla [Fri, 11 Dec 2009 22:08:44 +0000 (23:08 +0100)]
kamctl: install of berkeley and oracle tools
(cherry picked from commit 5b46bc809a5bc970f7ad7334be33bf0db723807b)

10 years agodb_oracle: install kamctl files
Daniel-Constantin Mierla [Fri, 11 Dec 2009 22:06:35 +0000 (23:06 +0100)]
db_oracle: install kamctl files
(cherry picked from commit 669e52df21b5fe54d1968db94628859c5291681a)

10 years agodb_text: install kamctl files
Daniel-Constantin Mierla [Fri, 11 Dec 2009 22:06:15 +0000 (23:06 +0100)]
db_text: install kamctl files
(cherry picked from commit b3d47d4912dd8b64c5bce56be574aafe2340605b)

10 years agodb_berkely: install kamctl files
Daniel-Constantin Mierla [Fri, 11 Dec 2009 22:05:27 +0000 (23:05 +0100)]
db_berkely: install kamctl files
(cherry picked from commit 1daa56fbec81034affeaadcfa97a1373413c68ea)

10 years agodb_postgres: install kamctl files
Daniel-Constantin Mierla [Fri, 11 Dec 2009 22:04:49 +0000 (23:04 +0100)]
db_postgres: install kamctl files
(cherry picked from commit 7922ddd9442e27028afae8e9d342bb31e383f624)

10 years agodb_mysql: install kamctl files
Daniel-Constantin Mierla [Fri, 11 Dec 2009 22:03:21 +0000 (23:03 +0100)]
db_mysql: install kamctl files

- done only for kamailio flavor
(cherry picked from commit f90750795260e753051e75f1918e0fd0ede1212f)

10 years agokamctl: mysql specific files installed by db_mysql module
Daniel-Constantin Mierla [Fri, 11 Dec 2009 21:13:45 +0000 (22:13 +0100)]
kamctl: mysql specific files installed by db_mysql module
(cherry picked from commit c79057fb794171b5acb46c2811b97dc22158dbf2)

10 years agoadded groups to match kamailio packaging
Daniel-Constantin Mierla [Fri, 11 Dec 2009 19:06:12 +0000 (20:06 +0100)]
added groups to match kamailio packaging
(cherry picked from commit ae8f695bcb0a1dca8cd55fd6fd5214d40edb7154)

10 years agotm: unlock replies in case of drop
Daniel-Constantin Mierla [Fri, 11 Dec 2009 09:33:33 +0000 (10:33 +0100)]
tm: unlock replies in case of drop

- needed after yesterday fix from Andrei
(cherry picked from commit 5ff3c06aa9c216ef9b2168c0163f00017eb4718d)

10 years agotm: drop reply in onreply_route[x]
Daniel-Constantin Mierla [Thu, 29 Oct 2009 10:49:38 +0000 (11:49 +0100)]
tm: drop reply in onreply_route[x]

- K compatible mode to drop reply in TM onreply routes by using 'drop'
  for reply status < 200
(cherry picked from commit 1f2388a)

10 years agotm: drop replies behaviour based on cfg compat mode
Daniel-Constantin Mierla [Wed, 2 Dec 2009 18:01:09 +0000 (19:01 +0100)]
tm: drop replies behaviour based on cfg compat mode

- default behaviour for #!KAMAILIO is to drop replies after failure
  route to avoid selecting same reply during the next failure event
- for the rest of cases all replies are kept and used to select the
  code for new failure route (SER compat mode)
- t_drop_replies() can take one parameter
- 'n[one]' - do not drop any reply (good for #!KAMAILIO mode)
- 'l[ast]' - drop replies received during last serial forking step
- 'a[ll]' - drop all replies

- if the parameter is missing, then will drop all replies
(cherry picked from commit 3ed668500c9a0f0d2f864f5a56cf7fa886f8457c)

10 years agodialog(k): avoid double free
Daniel-Constantin Mierla [Fri, 27 Nov 2009 13:32:29 +0000 (14:32 +0100)]
dialog(k): avoid double free

- rested current dialog pointer when distroying dialog to avoid double
  free done from post script callback
- reported by Klaus Feichtinger
(cherry picked from commit 9dca82405261dd925f845a98f2da26f7b1d12b54)

10 years agocore: set response functions list after mod init
Daniel-Constantin Mierla [Thu, 26 Nov 2009 20:29:45 +0000 (21:29 +0100)]
core: set response functions list after mod init

- some modules set the response function in mod_init
- case of nathelper(k)
- reported by Andres Moya
(cherry picked from commit ee51f2f714d52d6cc36417bb65b764d718514984)

10 years agotm: fix for dialog(k) module workaround
Daniel-Constantin Mierla [Wed, 25 Nov 2009 17:21:22 +0000 (18:21 +0100)]
tm: fix for dialog(k) module workaround

- check if types!=TMCB_MAX if callback registration checks
- TMCB_MAX is used to store pointer to dialog in order to clean it
  quickly
(cherry picked from commit 0cab381fc93e53ca039ddbfa8ae6546fa14be066)

10 years agoupdated debian lenny packaging files for K 3.0
Daniel-Constantin Mierla [Wed, 18 Nov 2009 07:55:49 +0000 (08:55 +0100)]
updated debian lenny packaging files for K 3.0

- credits to Jonas Bergler <jonas.bergler [at] staff.snap.net.nz>
(cherry picked from commit f7e79e649988c787864594092b297865b0cdfb67)

10 years agouac(k): use type to detect www/proxy_authenticate hdrs
Daniel-Constantin Mierla [Sun, 15 Nov 2009 11:52:36 +0000 (12:52 +0100)]
uac(k): use type to detect www/proxy_authenticate hdrs

- reported by Mangust (mangust2), SF.net #2897594
(cherry picked from commit c92e49f3eb145c3767e996d21717d20613a899d5)

10 years agoroute(1) changed to route(RELAY)
Daniel-Constantin Mierla [Sun, 15 Nov 2009 04:12:51 +0000 (05:12 +0100)]
route(1) changed to route(RELAY)

- reported by Mangust (mangust2), SF.net #2897872
(cherry picked from commit 99d434e5c2ff2771a5e6c486630e859d5bcc6c5f)