Merge tag 'upstream/4.4.7' into mr5.5

Upstream version 4.4.7
changes/23/21323/1
Marco Capetta 7 years ago
commit 2b360f9ea9

@ -1,3 +1,924 @@
===================== 2018-02-26 Version 4.4.7 Released =====================
===================== Changes Since Version 4.4.6 ===========================
commit 9ec8ebfe86efff485657126ebd432f626d365b3d
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Mon Feb 26 14:02:26 2018 +0100
Makefile.defs: version set to 4.4.7
commit fc2d822e14bb0b23ae082d7479d5a1d0af11b4c9
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Mon Feb 26 13:59:19 2018 +0100
pkg/rpm: version set to 4.4.7 in specs
commit b8ea200ee2f905b57beccfa4053b5f7d691aa371
Author: Victor Seva <linuxmaniac@torreviejawireless.org>
Date: Mon Feb 26 11:12:02 2018 +0100
pkg/kamailio/deb: version set to 4.4.7
commit d2409502e003edec9fecda977bf15b2103d17a45
Author: Kamailio Dev <kamailio.dev@kamailio.org>
Date: Thu Feb 22 13:16:13 2018 +0100
modules: readme files regenerated - nathelper ... [skip ci]
commit c5317e8b279f599a9d75041bee2acfaf113e9c63
Author: Mikko Lehto <mslehto@iki.fi>
Date: Tue Feb 20 01:32:39 2018 +0200
tm: flag core to use forced socket when uac socket is set
- without flag SND_F_FORCE_SOCKET probing by dispatcher module
and route script function t_uac_send() will choose incorrect source socket
(cherry picked from commit 7da5e5b0a1f4520c7fdd7eeb23b4b58ecc27be22)
(cherry picked from commit fc77e25b48c4ec1b9988925faa50d00c4fd296b3)
(cherry picked from commit c5becaa0485a20215d2349406e1224395375b236)
commit 88288a6bc797586ab97aa3d89aa04fd29b32c476
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Mon Feb 19 10:29:46 2018 +0100
registrar: set current time before checking registered() conditions
- patch by Dmitri Savolainen, closes GH #1267
(cherry picked from commit 5b5d55bd377b0572efaceeb0feb164bf5dd26bf0)
(cherry picked from commit 438e11a04c488a8f53555c54d1a12b50213cd342)
(cherry picked from commit e9924d323c7fe4f96610ea78ab53f06d64130e8d)
commit 85ea7409d657166110657939800c8300332251a7
Author: Mikko Lehto <mslehto@iki.fi>
Date: Thu Feb 15 16:57:28 2018 +0200
main.c: fix argument help typo
(cherry picked from commit 324f3f2347e24e3335a32b8310a76a7bc4a0550a)
(cherry picked from commit 8abe7b8ddff6bfc98a09b59c443487ce4ab612d4)
(cherry picked from commit 4e6cb74d31a03799f67f3d58834f34d1601986be)
commit 9c40fe634b1659064e0741fd5c6a5826e43b523c
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Wed Feb 14 11:24:37 2018 +0100
utils: kamdbctl - updated help message for migrate command
(cherry picked from commit 52a8def8d2a3e83170ab554a85b26d977d99f51a)
(cherry picked from commit 5f6f8cf461cf79faeb69c191d6f3168982d32536)
(cherry picked from commit 516b219951e22610016bab1c0072889354870afe)
commit 902599f52acb93a9ba3582182c9434558ba1b9f0
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Wed Feb 14 11:23:55 2018 +0100
core: atomic - updated email addres in warning message
(cherry picked from commit 65fab0d02271c242d6e43e499198ee1da2275a4b)
(cherry picked from commit ae15fe5ec20c08c80fc9722fc63c0a4b358704c9)
(cherry picked from commit ffecc4f2fad8f0b91bbd2736ae95c60c0d773851)
commit 75d03862de068f5c13d648758dccbcf04e725a37
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Tue Jan 23 17:33:39 2018 +0100
ctl: proper handling of optional param specifier (*) in rpc scan
(cherry picked from commit a9972863681059c647af4bafd0d9a20f7648c801)
(cherry picked from commit 427145b9cdadf01a18b3f38ffdb14094154a647a)
(cherry picked from commit 62b2c0e8a2670c93be3d6dbbe60a818bc0c6fc35)
commit dd789ace79805c60ebeb6a260d614e0a2d2ab9bf
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Sat Dec 30 16:57:42 2017 +0100
core: resolve - early safety checks to deal faster with broken dns responses
(cherry picked from commit 20752cf945d4ba0660d321d73efff5c93f6d20a8)
(cherry picked from commit 95e0976ce7e1976664f5ae107936e94e6fd618f0)
(cherry picked from commit 982910c597485b6bdce1f4bf99cd19b7bf8db47e)
commit a8dd08b1003fb4297993700820c9c41f1cd2eab3
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Sun Dec 31 10:39:16 2017 +0100
websocket: early check for frame size to fit max buf size
- avoid decoding a large buffer and then fail
- allocate BUF_SIZE+1 for fragment buffer, coherent with other recv
buffers
(cherry picked from commit 3302687e2b995ee9faab1655e6bb5e5d4a0dbc87)
(cherry picked from commit a6ad018a1d7d796272bc0cb07f7540c711990e37)
(cherry picked from commit 4491a7bef8c7097ecec9e251ae1944b43ee3570c)
commit 6eb530626184641c9fbb10bd819d253be2e39947
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Thu Feb 22 10:45:29 2018 +0100
tm: handle success return code by forward_request() for e2e ACK
- forward_request() returns 0 on success, propagate 1 to config wrapper
- backport of 171e3b9f197ffebaa2b1a1959ba109bb442764a2
(cherry picked from commit ef84d989228836c28dd5ec5acea5c4239cab58db)
commit 795f08d5115bac57bf2e5e64ccc825d7e04e0c67
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Thu Dec 21 17:07:15 2017 +0100
evapi: detect the OS darwin as substring
- adjust condition to suit analyzer
(cherry picked from commit 81687628bc5fb90a6b126cd2b89c8725a4c3caab)
(cherry picked from commit f23191b8cf85efd5e7cb973608e893b038155a44)
(cherry picked from commit fff4297974f7cfb636a0858278d863c9fdff80aa)
commit 1c621f63e0cc1e06cca9ac0d612086f925d0426f
Author: Dmitri Savolainen <savolainen@erinaco.ru>
Date: Wed Dec 20 13:07:35 2017 +0300
pv: correct sbranch params appending
- some params (like dest uri) were not appended to branch
due to a copy-paste typo
(cherry picked from commit e66f109c0d2cf657387ee1e0745ff2d55eebcaaa)
(cherry picked from commit fe02ca6c76ab969277a1b5e9092a229b1a4a502b)
(cherry picked from commit 61842f459efefe22ae80b1173b00b64216e0c6bb)
commit 1b3e22dcb12d650e08316c28382dc224e9b75148
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Mon Feb 12 08:50:54 2018 +0100
lcr: fixed checking if there is more uris available for next_gw
- manual backport for 732a3153a0a41d5f951fff85de607f0b46ae73da
(cherry picked from commit 43c9ad6f4dc2e20dd40a2d3dfa6b03f3dd79e3d4)
commit 87e19bd198b62a777bb379136e224be3aaea310d
Author: Timmo Verlaan <tverlaan@gmail.com>
Date: Sat Jan 13 10:43:06 2018 +0100
nathelper: allow port to be specified in force_socket, fixes #1298
(cherry picked from commit bebf08e2cb8fd87141e686af5cb37947f0720a33)
commit abae0f79478df791e8343e19aca4e5e5baac9bed
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Fri Dec 8 16:42:19 2017 +0100
tls: safety checks for select values
(cherry picked from commit 084364becd2f6f5d6e620721cb0837466c3a2f31)
(cherry picked from commit d86963283cd7a58d94929959ca09ed31ae9bd116)
(cherry picked from commit 4066b1d1acf05df768116500ce2830d8163c05d1)
commit c03bc4576dfc7a4e8f5538a778fdaee8d4d980ad
Author: Timo Teras <timo.teras@iki.fi>
Date: Wed Nov 29 19:53:29 2017 +0100
mtree: use cast to unsigned char for accessing _mt_char_table array
- switched the index from unsigned int to unsigned char
- simplifies the code by avoiding the tests for exceeding the size of the
array
- error message extended to print the full string
- slightly modified version of PR #1343
(cherry picked from commit ae18e409d71d2d4eccb4604bb6f29a121309b54e)
(cherry picked from commit 26bd009c4963e4acb1e0eb52d0f5c9f17096d412)
(cherry picked from commit f5e9778f8558a3813943bb3a1ab50caf8cf9a69f)
commit 76899e4fd409c51118bae6f4e2a9086c22ba1249
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Thu Nov 23 11:48:49 2017 +0100
tm: fixed condition in via_matching()
- introduced in previous commit
(cherry picked from commit 4bd1d70c2804ee2a1d29bd911275aa241577cfc1)
(cherry picked from commit 41bfcaab0d403d2290d353e9fa522af22b72e8f6)
(cherry picked from commit adec5e4a039884af28ddd52579c47c174ebf69b6)
commit 2fa714cfbf6dfdfeb129d083a494709298f79e2a
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Thu Nov 23 09:50:30 2017 +0100
tm: default port checking in via_matching()
(cherry picked from commit 5fabdea4d86c527a2e38caaae7a54884367d6a7c)
(cherry picked from commit be53e5d24707d8248a904124a6c88913b6eb0174)
(cherry picked from commit 5736d90efaad9827997be304920e1909029b2499)
commit 7defd0d49424ccaf130d074bd9ae915934b3f422
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Mon Dec 4 12:49:41 2017 +0100
jansson: fix the include guard in header file
(cherry picked from commit d17a48c186b0b8066518db2106037fe925846d2e)
(cherry picked from commit 90b1b0e1f00f72dcac7f7ef1c734ea43afd1cd83)
(cherry picked from commit 782b76b40672075756348297bea61d2d38f96022)
commit fcbdfdd2b532da5b9f497edf92a1179273a958a3
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Mon Dec 4 09:21:54 2017 +0100
core: pv - use active values for pv buffer slots and size
- during startup, param value and active can be different, up to the
moment when the config is completely loaded
(cherry picked from commit a156c625b434dc0bc19c43ece524f90b1179d881)
(cherry picked from commit 3929986622b502660b870916bcd7f015282a6a1c)
(cherry picked from commit 2ad024fb3e38823af8668d73d0a64be1f18697f3)
commit 5b5ea4a3e8bb7196927c3d745ce8d9c30888f05e
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Fri Nov 17 14:33:46 2017 +0100
core: test if ipv6 address starts with [ for subst snd lumps
- safer than the test against cached socket address known to be without
[], allowing to pass any address value to be used
- reported by GH #1315
(cherry picked from commit 2cb94f28d7d214d22ccdb6a5b993b391f61ea15b)
(cherry picked from commit 69fb3b9b274b618ce4bf03c61ae03e11db8d0593)
(cherry picked from commit e23a4d18cad2ef6cade13d34a86a232e4cd6833e)
commit cc148bc65af261b3996491a5171d5447498a9d21
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Wed Nov 1 16:46:20 2017 +0100
core: safety checks to catch enclosed ipv6 addresses or hostnames in via build
(cherry picked from commit 1de15c06b982b4b4a0d9860b51c2178745cd9af0)
(cherry picked from commit a3448fc11a8be943263693c2b7a63227a852f9bd)
commit 29b7428bbe85cdbace9a55d784aefda0d1a39944
Author: Surendra Tiwari <surendratiwari3@gmail.com>
Date: Wed Nov 1 16:34:32 2017 +0100
core: remove condition for ipv6 outbound socket to build via header
(cherry picked from commit e6abb9302c8b127b7ac15cd7e24075845e271bf1)
(cherry picked from commit 5c709d7cc8e016e9354d34fc4002c1a49e240064)
commit 7b85d25acade0450a61bd9819971187f9f77d79b
Author: Rick <dunst0@users.noreply.github.com>
Date: Wed Oct 25 14:37:42 2017 +0200
dispatcher: undeclared UINT32_MAX on FreeBSD missing header
- on FreeBSD is for UINT32_MAX the <stdint.h> header needed
(cherry picked from commit ed4757c5886f0fc93d3eeec9f01885b63c6dc9c8)
(cherry picked from commit aa36dab490f76d3de46564f3b59a2c3298d22bdf)
commit 34723c3cd412b5469a29e1c5bcc581bd7cbc32f0
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Fri Oct 13 12:19:30 2017 +0200
core: fix bitwise test for priting socket details
(cherry picked from commit 18b996262fb1c7bde94b494ce837754dc82c9e7e)
(cherry picked from commit e23e875be66d4f42d18f495b5fc86e3e6954612f)
commit e51130295d25ba6b256bd20cdff4acde011be2a8
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Fri Oct 13 12:18:32 2017 +0200
core: fix for bitwise test in core rpc command
(cherry picked from commit f662a62519f99e046caf03063147104af22ec3c3)
(cherry picked from commit b0b77e07e10e8bbf65c991c7dae8f33627c7cbe4)
commit 5a18fd53d895713ef02e6a0412e4bf0f5fb2efde
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Tue Sep 19 11:45:46 2017 +0200
core: tcp - increased the size for flags field in connection struct
(cherry picked from commit 65ed9b065c497266a4ecd9760e7c168c69b4c6e8)
(cherry picked from commit 14bb444e8c106bf0d8ac6009ff6c47b373621775)
commit f939eee50a48ea595d5a568d56fc1dc279defa3f
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Fri Sep 29 18:58:49 2017 +0200
htable: do not fork clean timer if no auto-expire is defined
- match the same condition used in mod init to declare the extra process
- reported by GH #1237
(cherry picked from commit dc15a8cd44fa17bb5ad12bf418c78af9f6e071e1)
(cherry picked from commit eabe0f84b46840d1164c83791c998021f9c42bd1)
commit 01a61f3ad1b33ab6801cc12edea9fa9b7631d5a3
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Fri Sep 15 09:27:07 2017 +0200
core: tcp_read_headers() safety checks for parsed pointer
- reset if it is out of read buffer range and the state is H_SKIP_EMPTY
(cherry picked from commit f47f42ac12ad111b3bad52aa2d495fbed5ef395d)
(cherry picked from commit 1ecc88431777f0013aa29cbcccc041168002dea5)
commit 26750650b23b29068b392492c9e274becdf10961
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Fri Sep 15 09:00:18 2017 +0200
core: tcp_read_ws() - safety checks for very large advetised lenght
- use unsigned for lenght to avoid going negative on large read values
(cherry picked from commit 35ee3a4b0357820bf31b3aa68323dcb7df267e94)
(cherry picked from commit fd96ab480515713e4a390376f38bc09aa28e93b4)
commit ae94a11798a0c8823e277a12b0aa6d2d94cc400e
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Thu Aug 17 13:42:59 2017 +0200
core: parser - use case insensitive comparison to get header by name
- same for next sibling header
- GH #1217
(cherry picked from commit 4072b0f9fbc084a4f4640e1b4272b7f8495cd1bb)
(cherry picked from commit 672ea36889c2a7c1ae919b08447234e2ced00677)
commit 40660afedb90555c3121a1dd832c54cc1178cafa
Author: Alexander Lutay <alutay@sipwise.com>
Date: Tue Aug 1 23:20:41 2017 +0200
kamctl: fix dangerous 'rm -rf' code in case if variables are not defined
(cherry picked from commit 62f573d4ecbbebe5f0f2d3b39be7ad4c2b460e65)
(cherry picked from commit 0a5b94d53f59e8f59f8d7d976ca14859fa008c6c)
commit 58dd29f28b4cf3973136be839e307b5bb33aed4a
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Thu Jul 27 12:42:42 2017 +0200
lcr: check return for rewrite_uri() and do memset with size of alloc
(cherry picked from commit 67bd080310c5b8371d9943fa964e81154c916356)
(cherry picked from commit fa2ff3aa155eb996c1ba6d41b0e0a46fe3290847)
commit f5e53b7f1ae27baa00bd8f25a3a7a5209924f43a
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Thu Jul 27 09:15:00 2017 +0200
ctl: close opened sockets in case of errors
(cherry picked from commit a81a809897ff381526db38e71af38dfcdfa74f04)
(cherry picked from commit 414057818756f423ec8a68f7637ee8f0d842c235)
commit e7257b8f369085f9f4c3bca00e284e0b65653c97
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Thu Jul 27 09:07:09 2017 +0200
core: mem/f_malloc - explicit set to 0 for bit shifting greater than size
(cherry picked from commit 0cb33abe8b2196fb26baf459f66d9d7b9e920013)
(cherry picked from commit e37fbf0ada489c97ddb65419ea9df31e0afe4db5)
commit 6cd05bf60d34526402daebc71db0d0de723b224b
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Sun Jul 23 08:59:43 2017 +0200
json: remove use of deprecated macro is_error()
(cherry picked from commit 0efa76d80e159fd2a7516388fe2405ad4fb6c5b6)
(cherry picked from commit 3ad98055bb7ca86d09911a270f737c2853ef9a5d)
commit 30b673f36eb22367d03c9a5eebae55ca25b9c9e4
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Sat Jul 22 08:33:22 2017 +0200
pdt: reorder checks to avoid null access
(cherry picked from commit 1891dcb958100b5383f40278c4d675474d309df4)
(cherry picked from commit b3079e89ff88d20e65751b43a1a1a7f4f79ce275)
commit 964444e3d6b0cb479707f0e6c1f082c85e8978ff
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Fri Jul 21 13:50:07 2017 +0200
xcap_server: proper test of retun code for add lump rpl
(cherry picked from commit 08c404f245e55b37f71d4326afd959ecf1ea831c)
(cherry picked from commit 41ab1e8ad7fea0abddef1b557ab286dd942e8969)
commit 71e41cdac117be0d5c8a62c012fe05b99ed9a919
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Fri Jul 21 13:51:36 2017 +0200
xhttp: proper check for return of add lump rpl
(cherry picked from commit 9136ce8017660e92f624de6f7b8a07e50620dfa1)
(cherry picked from commit 707ab98e69a659335bf386b2bf91ae4bae31ee84)
commit 99ce8ca1d94105ab582190c11336c76ccad2a665
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Fri Jul 21 08:44:37 2017 +0200
core: pvapi - added free_pvname_list()
(cherry picked from commit 5c883b5ff70ad24befd5191be41502e6e35fec88)
(cherry picked from commit d59f5db999c8247c6f656241c0eeec2ad8456e6b)
commit 2ef3705401981a57dc9dace1c7f5b4c80838194b
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Thu Jul 20 09:25:20 2017 +0200
tls: free temporary buffer when fixing shm path name for config
(cherry picked from commit 2dc19e5c78977416c15ebe93a4f4e6d72ed475a0)
(cherry picked from commit badc783d132eea9fc7b6302a5fbae654d034bd74)
commit c4ef71f6111ef7164e40b51b44e5d745f674506c
Author: Mikko Lehto <mslehto@iki.fi>
Date: Wed Jul 19 17:28:16 2017 +0300
modules/textops: msg_apply_changes() comes from textopsx module
(cherry picked from commit 7a6d31935c7e8e29dd150412f1e6281fdf3efd53)
(cherry picked from commit 5653d95b8b5e4d6dc0e6c706053e144ca77ed3c1)
commit 190b19db9d7b44836f220eb5e21de4b5ba7951b0
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Wed Jul 19 14:38:22 2017 +0200
core: dns case - init local proto to UDP if not provided for srv resolve
(cherry picked from commit 01771c42d3b96678a2d0ba08bc1e5c83191ada8d)
(cherry picked from commit c2f33cb7187d7d1bb87828e752cecfd6a4bbb7c8)
commit a7e370516384924e3fffd5df42c7f409a9c71302
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Tue Jul 18 09:11:12 2017 +0200
core: pt - check to avoid two times closing unneeded sockets
(cherry picked from commit 0225f89a658172d0652e0da14549ee03653114d2)
(cherry picked from commit e0078a5686ede14be0bdc2f4943f9bfb0295f832)
commit a27dffcc5ede5e84b6cd9e644fa6eb1f6e9aeb17
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Tue Jul 18 09:08:14 2017 +0200
core: daemonize - proper chown for pgid file instead of pid file
(cherry picked from commit 65593cc23bc89349fb42566cbd7eb2bbf8744db9)
(cherry picked from commit ea331fc5185e1da916a867fb4f078ee03dc39c5d)
commit 2201e94afcaa56304679d2c032f73d8ffc8aae78
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Sun Jul 16 08:55:30 2017 +0200
sdpops: more details for sdp_with_transport() docs
(cherry picked from commit cad4b8f456d3508a2ec3196c89a4a8e3ce9d9d32)
(cherry picked from commit b127d8ddb1acc9d630ee98d503d3322d70ef02b4)
commit 85cce5d395d5fb0af70e35010a4fcd0809729257
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Sat Jul 15 09:05:18 2017 +0200
speeddial: add missing break when handling blob db result type
(cherry picked from commit 59dde423db52e7a8c69072685c99cd6a11440017)
(cherry picked from commit cf6c876d1203210c86f751cd9aeb3a63b77e95bb)
commit eb44c249b10de28a356bfeaf5a8d605d8775b67f
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Thu Jul 13 09:03:54 2017 +0200
lib/srdb1: db_table_version() can handle DB1_BIGINT and DB1_DOUBLE values
- in case of views or other database engine, the type for version value
can be different that DB1_INT. If it is a number, cast it to int
- extracted from GH #1186 by Emmanuel Schmidbauer
<emmanuel@getweave.com>
(cherry picked from commit d0ac74742f6aeb71492d2a9cab747162cdc5ddf8)
(cherry picked from commit b14d34d734fb5065350d35318e34bb90e0dab07f)
commit 076ecedc16bc098483fe002f38b0f1cb092293f4
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Thu Jul 13 08:49:51 2017 +0200
db_postgres: added missing break for INT8OID results
- instead of DB1_BIGINT, the result type ended to be DB1_DOUBLE
(cherry picked from commit d12f96af28e170c3197a47af5840e5e30639adf6)
(cherry picked from commit d620b8e94832e2394fb1c48a7f062c7f04489288)
commit fbd23583a1252dbb1d083a3924291fabf40e2b0f
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Fri Jul 7 09:53:38 2017 +0200
pv: free var in case pkg alloc failure
(cherry picked from commit 86e349463c7d573e9a5e68bd3984ecc95808adb4)
(cherry picked from commit 8872413b981fb12c037ed08b39fbea785ddda2fb)
commit 893311c85fcccffe5f77a10a19092e7b7759680a
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Tue Jul 4 12:29:08 2017 +0200
rls: reset vars to avoid double free in case of error
(cherry picked from commit ceaafc67dae4f7e7424c8706ccea90c30eed45b6)
(cherry picked from commit 127cafe9eafdf8c3d8ed5926884cba53c400ec2f)
commit 29d07fded15cb6823e343319e009abb97ef3119d
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Tue Jul 4 12:26:41 2017 +0200
presence: reset vars to avoid double free in case of error
(cherry picked from commit 97ac3b910dc955058fa4c08ad22ac01a4f31fe74)
(cherry picked from commit c1e0910498dea28c6405ec0683e42d4e7b2581a7)
commit ebd99e7f3a85b2fa59700972cbec132d2ad27b70
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Tue Jul 4 12:00:47 2017 +0200
mtree: access values before safety checks of variables
(cherry picked from commit 56d1d317e4bac7130586541fed75be670ea0f9ce)
(cherry picked from commit 954fd81f7b0431f16b6a3112f7a421ff50c75a59)
commit e7478126316e06bae1efb4ed74b49276c1414975
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Tue Jul 4 09:59:10 2017 +0200
dialog: safety checks and free of profiles in case of errors
- free partial list of profiles in dlg_set_timeout_by_profile() when no
more memory
(cherry picked from commit 609297d62a08d1d75550c2f5e7f7fd19b98fd104)
(cherry picked from commit 301ee8bb20e5853783496f1080b9fc9ba686dbe1)
commit 532ac9e2e912ab4a6729c18b41de3187031c6769
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Tue Jul 4 09:08:04 2017 +0200
tmx: missing break in t_cancel_branches(others)
(cherry picked from commit 2ab0adee57aa82487adf7d3776835eca071afa27)
(cherry picked from commit 01a93753d6240515872a9efc58c7eb832bbd93a1)
commit c6404c21dbf20e5fd5ee27d0ae91cae2effb42fa
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Tue Jul 4 08:44:50 2017 +0200
core: free locl link structures not linked to listen sockets
(cherry picked from commit 98a6ef19bcfe14b7150183a9bec98854f5c0063b)
(cherry picked from commit 3f076581e3b9ffc46aa82cfcfba3c0fbb54bc326)
commit 4e3e301cd952aa50c02c06e122b3cd3573579111
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Tue Jul 4 08:43:28 2017 +0200
core: proxy - free in case of errors making proxy only from ip
(cherry picked from commit 0aa7571afe5c25bfffaf865595181470ac78f4d2)
(cherry picked from commit a309561c6cc81187939234a524e5a9da2fd009c2)
commit 50f04f3c32a886d9667dc72b39c1955272629cf9
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Tue Jul 4 08:41:34 2017 +0200
core: parser uri - add missing break to avoid useless assignments
(cherry picked from commit 1a5662b212ddcbea40ca33e34bfda0459802b756)
(cherry picked from commit 0b940b8f3f5270336a17c8651477749314136d16)
commit 4aa06038824805538ca006d04017d6ea44fdce44
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Tue Jul 4 08:40:29 2017 +0200
core: mem/qm - fixed pointer expressions in qm_check() debug function
(cherry picked from commit 126e76dc035bd1320cb103c39ad52849844e7448)
(cherry picked from commit 302cc81697d7b7a7b187cfb8c87a486d4c49621d)
commit e7c770f0fea4a9a12bae52604f5ebf1ba404e314
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Tue Jul 4 08:39:39 2017 +0200
core: cfg.y - fixed condition on case parsing
(cherry picked from commit 52f728f73914ab960389ff8afbf1a223f91f07e2)
(cherry picked from commit 2590955b6176acef2633b65dbcc59469f2358d3a)
commit 0d2490d7fd92b460603a930ee6bf2170e478be2d
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Mon Jul 3 14:58:59 2017 +0200
core: parse rr - reset head in case of parse error
- avoid acessing an invalid pointer
- proper support if trying to parse into an existing rr list in a second
attempt (not the case so far)
(cherry picked from commit 8eb84f76a6d52598bb2fd5d13b96fba4c6326b7f)
(cherry picked from commit 2ff8e36250864e6a391bd9d0ebb28a8fafdc9f6b)
commit c9fc252d4b64fbb211d6b5ef96fca36153be3a74
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Mon Jul 3 14:42:03 2017 +0200
core: avoid accessing freed structure in case of duplicated listen addresses
(cherry picked from commit dbd52dacae17eca5a48359c605a2d93607b7c041)
(cherry picked from commit e070571cf59a43b615690a3ec2fd9194d20e1e1d)
commit 4b4dc3c6793b4d2c164d935c1898d37fc1496285
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Mon Jul 3 10:01:20 2017 +0200
rr: use macro to get parsed From in record_route_preset()
- safety check for parsed pointer
(cherry picked from commit 8b0a42ab64c02a1fa253ce156442bab64a4fe3db)
(cherry picked from commit 3ba4cc6c039056c8cebd21911709ffa79266d364)
commit c9700a3833ed48ced0fdd53105693b355066cebf
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Sun Jul 2 12:22:33 2017 +0200
core: dns cachec- safety check in log message before abort
(cherry picked from commit ff2e0d96a50eadf4e872865d43f0fbe15aef18bd)
(cherry picked from commit e92b6ecc52cc6a64856c929043504c2876724901)
commit 814e3a5f46f44735cadde674beac7b0ccb4d1c1e
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Fri Jun 30 13:36:26 2017 +0200
websocket: use sizeof over the type of the pointer to be allocated
(cherry picked from commit 145d10f5a2dcad3cbdb477aaabdc853bb606b355)
(cherry picked from commit efee46251f7da2007a4e6e563a6d4e4020f8449e)
commit be85408733333f20792de7f1144f987cf9f5b666
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Sat Feb 10 22:05:42 2018 +0100
tmx: allocate space to store ending 0 for branch value
- reported by Alfred Farrugia and Sandro Gauci
(cherry picked from commit e1d8008a09d9390ebaf698abe8909e10dfec4097)
(cherry picked from commit 7d783adc7de603972966f50106471c06a6be2fac)
commit b19c70e5edabe5a78bdc2ef52106d609716ed5cb
Author: Victor Seva <linuxmaniac@torreviejawireless.org>
Date: Fri Dec 22 09:44:57 2017 +0100
pkg/kamailio/deb: remove http_async_client from squeeze
commit 522b0a76e3ea84e46c94a61df8e709f543c0f8f5
Author: Bastian Triller <bastian.triller@gmail.com>
Date: Thu Dec 21 16:39:23 2017 +0100
pkg/kamailio/deb: fix module name in description [skip ci]
fix janssonrpc-c module name in description of package kamailio-extra-modules
commit 6f070af9598c26374ea2546f06271c658daf16d1
Author: Victor Seva <linuxmaniac@torreviejawireless.org>
Date: Thu Dec 21 16:19:38 2017 +0100
pkg/kamailio/deb: fix module names in pkg description [skip ci]
fix module names in description of package kamailio-extra-modules
(cherry picked from commit 655db30d904275cf60c625323b38f2982746679e)
commit 7097704019e74ea61c172e56a2014b7643996930
Author: Victor Seva <linuxmaniac@torreviejawireless.org>
Date: Tue Jul 5 19:18:54 2016 +0200
pkg/kamailio/deb: add http_async to kamailio-extra-modules
(cherry picked from commit 72daa184111009a948634c660b5c53eff0826562)
commit 212b33ea0a7c1494cfdca7c06d8425376914cbe9
Author: Victor Seva <linuxmaniac@torreviejawireless.org>
Date: Mon Nov 13 15:24:44 2017 +0100
pkg/kamailio/deb: kamailio-nth add less as default [skip ci]
* most is not available on all distributions
(cherry picked from commit c4e5d9bf4438561fe8a87361b462eff38dc88d93)
(cherry picked from commit 974a7d54052f4009376d451dcdad7620206cb1ca)
commit 6ff438d29abf1dbbacc071c995456bd91ee93bf3
Author: Victor Seva <linuxmaniac@torreviejawireless.org>
Date: Mon Nov 13 12:08:08 2017 +0100
pkg/kamailio/deb: add lsb-base [skip ci]
fixes lintian error:
> E: kamailio: init.d-script-needs-depends-on-lsb-base etc/init.d/kamailio
(cherry picked from commit 574ad1fc96fa207a5a30fba66977d27e50ea1da1)
(cherry picked from commit 253e7884b67349c5042ff721161d974adc8e9bc4)
commit fb66e911b17f5c4e378c4c8c2dd9a776d7d259b4
Author: Victor Seva <linuxmaniac@torreviejawireless.org>
Date: Mon Nov 13 13:59:05 2017 +0100
pkg/kamailio/deb: remove lintian errors for old distributions [skip ci]
* we are using a newer version of lintian, so new errors are detected
(cherry picked from commit a56d67d3b7e0d4f5014f91b6b413c5861afc3560)
commit 50414379518b38b1b7210d19f7d8ad1e7ba65d4c
Author: Victor Seva <linuxmaniac@torreviejawireless.org>
Date: Fri Nov 24 09:54:58 2017 +0100
pkg/kamailio/deb: wrap-and-sort -sat [skip ci]
commit 3037665c0794c5e00f074a7e389793a29ba9b960
Author: Phil Lavin <phil.lavin@cloudcall.com>
Date: Thu Nov 23 11:46:58 2017 +0000
rtpengine: fixed segfault when using read_sdp_pv
- Obtain body pointer fresh from the SIP message as when using read_sdp_pv
the body pointer is overwritten
commit 7a3f89954ef1d2daf49fb9a7b7e080c2edecc174
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Thu Nov 2 08:52:16 2017 +0100
regex: free unused tmp pkg memory for reloaded patterns
- use memset instead of for loop to init allocated memory to 0
- partial backport of 5f8dc56f3cb47d1e804fbc3d7f5321ce979d61d9
commit 471f8843cf3fa65e5215c284337e1206e1e96c9e
Author: Victor Seva <linuxmaniac@torreviejawireless.org>
Date: Thu Oct 19 10:40:45 2017 +0200
pkg/kamailio/deb: fix kamailio-berkeley-modules dependence
commit 3794ecf832925e71dd6834c711388801aa60c274
Merge: 551a0d0f3 0367cdcd0
Author: Alexandr Dubovikov <alexandr.dubovikov@gmail.com>
Date: Fri Oct 13 20:10:17 2017 +0200
Merge pull request #1272 from btriller/fix-hep3-capture-id-backport-4.4
sipcapture: fix HEP3 capture-id >= 2^16
commit 0367cdcd094566657cc8ec1b22790d1f927993cd
Author: Bastian Triller <btriller@broadsoft.com>
Date: Sun Apr 16 13:36:44 2017 +0200
sipcapture: fix HEP3 capture-id >= 2^16
(cherry picked from commit dbd57c3eac30e1de54d98eb2ba8f608a17f7adbf)
commit 551a0d0f301bfc9e9ae92614511d073b13954701
Author: Victor Seva <linuxmaniac@torreviejawireless.org>
Date: Thu Oct 5 13:17:18 2017 +0200
core: add safety check to rval_get_tmp_str()
See #1263
(cherry picked from commit c6e921e45f1257913848110189eab82a34aa2f8b)
commit 75f13d032b44fd520216101d38a4845f9d27b12e
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Thu Aug 31 12:38:20 2017 +0200
db_text: fix computing absolute path to db using cfg dir
- reported by GH #1224
(cherry picked from commit f74cddd78df3f37f6ea827fc1787796c601572b3)
(cherry picked from commit 630bf041fd0530368c73a6329c894a8758484ed7)
commit 40b2b43e5919f05ef07f15a5f6802d83a2d1ddb6
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Thu Aug 31 11:31:33 2017 +0200
db_text: more details in log message when nr of columns is too small
(cherry picked from commit 2683b20d7b62f60ce53ed6692a42ed6b19fee972)
(cherry picked from commit 4e9921d78032a850ca07bd604aa388f73bc3256a)
commit 897942d47e404a17d235c7dcb6237f024b99e3eb
Author: Kamailio Dev <kamailio.dev@kamailio.org>
Date: Wed Aug 30 13:16:09 2017 +0200
modules: readme files regenerated - topoh ... [skip ci]
commit 4b2c51a527cb5e7810694ef64754608e8aca68a3
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Sun Jun 25 10:00:01 2017 +0200
topoh: documented uri_prefix_checks parameter
(cherry picked from commit ca3f2fc6dd2c94410b225d2efb82081b828ddd01)
(cherry picked from commit 826b3cab606fb51c7139fe81463aeb2409f40b67)
commit 01da6686c00aefb930067bfcb8310cf869278527
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Sun Jun 25 09:48:26 2017 +0200
topoh: option to disable uri prefix checks
- some devices do not copy the exact URI as received in headers
(Contact, Record-Route) - they can add default port or mix parameters
- reported by GH #1165
(cherry picked from commit de3386e4a303adecc3eee809c05e0654b7a05065)
(cherry picked from commit a9d6ffa5f39e048642bf14129b9b484250cce3ae)
commit 78684f2bba3d408e60eb8450bf915ebe92c8f8d1
Author: codyherzog <cherzog@intouchhealth.com>
Date: Thu Apr 27 14:04:35 2017 -0700
core: Don't terminate on harmless SIGCHLD.
If it appears that no child process has stopped, then do not terminate
on SIGCHLD. Certain modules like app_python can run external scripts
which cause child processes to be started and stopped. That can result
in SIGCHLD being received even though there is no real problem.
Therefore, we do not terminate Kamailio unless we can find the child
process which has stopped.
(cherry picked from commit 1c5e166001306a1a9d9d8412f0a54910093109cb)
(cherry picked from commit f508665fdbfe63cd03989dca067e6c725c8344d0)
commit c5657b7386f8be722e3d87c70b9e049d2b843c0d
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Wed Aug 2 09:54:18 2017 +0200
tls: explicit libssl v1.1+ cleanup when module is destroyed
- OPENSSL_cleanup() explicitely executed for libssl v1.1+ when tls
module is destroyed, to avoid being executed again on final exit
(due to atexit() callback), because at that moment shared memory
is already destroyed and attempts to access the locals will result
in cored dump
- retported by Victor Seva, GH #1189
(cherry picked from commit 00eb71da83347c9d2ea74feacec9c955f7b2a2e6)
(cherry picked from commit 071b85f66cabaa3a705a014b26b7c1eb31029b26)
commit 910f3c6da1cf0a3b154357a549a5f687cf4ba6ee
Author: Sergey Safarov <s.safarov@gmail.com>
Date: Sat Apr 22 11:11:27 2017 -0400
pkg/kamailio: Fixed systemd unit failure on server boot
commit d447aca24fef404f0ad5449542c3da615498cb2c
Author: Sergey Safarov <s.safarov@gmail.com>
Date: Sat Apr 22 10:47:27 2017 -0400
pkg/kamailio: Added systemd unit relanch after non null exit code. Fix of ticket 1085
commit 4d49b33b6f2418329b4ede1e166239bb0d93af9e
Author: Federico Cabiddu <federico.cabiddu@gmail.com>
Date: Mon Jul 24 15:16:21 2017 +0200
tsilo: coherent locking in ts_append
(cherry picked from commit 34265457e7c09b56dec295b753fd8250ef8b0c41)
commit 1765576b013524e73131b9adb4d4ccb78de43658
Author: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Thu Jul 20 20:34:57 2017 +0200
tsilo: check return code for parse_uri()
(cherry picked from commit a19a06f6c302a7fbac9b137cc1558d47730ead2f)
===================== 2017-06-16 Version 4.4.6 Released ===================== ===================== 2017-06-16 Version 4.4.6 Released =====================
===================== Changes Since Version 4.4.5 =========================== ===================== Changes Since Version 4.4.5 ===========================

@ -101,7 +101,7 @@ INSTALL_FLAVOUR=$(FLAVOUR)
# version number # version number
VERSION = 4 VERSION = 4
PATCHLEVEL = 4 PATCHLEVEL = 4
SUBLEVEL = 6 SUBLEVEL = 7
# memory manager switcher # memory manager switcher
# 0 - f_malloc (fast malloc) # 0 - f_malloc (fast malloc)

@ -44,7 +44,7 @@
#define HAVE_ASM_INLINE_MEMBAR #define HAVE_ASM_INLINE_MEMBAR
#warning alpha atomic code was not tested, please report problems to \ #warning alpha atomic code was not tested, please report problems to \
serdev@iptel.org or andrei@iptel.org sr-dev@lists.kamailio.org
#ifdef NOSMP #ifdef NOSMP
#define membar() asm volatile ("" : : : "memory") /* gcc do not cache barrier*/ #define membar() asm volatile ("" : : : "memory") /* gcc do not cache barrier*/

@ -49,7 +49,7 @@
#ifdef __CPU_mips64 #ifdef __CPU_mips64
#warning mips64 atomic code was not tested, please report problems to \ #warning mips64 atomic code was not tested, please report problems to \
serdev@iptel.org or andrei@iptel.org sr-dev@lists.kamailio.org
#endif #endif
#ifdef NOSMP #ifdef NOSMP

@ -52,7 +52,7 @@
#ifdef __CPU_ppc64 #ifdef __CPU_ppc64
#warning powerpc64 atomic code was not tested, please report problems to \ #warning powerpc64 atomic code was not tested, please report problems to \
serdev@iptel.org or andrei@iptel.org sr-dev@lists.kamailio.org
#endif #endif

@ -2,6 +2,6 @@
* DO NOT EDIT IT * DO NOT EDIT IT
*/ */
#define REPO_VER "becbde" #define REPO_VER "35d8ab"
#define REPO_HASH "becbde" #define REPO_HASH "35d8ab"
#define REPO_STATE "" #define REPO_STATE ""

@ -2334,7 +2334,7 @@ single_case:
} }
} }
| DEFAULT COLON actions { | DEFAULT COLON actions {
if ((($$=mk_case_stm(0, 0, $3, &i_tmp))==0) && (i_tmp=-10)){ if ((($$=mk_case_stm(0, 0, $3, &i_tmp))==0) && (i_tmp==-10)){
YYABORT; YYABORT;
} }
} }

@ -935,7 +935,7 @@ static void core_sockets_list(rpc_t* rpc, void* c)
rpc->struct_add(ha, "ss", rpc->struct_add(ha, "ss",
"proto", get_proto_name(proto), "proto", get_proto_name(proto),
"address", si->name.s); "address", si->name.s);
if (!si->flags & SI_IS_IP) if (!(si->flags & SI_IS_IP))
rpc->struct_add(ha, "s", rpc->struct_add(ha, "s",
"ipaddress", si->address_str.s); "ipaddress", si->address_str.s);
rpc->struct_add(ha, "sss", rpc->struct_add(ha, "sss",

@ -384,7 +384,7 @@ int daemonize(char* name, int status_wait)
}else{ }else{
fprintf(pid_stream, "%i\n", (int)pid); fprintf(pid_stream, "%i\n", (int)pid);
fclose(pid_stream); fclose(pid_stream);
if(chown(pid_file, pid_uid, pid_gid)<0) { if(chown(pgid_file, pid_uid, pid_gid)<0) {
LM_ERR("failed to chwon PGID file: %s\n", strerror(errno)); LM_ERR("failed to chwon PGID file: %s\n", strerror(errno));
goto error; goto error;
} }

@ -456,8 +456,10 @@ int init_dns_cache_stats(int iproc_num)
LM_CRIT("%s: crt(%p, %p, %p)," \ LM_CRIT("%s: crt(%p, %p, %p)," \
" prev(%p, %p, %p), next(%p, %p, %p)\n", txt, \ " prev(%p, %p, %p), next(%p, %p, %p)\n", txt, \
(l), (l)->next, (l)->prev, \ (l), (l)->next, (l)->prev, \
(l)->prev, (l)->prev->next, (l)->prev->prev, \ (l)->prev, ((l)->prev)?(l)->prev->next:NULL, \
(l)->next, (l)->next->next, (l)->next->prev \ ((l)->prev)?(l)->prev->prev:NULL, \
(l)->next, ((l)->next)?(l)->next->next:NULL, \
((l)->next)?(l)->next->prev:NULL \
) )
#define debug_lu_lst( txt, l) \ #define debug_lu_lst( txt, l) \
@ -3221,12 +3223,16 @@ inline static int dns_srv_sip_resolve(struct dns_srv_handle* h, str* name,
return -E_DNS_NO_SRV; return -E_DNS_NO_SRV;
} }
if ((h->srv==0) && (h->a==0)){ /* first call */ if ((h->srv==0) && (h->a==0)){ /* first call */
if (proto && *proto==0){ /* makes sure we have a protocol set*/ if (proto) {
*proto=PROTO_UDP; /* default */ if(*proto==0) { /* makes sure we have a protocol set*/
} *proto=PROTO_UDP; /* default */
h->port=(*proto==PROTO_TLS)?SIPS_PORT:SIP_PORT; /* just in case we }
h->port=(*proto==PROTO_TLS)?SIPS_PORT:SIP_PORT; /* just in case we
don't find another */ don't find another */
h->proto=*proto; /* store initial protocol */ h->proto=*proto; /* store initial protocol */
} else {
h->proto=PROTO_UDP; /* default */
}
if (port){ if (port){
if (*port==0){ if (*port==0){
/* try SRV if initial call & no port specified /* try SRV if initial call & no port specified
@ -3268,7 +3274,8 @@ inline static int dns_srv_sip_resolve(struct dns_srv_handle* h, str* name,
srv_name.len=strlen(tmp); srv_name.len=strlen(tmp);
if ((ret=dns_srv_resolve_ip(h, &srv_name, ip, port, flags))>=0) if ((ret=dns_srv_resolve_ip(h, &srv_name, ip, port, flags))>=0)
{ {
h->proto = *proto = srv_proto_list[i].proto; h->proto = srv_proto_list[i].proto;
if(proto) *proto = h->proto;
#ifdef DNS_CACHE_DEBUG #ifdef DNS_CACHE_DEBUG
LM_DBG("(%.*s, %d, %d), srv0, ret=%d\n", LM_DBG("(%.*s, %d, %d), srv0, ret=%d\n",
name->len, name->s, h->srv_no, h->ip_no, ret); name->len, name->s, h->srv_no, h->ip_no, ret);

@ -1,301 +1,301 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:simpleType name="tPriority" final="list restriction"> <xs:simpleType name="tPriority" final="list restriction">
<xs:restriction base="xs:int"> <xs:restriction base="xs:int">
<xs:minInclusive value="0"/> <xs:minInclusive value="0"/>
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
<xs:simpleType name="tProfilePartIndicator" final="list restriction"> <xs:simpleType name="tProfilePartIndicator" final="list restriction">
<xs:restriction base="xs:unsignedByte"> <xs:restriction base="xs:unsignedByte">
<xs:maxInclusive value="1"/> <xs:maxInclusive value="1"/>
<xs:enumeration value="0"> <xs:enumeration value="0">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
<label xml:lang="en">REGISTERED</label> <label xml:lang="en">REGISTERED</label>
<definition xml:lang="en">iFC is part of the registered profile</definition> <definition xml:lang="en">iFC is part of the registered profile</definition>
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:enumeration> </xs:enumeration>
<xs:enumeration value="1"> <xs:enumeration value="1">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
<label xml:lang="en">UNREGISTERED</label> <label xml:lang="en">UNREGISTERED</label>
<definition xml:lang="en">iFC is part of the unregistered profile</definition> <definition xml:lang="en">iFC is part of the unregistered profile</definition>
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:enumeration> </xs:enumeration>
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
<xs:simpleType name="tSharedIFCSetID" final="list restriction"> <xs:simpleType name="tSharedIFCSetID" final="list restriction">
<xs:restriction base="xs:int"> <xs:restriction base="xs:int">
<xs:minInclusive value="0"/> <xs:minInclusive value="0"/>
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
<xs:simpleType name="tGroupID" final="list restriction"> <xs:simpleType name="tGroupID" final="list restriction">
<xs:restriction base="xs:int"> <xs:restriction base="xs:int">
<xs:minInclusive value="0"/> <xs:minInclusive value="0"/>
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
<xs:simpleType name="tRegistrationType" final="list restriction"> <xs:simpleType name="tRegistrationType" final="list restriction">
<xs:restriction base="xs:unsignedByte"> <xs:restriction base="xs:unsignedByte">
<xs:maxInclusive value="2"/> <xs:maxInclusive value="2"/>
<xs:enumeration value="0"> <xs:enumeration value="0">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
<label xml:lang="en">INITIAL_REGISTRATION</label> <label xml:lang="en">INITIAL_REGISTRATION</label>
<definition xml:lang="en">Matches to REGISTER messages that are related to initial registration</definition> <definition xml:lang="en">Matches to REGISTER messages that are related to initial registration</definition>
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:enumeration> </xs:enumeration>
<xs:enumeration value="1"> <xs:enumeration value="1">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
<label xml:lang="en">RE-REGISTRATION</label> <label xml:lang="en">RE-REGISTRATION</label>
<definition xml:lang="en">Matches to REGISTER messages that are related to re-registration</definition> <definition xml:lang="en">Matches to REGISTER messages that are related to re-registration</definition>
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:enumeration> </xs:enumeration>
<xs:enumeration value="2"> <xs:enumeration value="2">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
<label xml:lang="en">DE-REGISTRATION</label> <label xml:lang="en">DE-REGISTRATION</label>
<definition xml:lang="en">Matches to REGISTER messages that are related to de-registration</definition> <definition xml:lang="en">Matches to REGISTER messages that are related to de-registration</definition>
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:enumeration> </xs:enumeration>
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
<xs:simpleType name="tDefaultHandling" final="list restriction"> <xs:simpleType name="tDefaultHandling" final="list restriction">
<xs:restriction base="xs:unsignedByte"> <xs:restriction base="xs:unsignedByte">
<xs:maxInclusive value="1"/> <xs:maxInclusive value="1"/>
<xs:enumeration value="0"> <xs:enumeration value="0">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
<label xml:lang="en">SESSION_CONTINUED</label> <label xml:lang="en">SESSION_CONTINUED</label>
<definition xml:lang="en">Session Continued</definition> <definition xml:lang="en">Session Continued</definition>
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:enumeration> </xs:enumeration>
<xs:enumeration value="1"> <xs:enumeration value="1">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
<label xml:lang="en">SESSION_TERMINATED</label> <label xml:lang="en">SESSION_TERMINATED</label>
<definition xml:lang="en">Session Terminated</definition> <definition xml:lang="en">Session Terminated</definition>
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:enumeration> </xs:enumeration>
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
<xs:simpleType name="tDirectionOfRequest" final="list restriction"> <xs:simpleType name="tDirectionOfRequest" final="list restriction">
<xs:restriction base="xs:unsignedByte"> <xs:restriction base="xs:unsignedByte">
<xs:maxInclusive value="3"/> <xs:maxInclusive value="3"/>
<xs:enumeration value="0"> <xs:enumeration value="0">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
<label xml:lang="en">ORIGINATING_SESSION</label> <label xml:lang="en">ORIGINATING_SESSION</label>
<definition xml:lang="en">Originating Session</definition> <definition xml:lang="en">Originating Session</definition>
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:enumeration> </xs:enumeration>
<xs:enumeration value="1"> <xs:enumeration value="1">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
<label xml:lang="en">TERMINATING_REGISTERED</label> <label xml:lang="en">TERMINATING_REGISTERED</label>
<definition xml:lang="en">Terminating Session for registered user</definition> <definition xml:lang="en">Terminating Session for registered user</definition>
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:enumeration> </xs:enumeration>
<xs:enumeration value="2"> <xs:enumeration value="2">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
<label xml:lang="en">TERMINATING_UNREGISTERED</label> <label xml:lang="en">TERMINATING_UNREGISTERED</label>
<definition xml:lang="en">Terminating Session for unregistered user</definition> <definition xml:lang="en">Terminating Session for unregistered user</definition>
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:enumeration> </xs:enumeration>
<xs:enumeration value="3"> <xs:enumeration value="3">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
<label xml:lang="en">ORIGINATING_UNREGISTERED</label> <label xml:lang="en">ORIGINATING_UNREGISTERED</label>
<definition xml:lang="en">Originating Session for an unregistered user</definition> <definition xml:lang="en">Originating Session for an unregistered user</definition>
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:enumeration> </xs:enumeration>
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
<xs:simpleType name="tPrivateID" final="list restriction"> <xs:simpleType name="tPrivateID" final="list restriction">
<xs:restriction base="xs:anyURI"/> <xs:restriction base="xs:anyURI"/>
</xs:simpleType> </xs:simpleType>
<xs:simpleType name="tSIP_URL" final="list restriction"> <xs:simpleType name="tSIP_URL" final="list restriction">
<xs:restriction base="xs:anyURI"/> <xs:restriction base="xs:anyURI"/>
</xs:simpleType> </xs:simpleType>
<xs:simpleType name="tTEL_URL" final="list restriction"> <xs:simpleType name="tTEL_URL" final="list restriction">
<xs:restriction base="xs:anyURI"/> <xs:restriction base="xs:anyURI"/>
</xs:simpleType> </xs:simpleType>
<xs:simpleType name="tIdentity" final="list restriction"> <xs:simpleType name="tIdentity" final="list restriction">
<xs:union memberTypes="tSIP_URL tTEL_URL"/> <xs:union memberTypes="tSIP_URL tTEL_URL"/>
</xs:simpleType> </xs:simpleType>
<xs:simpleType name="tIdentityType" final="list restriction"> <xs:simpleType name="tIdentityType" final="list restriction">
<xs:restriction base="xs:unsignedByte"> <xs:restriction base="xs:unsignedByte">
<xs:minInclusive value="0"/> <xs:minInclusive value="0"/>
<xs:maxInclusive value="2"/> <xs:maxInclusive value="2"/>
<xs:enumeration value="0"> <xs:enumeration value="0">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
<label xml:lang="en">PUBLIC_USER_IDENTITY</label> <label xml:lang="en">PUBLIC_USER_IDENTITY</label>
<definition xml:lang="en">Identity is a Public User Identity.</definition> <definition xml:lang="en">Identity is a Public User Identity.</definition>
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:enumeration> </xs:enumeration>
<xs:enumeration value="1"> <xs:enumeration value="1">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
<label xml:lang="en">DISTINCT_PSI</label> <label xml:lang="en">DISTINCT_PSI</label>
<definition xml:lang="en">Identity is a distinct Public Service Identity.</definition> <definition xml:lang="en">Identity is a distinct Public Service Identity.</definition>
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:enumeration> </xs:enumeration>
<xs:enumeration value="2"> <xs:enumeration value="2">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
<label xml:lang="en">WILDCARDED_PSI</label> <label xml:lang="en">WILDCARDED_PSI</label>
<definition xml:lang="en">Identity matches a wildcarded Public Service Identity.</definition> <definition xml:lang="en">Identity matches a wildcarded Public Service Identity.</definition>
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:enumeration> </xs:enumeration>
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
<xs:complexType name="tPublicIdentityExtension"> <xs:complexType name="tPublicIdentityExtension">
<xs:sequence> <xs:sequence>
<xs:element name="IdentityType" type="tIdentityType" minOccurs="0"/> <xs:element name="IdentityType" type="tIdentityType" minOccurs="0"/>
<xs:element name="WildcardedPSI" type="xs:anyURI" minOccurs="0"/> <xs:element name="WildcardedPSI" type="xs:anyURI" minOccurs="0"/>
<xs:element name="Extension" type="tExtension" minOccurs="0"/> <xs:element name="Extension" type="tExtension" minOccurs="0"/>
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
<xs:simpleType name="tServiceInfo" final="list restriction"> <xs:simpleType name="tServiceInfo" final="list restriction">
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:minLength value="0"/> <xs:minLength value="0"/>
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
<xs:simpleType name="tString" final="list restriction"> <xs:simpleType name="tString" final="list restriction">
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:minLength value="0"/> <xs:minLength value="0"/>
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
<xs:simpleType name="tBool"> <xs:simpleType name="tBool">
<xs:restriction base="xs:boolean"/> <xs:restriction base="xs:boolean"/>
</xs:simpleType> </xs:simpleType>
<xs:simpleType name="tSubscribedMediaProfileId" final="list restriction"> <xs:simpleType name="tSubscribedMediaProfileId" final="list restriction">
<xs:restriction base="xs:int"> <xs:restriction base="xs:int">
<xs:minInclusive value="0"/> <xs:minInclusive value="0"/>
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
<xs:complexType name="tExtension"> <xs:complexType name="tExtension">
<xs:sequence> <xs:sequence>
<xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded"/> <xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
<xs:complexType name="tServiceProfileExtension"> <xs:complexType name="tServiceProfileExtension">
<xs:sequence> <xs:sequence>
<xs:element name="SharedIFCSetID" type="tSharedIFCSetID" minOccurs="0" maxOccurs="unbounded"/> <xs:element name="SharedIFCSetID" type="tSharedIFCSetID" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="Extension" type="tExtension" minOccurs="0"/> <xs:element name="Extension" type="tExtension" minOccurs="0"/>
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
<xs:complexType name="tSePoTriExtension"> <xs:complexType name="tSePoTriExtension">
<xs:sequence> <xs:sequence>
<xs:element name="RegistrationType" type="tRegistrationType" minOccurs="0" maxOccurs="2"/> <xs:element name="RegistrationType" type="tRegistrationType" minOccurs="0" maxOccurs="2"/>
<xs:element name="Extension" type="tExtension" minOccurs="0"/> <xs:element name="Extension" type="tExtension" minOccurs="0"/>
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
<xs:complexType name="tIMSSubscription"> <xs:complexType name="tIMSSubscription">
<xs:sequence> <xs:sequence>
<xs:element name="PrivateID" type="tPrivateID"/> <xs:element name="PrivateID" type="tPrivateID"/>
<xs:element name="ServiceProfile" type="tServiceProfile" maxOccurs="unbounded"/> <xs:element name="ServiceProfile" type="tServiceProfile" maxOccurs="unbounded"/>
<xs:element name="Extension" type="tExtension" minOccurs="0"/> <xs:element name="Extension" type="tExtension" minOccurs="0"/>
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
<xs:complexType name="tServiceProfile"> <xs:complexType name="tServiceProfile">
<xs:sequence> <xs:sequence>
<xs:element name="PublicIdentity" type="tPublicIdentity" maxOccurs="unbounded"/> <xs:element name="PublicIdentity" type="tPublicIdentity" maxOccurs="unbounded"/>
<xs:element name="CoreNetworkServicesAuthorization" type="tCoreNetworkServicesAuthorization" minOccurs="0"/> <xs:element name="CoreNetworkServicesAuthorization" type="tCoreNetworkServicesAuthorization" minOccurs="0"/>
<xs:element name="InitialFilterCriteria" type="tInitialFilterCriteria" minOccurs="0" maxOccurs="unbounded"/> <xs:element name="InitialFilterCriteria" type="tInitialFilterCriteria" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="Extension" type="tServiceProfileExtension" minOccurs="0"/> <xs:element name="Extension" type="tServiceProfileExtension" minOccurs="0"/>
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
<xs:complexType name="tCoreNetworkServicesAuthorization"> <xs:complexType name="tCoreNetworkServicesAuthorization">
<xs:sequence> <xs:sequence>
<xs:element name="SubscribedMediaProfileId" type="tSubscribedMediaProfileId" minOccurs="0"/> <xs:element name="SubscribedMediaProfileId" type="tSubscribedMediaProfileId" minOccurs="0"/>
<xs:element name="Extension" type="tExtension" minOccurs="0"/> <xs:element name="Extension" type="tExtension" minOccurs="0"/>
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
<xs:complexType name="tInitialFilterCriteria"> <xs:complexType name="tInitialFilterCriteria">
<xs:sequence> <xs:sequence>
<xs:element name="Priority" type="tPriority"/> <xs:element name="Priority" type="tPriority"/>
<xs:element name="TriggerPoint" type="tTrigger" minOccurs="0"/> <xs:element name="TriggerPoint" type="tTrigger" minOccurs="0"/>
<xs:element name="ApplicationServer" type="tApplicationServer"/> <xs:element name="ApplicationServer" type="tApplicationServer"/>
<xs:element name="ProfilePartIndicator" type="tProfilePartIndicator" minOccurs="0"/> <xs:element name="ProfilePartIndicator" type="tProfilePartIndicator" minOccurs="0"/>
<xs:element name="Extension" type="tExtension" minOccurs="0"/> <xs:element name="Extension" type="tExtension" minOccurs="0"/>
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
<xs:complexType name="tTrigger"> <xs:complexType name="tTrigger">
<xs:sequence> <xs:sequence>
<xs:element name="ConditionTypeCNF" type="tBool"/> <xs:element name="ConditionTypeCNF" type="tBool"/>
<xs:element name="SPT" type="tSePoTri" maxOccurs="unbounded"/> <xs:element name="SPT" type="tSePoTri" maxOccurs="unbounded"/>
<xs:element name="Extension" type="tExtension" minOccurs="0"/> <xs:element name="Extension" type="tExtension" minOccurs="0"/>
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
<xs:complexType name="tSePoTri"> <xs:complexType name="tSePoTri">
<xs:sequence> <xs:sequence>
<xs:element name="ConditionNegated" type="tBool" default="0" minOccurs="0"/> <xs:element name="ConditionNegated" type="tBool" default="0" minOccurs="0"/>
<xs:element name="Group" type="tGroupID" maxOccurs="unbounded"/> <xs:element name="Group" type="tGroupID" maxOccurs="unbounded"/>
<xs:choice> <xs:choice>
<xs:element name="RequestURI" type="tString"/> <xs:element name="RequestURI" type="tString"/>
<xs:element name="Method" type="tString"/> <xs:element name="Method" type="tString"/>
<xs:element name="SIPHeader" type="tHeader"/> <xs:element name="SIPHeader" type="tHeader"/>
<xs:element name="SessionCase" type="tDirectionOfRequest"/> <xs:element name="SessionCase" type="tDirectionOfRequest"/>
<xs:element name="SessionDescription" type="tSessionDescription"/> <xs:element name="SessionDescription" type="tSessionDescription"/>
</xs:choice> </xs:choice>
<xs:element name="Extension" type="tSePoTriExtension" minOccurs="0"/> <xs:element name="Extension" type="tSePoTriExtension" minOccurs="0"/>
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
<xs:complexType name="tHeader"> <xs:complexType name="tHeader">
<xs:sequence> <xs:sequence>
<xs:element name="Header" type="tString"/> <xs:element name="Header" type="tString"/>
<xs:element name="Content" type="tString" minOccurs="0"/> <xs:element name="Content" type="tString" minOccurs="0"/>
<xs:element name="Extension" type="tExtension" minOccurs="0"/> <xs:element name="Extension" type="tExtension" minOccurs="0"/>
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
<xs:complexType name="tSessionDescription"> <xs:complexType name="tSessionDescription">
<xs:sequence> <xs:sequence>
<xs:element name="Line" type="tString"/> <xs:element name="Line" type="tString"/>
<xs:element name="Content" type="tString" minOccurs="0"/> <xs:element name="Content" type="tString" minOccurs="0"/>
<xs:element name="Extension" type="tExtension" minOccurs="0"/> <xs:element name="Extension" type="tExtension" minOccurs="0"/>
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
<xs:complexType name="tApplicationServer"> <xs:complexType name="tApplicationServer">
<xs:sequence> <xs:sequence>
<xs:element name="ServerName" type="tSIP_URL"/> <xs:element name="ServerName" type="tSIP_URL"/>
<xs:element name="DefaultHandling" type="tDefaultHandling" minOccurs="0"/> <xs:element name="DefaultHandling" type="tDefaultHandling" minOccurs="0"/>
<xs:element name="ServiceInfo" type="tServiceInfo" minOccurs="0"/> <xs:element name="ServiceInfo" type="tServiceInfo" minOccurs="0"/>
<xs:element name="Extension" type="tExtension" minOccurs="0"/> <xs:element name="Extension" type="tExtension" minOccurs="0"/>
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
<xs:complexType name="tPublicIdentity"> <xs:complexType name="tPublicIdentity">
<xs:sequence> <xs:sequence>
<xs:element name="BarringIndication" type="tBool" default="0" minOccurs="0"/> <xs:element name="BarringIndication" type="tBool" default="0" minOccurs="0"/>
<xs:element name="Identity" type="tIdentity"/> <xs:element name="Identity" type="tIdentity"/>
<xs:element name="Extension" type="tPublicIdentityExtension" minOccurs="0"/> <xs:element name="Extension" type="tPublicIdentityExtension" minOccurs="0"/>
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
<xs:element name="IMSSubscription" type="tIMSSubscription"/> <xs:element name="IMSSubscription" type="tIMSSubscription"/>
</xs:schema> </xs:schema>

@ -148,8 +148,8 @@ typedef struct sr_net_info {
#define SND_F_FORCE_SOCKET 4 /* send socket in dst is forced */ #define SND_F_FORCE_SOCKET 4 /* send socket in dst is forced */
struct snd_flags { struct snd_flags {
unsigned char f; /* snd flags */ unsigned short f; /* snd flags */
unsigned char blst_imask; /* blacklist ignore mask */ unsigned short blst_imask; /* blacklist ignore mask */
}; };

@ -374,7 +374,8 @@ int db_table_version(const db_func_t* dbf, db1_con_t* connection, const str* tab
str *version = &version_table; str *version = &version_table;
str tmp1 = str_init(TABLENAME_COLUMN); str tmp1 = str_init(TABLENAME_COLUMN);
str tmp2 = str_init(VERSION_COLUMN); str tmp2 = str_init(VERSION_COLUMN);
int ret; int ret = 0;
int val_type;
if (!dbf||!connection || !table || !table->s) { if (!dbf||!connection || !table || !table->s) {
LM_CRIT("invalid parameter value\n"); LM_CRIT("invalid parameter value\n");
@ -412,7 +413,9 @@ int db_table_version(const db_func_t* dbf, db1_con_t* connection, const str* tab
} }
ver = ROW_VALUES(RES_ROWS(res)); ver = ROW_VALUES(RES_ROWS(res));
if ( VAL_TYPE(ver)!=DB1_INT || VAL_NULL(ver) ) { val_type = VAL_TYPE(ver);
if ( (val_type!=DB1_INT && val_type!=DB1_DOUBLE && val_type!=DB1_BIGINT)
|| VAL_NULL(ver) ) {
LM_ERR("invalid type (%d) or nul (%d) version " LM_ERR("invalid type (%d) or nul (%d) version "
"columns for %.*s\n", VAL_TYPE(ver), VAL_NULL(ver), "columns for %.*s\n", VAL_TYPE(ver), VAL_NULL(ver),
table->len, ZSW(table->s)); table->len, ZSW(table->s));
@ -420,8 +423,16 @@ int db_table_version(const db_func_t* dbf, db1_con_t* connection, const str* tab
return -1; return -1;
} }
ret = VAL_INT(ver); if (val_type == DB1_INT) {
ret = VAL_INT(ver);
} else if (val_type == DB1_BIGINT) {
ret = (int)VAL_BIGINT(ver);
} else if (val_type == DB1_DOUBLE) {
ret = (int)VAL_DOUBLE(ver);
}
dbf->free_result(connection, res); dbf->free_result(connection, res);
return ret; return ret;
} }

@ -160,7 +160,7 @@ Options:\n\
[proto:]addr_lst[:port], where proto=udp|tcp|tls|sctp, \n\ [proto:]addr_lst[:port], where proto=udp|tcp|tls|sctp, \n\
addr_lst= addr|(addr, addr_lst) and \n\ addr_lst= addr|(addr, addr_lst) and \n\
addr= host|ip_address|interface_name. \n\ addr= host|ip_address|interface_name. \n\
E.g: -l locahost, -l udp:127.0.0.1:5080, -l eth0:5062,\n\ E.g: -l localhost, -l udp:127.0.0.1:5080, -l eth0:5062,\n\
-l \"sctp:(eth0)\", -l \"(eth0, eth1, 127.0.0.1):5065\".\n\ -l \"sctp:(eth0)\", -l \"(eth0, eth1, 127.0.0.1):5065\".\n\
The default behaviour is to listen on all the interfaces.\n\ The default behaviour is to listen on all the interfaces.\n\
-n processes Number of child processes to fork per interface\n\ -n processes Number of child processes to fork per interface\n\
@ -675,6 +675,7 @@ void handle_sigs(void)
{ {
pid_t chld; pid_t chld;
int chld_status; int chld_status;
int any_chld_stopped;
int memlog; int memlog;
switch(sig_flag){ switch(sig_flag){
@ -730,7 +731,9 @@ void handle_sigs(void)
break; break;
case SIGCHLD: case SIGCHLD:
any_chld_stopped=0;
while ((chld=waitpid( -1, &chld_status, WNOHANG ))>0) { while ((chld=waitpid( -1, &chld_status, WNOHANG ))>0) {
any_chld_stopped=1;
if (WIFEXITED(chld_status)) if (WIFEXITED(chld_status))
LM_ALERT("child process %ld exited normally," LM_ALERT("child process %ld exited normally,"
" status=%d\n", (long)chld, " status=%d\n", (long)chld,
@ -747,6 +750,16 @@ void handle_sigs(void)
" signal %d\n", (long)chld, " signal %d\n", (long)chld,
WSTOPSIG(chld_status)); WSTOPSIG(chld_status));
} }
/* If it appears that no child process has stopped, then do not terminate on SIGCHLD.
Certain modules like app_python can run external scripts which cause child processes to be started and
stopped. That can result in SIGCHLD being received here even though there is no real problem. Therefore,
we do not terminate Kamailio unless we can find the child process which has stopped. */
if (!any_chld_stopped) {
LM_INFO("SIGCHLD received, but no child has stopped, ignoring it\n");
break;
}
#ifndef STOP_JIRIS_CHANGES #ifndef STOP_JIRIS_CHANGES
if (dont_fork) { if (dont_fork) {
LM_INFO("dont_fork turned on, living on\n"); LM_INFO("dont_fork turned on, living on\n");

@ -122,7 +122,8 @@ inline static int fm_bmp_first_set(struct fm_block* qm, int start)
return (start-bit+r); return (start-bit+r);
} }
#endif #endif
v=qm->free_bitmap[bmp_idx]>>(bit+1); if((bit+1) < 8*sizeof(v)) v=qm->free_bitmap[bmp_idx]>>(bit+1);
else v = 0;
return start+1+bit_scan_forward((unsigned long)v); return start+1+bit_scan_forward((unsigned long)v);
} }
for (r=bmp_idx+1;r<FM_HASH_BMP_SIZE; r++){ for (r=bmp_idx+1;r<FM_HASH_BMP_SIZE; r++){

@ -728,18 +728,22 @@ void qm_check(struct qm_block* qm)
abort(); abort();
}; };
#endif #endif
if (f + sizeof(struct qm_frag) + f->size + sizeof(struct qm_frag_end) > qm->first_frag + qm->size) { if ((char*)f + sizeof(struct qm_frag) + f->size
+ sizeof(struct qm_frag_end) > (char*)qm->first_frag + qm->size) {
LOG(L_CRIT, "BUG: qm_*: fragm. %p (address %p) " LOG(L_CRIT, "BUG: qm_*: fragm. %p (address %p) "
"bad size: %lu (frag end: %p > end of block: %p)\n", "bad size: %lu (frag end: %p > end of block: %p)\n",
f, (char*)f + sizeof(struct qm_frag) + sizeof(struct qm_frag_end), f->size, f, (char*)f + sizeof(struct qm_frag), f->size,
f + sizeof(struct qm_frag) + f->size, qm->first_frag + qm->size); (char*)f + sizeof(struct qm_frag) + f->size
+ sizeof(struct qm_frag_end),
(char*)qm->first_frag + qm->size);
qm_status(qm); qm_status(qm);
abort(); abort();
} }
/* check struct qm_frag_end */ /* check struct qm_frag_end */
if (FRAG_END(f)->size != f->size) { if (FRAG_END(f)->size != f->size) {
LOG(L_CRIT, "BUG: qm_*: fragm. %p (address %p) " LOG(L_CRIT, "BUG: qm_*: fragm. %p (address %p) "
"size in qm_frag and qm_frag_end does not match: frag->size=%lu, frag_end->size=%lu)\n", "size in qm_frag and qm_frag_end does not match:"
" frag->size=%lu, frag_end->size=%lu)\n",
f, (char*)f + sizeof(struct qm_frag), f, (char*)f + sizeof(struct qm_frag),
f->size, FRAG_END(f)->size); f->size, FRAG_END(f)->size);
qm_status(qm); qm_status(qm);

@ -705,7 +705,7 @@ inline static unsigned char* binrpc_read_record(struct binrpc_parse_ctx* ctx,
ctx->in_struct=0; /* hack to parse a normal record */ ctx->in_struct=0; /* hack to parse a normal record */
v->type=type; /* hack */ v->type=type; /* hack */
p=binrpc_read_record(ctx, p, end, v, smode, err); p=binrpc_read_record(ctx, p, end, v, smode, err);
if (err<0){ if (*err<0){
ctx->in_struct=tmp; ctx->in_struct=tmp;
goto error; goto error;
}else{ }else{
@ -735,6 +735,7 @@ inline static unsigned char* binrpc_read_record(struct binrpc_parse_ctx* ctx,
v->u.strval.s=(char*)p; v->u.strval.s=(char*)p;
v->u.strval.len=len; v->u.strval.len=len;
p+=len; p+=len;
break;
case BINRPC_T_ARRAY: case BINRPC_T_ARRAY:
if (ctx->in_struct && smode==0) goto error_record; if (ctx->in_struct && smode==0) goto error_record;
if (end_tag){ if (end_tag){

@ -838,11 +838,11 @@ static int rpc_scan(struct binrpc_ctx* ctx, char* fmt, ...)
/* clear the previously saved error code */ /* clear the previously saved error code */
rpc_fault_reset(ctx); rpc_fault_reset(ctx);
va_start(ap, fmt);
orig_fmt=fmt; orig_fmt=fmt;
nofault = 0; nofault = 0;
modifiers=0; modifiers=0;
autoconv=autoconvert; autoconv=autoconvert;
va_start(ap, fmt);
for (;*fmt; fmt++){ for (;*fmt; fmt++){
switch(*fmt){ switch(*fmt){
case '*': /* start of optional parameters */ case '*': /* start of optional parameters */
@ -878,7 +878,7 @@ static int rpc_scan(struct binrpc_ctx* ctx, char* fmt, ...)
v.type=autoconv?BINRPC_T_ALL:BINRPC_T_STR; v.type=autoconv?BINRPC_T_ALL:BINRPC_T_STR;
ctx->in.s=binrpc_read_record(&ctx->in.ctx, ctx->in.s, ctx->in.s=binrpc_read_record(&ctx->in.ctx, ctx->in.s,
ctx->in.end, &v, 0, &err); ctx->in.end, &v, 0, &err);
if (err<0 || ((s=binrpc_val_conv_str(ctx, &v, &err))==0 && if (err<0 || ((s=binrpc_val_conv_str(ctx, &v, &err))==0 ||
err<0)){ err<0)){
v.u.strval.s="if you get this string, you don't" v.u.strval.s="if you get this string, you don't"
"check rpc_scan return code !!! (very bad)"; "check rpc_scan return code !!! (very bad)";
@ -915,7 +915,7 @@ static int rpc_scan(struct binrpc_ctx* ctx, char* fmt, ...)
error_read: error_read:
/* Do not immediately send out the error message, the user might retry the scan with /* Do not immediately send out the error message, the user might retry the scan with
different parameters */ different parameters */
if(nofault==0 || ((err!=E_BINRPC_MORE_DATA) && (err!=E_BINRPC_EOP))) if(nofault==0 || ((err!=E_BINRPC_MORE_DATA) && (err!=E_BINRPC_EOP))) {
rpc_fault_prepare(ctx, 400, "error at parameter %d: expected %s type but" rpc_fault_prepare(ctx, 400, "error at parameter %d: expected %s type but"
" %s", ctx->in.record_no, rpc_type_name(v.type), " %s", ctx->in.record_no, rpc_type_name(v.type),
binrpc_error(err)); binrpc_error(err));
@ -924,6 +924,11 @@ error_read:
": %s", ctx->in.record_no, ctx->in.ctx.offset, ": %s", ctx->in.record_no, ctx->in.ctx.offset,
v.type, binrpc_error(err)); v.type, binrpc_error(err));
*/ */
}
if(nofault==1 && (err==E_BINRPC_MORE_DATA || err==E_BINRPC_EOP)) {
va_end(ap);
return (int)(fmt-orig_fmt)-modifiers;
}
goto error_ret; goto error_ret;
error_not_supported: error_not_supported:
rpc_fault(ctx, 500, "internal server error, type %d not supported", rpc_fault(ctx, 500, "internal server error, type %d not supported",

@ -342,7 +342,7 @@ static int mod_child(int rank)
if (rank!=PROC_RPC || !rpc_handler){ if (rank!=PROC_RPC || !rpc_handler){
/* close all the opened fds, we don't need them here */ /* close all the opened fds, we don't need them here */
for (cs=ctrl_sock_lst; cs; cs=cs->next){ for (cs=ctrl_sock_lst; cs; cs=cs->next){
close(cs->fd); if(cs->fd>=0) close(cs->fd);
cs->fd=-1; cs->fd=-1;
if (cs->write_fd!=-1){ if (cs->write_fd!=-1){
close(cs->write_fd); close(cs->write_fd);
@ -394,7 +394,7 @@ static void mod_destroy(void)
break; break;
#endif #endif
default: default:
close(cs->fd); if(cs->fd>=0) close(cs->fd);
cs->fd=-1; cs->fd=-1;
if (cs->write_fd!=-1){ if (cs->write_fd!=-1){
close(cs->write_fd); close(cs->write_fd);

@ -226,7 +226,7 @@ int init_ctrl_sockets(struct ctrl_socket** c_lst, struct id_list* lst,
int def_port, int perm, int uid, int gid) int def_port, int perm, int uid, int gid)
{ {
struct id_list* l; struct id_list* l;
int s; int s = -1;
struct ctrl_socket* cs; struct ctrl_socket* cs;
int extra_fd; int extra_fd;
union sockaddr_u su; union sockaddr_u su;
@ -271,6 +271,7 @@ int init_ctrl_sockets(struct ctrl_socket** c_lst, struct id_list* lst,
cs->transport=l->proto; cs->transport=l->proto;
cs->p_proto=l->data_proto; cs->p_proto=l->data_proto;
cs->fd=s; cs->fd=s;
s = -1;
cs->write_fd=extra_fd; /* needed for fifo write */ cs->write_fd=extra_fd; /* needed for fifo write */
cs->name=l->name; cs->name=l->name;
cs->port=l->port; cs->port=l->port;
@ -281,6 +282,8 @@ int init_ctrl_sockets(struct ctrl_socket** c_lst, struct id_list* lst,
} }
return 0; return 0;
error: error:
if(s>=0) close(s);
if(extra_fd>=0) close(extra_fd);
return -1; return -1;
} }

@ -811,7 +811,7 @@ int init_fifo_fd(char* fifo, int fifo_mode, int fifo_uid, int fifo_gid,
struct stat filestat; struct stat filestat;
int n; int n;
long opt; long opt;
int fifo_read; int fifo_read = -1;
if (fifo == NULL) { if (fifo == NULL) {
ERR("null fifo: no fifo will be opened\n"); ERR("null fifo: no fifo will be opened\n");
@ -823,7 +823,6 @@ int init_fifo_fd(char* fifo, int fifo_mode, int fifo_uid, int fifo_gid,
return -1; return -1;
} }
DBG("Opening fifo...\n"); DBG("Opening fifo...\n");
n = stat(fifo, &filestat); n = stat(fifo, &filestat);
if (n == 0) { if (n == 0) {
@ -862,26 +861,29 @@ int init_fifo_fd(char* fifo, int fifo_mode, int fifo_uid, int fifo_gid,
fifo_read = open(fifo, O_RDONLY | O_NONBLOCK, 0); fifo_read = open(fifo, O_RDONLY | O_NONBLOCK, 0);
if (fifo_read < 0) { if (fifo_read < 0) {
ERR("fifo_read did not open: %s\n", ERR("fifo_read did not open: %s\n", strerror(errno));
strerror(errno));
return -1; return -1;
} }
/* make sure the read fifo will not close */ /* make sure the read fifo will not close */
*fifo_write = open(fifo, O_WRONLY | O_NONBLOCK, 0); *fifo_write = open(fifo, O_WRONLY | O_NONBLOCK, 0);
if (*fifo_write < 0) { if (*fifo_write < 0) {
ERR("fifo_write did not open: %s\n", ERR("fifo_write did not open: %s\n", strerror(errno));
strerror(errno)); close(fifo_read);
return -1; return -1;
} }
/* set read fifo blocking mode */ /* set read fifo blocking mode */
if ((opt = fcntl(fifo_read, F_GETFL)) == -1) { if ((opt = fcntl(fifo_read, F_GETFL)) == -1) {
ERR("fcntl(F_GETFL) failed: %s [%d]\n", ERR("fcntl(F_GETFL) failed: %s [%d]\n", strerror(errno), errno);
strerror(errno), errno); close(fifo_read);
close(*fifo_write);
*fifo_write = -1;
return -1; return -1;
} }
if (fcntl(fifo_read, F_SETFL, opt & (~O_NONBLOCK)) == -1) { if (fcntl(fifo_read, F_SETFL, opt & (~O_NONBLOCK)) == -1) {
ERR("fcntl(F_SETFL) failed: %s [%d]\n", ERR("fcntl(F_SETFL) failed: %s [%d]\n", strerror(errno), errno);
strerror(errno), errno); close(fifo_read);
close(*fifo_write);
*fifo_write = -1;
return -1; return -1;
} }
return fifo_read; return fifo_read;

@ -125,7 +125,7 @@ int init_unix_sock(struct sockaddr_un* su, char* name, int type, int perm,
} }
} }
/* try to change ownership */ /* try to change ownership */
if ((uid!=-1) || (gid!=-1)){ if ((uid!=-1) && (gid!=-1)){
if (chown(name, uid, gid)<0){ if (chown(name, uid, gid)<0){
LOG(L_ERR, "ERROR: init_unix_sock: failed to change the" LOG(L_ERR, "ERROR: init_unix_sock: failed to change the"
" owner/group for %s to %d.%d: %s[%d]\n", " owner/group for %s to %d.%d: %s[%d]\n",

@ -181,7 +181,7 @@ void io_listen_loop(int fd_no, struct ctrl_socket* cs_lst)
int type; int type;
clist_init(&stream_conn_lst, next, prev); clist_init(&stream_conn_lst, next, prev);
type=UNKNOWN_SOCK; type=F_T_RESERVED;
#if 0 #if 0
/* estimate used fd numbers -- FIXME: broken, make it a function in pt.h */ /* estimate used fd numbers -- FIXME: broken, make it a function in pt.h */
max_fd_no=get_max_procs()*3 -1 /* timer */ +3; /* stdin/out/err*/; max_fd_no=get_max_procs()*3 -1 /* timer */ +3; /* stdin/out/err*/;

@ -17,8 +17,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
* *
* History * History
@ -144,6 +144,7 @@ int db_postgres_get_columns(const db1_con_t* _h, db1_res_t* _r)
case INT8OID: case INT8OID:
LM_DBG("use DB1_BIGINT result type\n"); LM_DBG("use DB1_BIGINT result type\n");
RES_TYPES(_r)[col] = DB1_BIGINT; RES_TYPES(_r)[col] = DB1_BIGINT;
break;
case FLOAT4OID: case FLOAT4OID:
case FLOAT8OID: case FLOAT8OID:
@ -178,7 +179,7 @@ int db_postgres_get_columns(const db1_con_t* _h, db1_res_t* _r)
LM_DBG("use DB1_BITMAP result type\n"); LM_DBG("use DB1_BITMAP result type\n");
RES_TYPES(_r)[col] = DB1_BITMAP; RES_TYPES(_r)[col] = DB1_BITMAP;
break; break;
default: default:
LM_WARN("unhandled data type column (%.*s) type id (%d), " LM_WARN("unhandled data type column (%.*s) type id (%d), "
"use DB1_STRING as default\n", RES_NAMES(_r)[col]->len, "use DB1_STRING as default\n", RES_NAMES(_r)[col]->len,

@ -52,6 +52,7 @@ db1_con_t* dbt_init(const str* _sqlurl)
LM_ERR("invalid parameter value\n"); LM_ERR("invalid parameter value\n");
return NULL; return NULL;
} }
LM_DBG("initializing for db url: [%.*s]\n", _sqlurl->len, _sqlurl->s);
_s.s = _sqlurl->s; _s.s = _sqlurl->s;
_s.len = _sqlurl->len; _s.len = _sqlurl->len;
if(_s.len <= DBT_ID_LEN || strncmp(_s.s, DBT_ID, DBT_ID_LEN)!=0) if(_s.len <= DBT_ID_LEN || strncmp(_s.s, DBT_ID, DBT_ID_LEN)!=0)
@ -68,16 +69,22 @@ db1_con_t* dbt_init(const str* _sqlurl)
_s.len -= DBT_ID_LEN; _s.len -= DBT_ID_LEN;
if(_s.s[0]!='/') if(_s.s[0]!='/')
{ {
if(sizeof(CFG_DIR)+_s.len+2 > DBT_PATH_LEN) if(sizeof(CFG_DIR)+_s.len+2 >= DBT_PATH_LEN)
{ {
LM_ERR("path to database is too long\n"); LM_ERR("path to database is too long\n");
return NULL; return NULL;
} }
strcpy(dbt_path, CFG_DIR); strcpy(dbt_path, CFG_DIR);
dbt_path[sizeof(CFG_DIR)] = '/'; if(dbt_path[sizeof(CFG_DIR)-2]!='/') {
strncpy(&dbt_path[sizeof(CFG_DIR)+1], _s.s, _s.len); dbt_path[sizeof(CFG_DIR)-1] = '/';
_s.len += sizeof(CFG_DIR); strncpy(&dbt_path[sizeof(CFG_DIR)], _s.s, _s.len);
_s.len += sizeof(CFG_DIR);
} else {
strncpy(&dbt_path[sizeof(CFG_DIR)-1], _s.s, _s.len);
_s.len += sizeof(CFG_DIR) - 1;
}
_s.s = dbt_path; _s.s = dbt_path;
LM_DBG("updated db url: [%.*s]\n", _s.len, _s.s);
} }
_res = pkg_malloc(sizeof(db1_con_t)+sizeof(dbt_con_t)); _res = pkg_malloc(sizeof(db1_con_t)+sizeof(dbt_con_t));
@ -210,9 +217,10 @@ int dbt_query(db1_con_t* _h, db_key_t* _k, db_op_t* _op, db_val_t* _v,
} }
if(!_tbc || _tbc->nrcols < _nc) if(_tbc->nrcols < _nc)
{ {
LM_ERR("table %s not loaded! (too few columns)\n", CON_TABLE(_h)->s); LM_ERR("table %s - too few columns (%d < %d)\n", CON_TABLE(_h)->s,
_tbc->nrcols, _nc);
goto error; goto error;
} }
if(_k) if(_k)

@ -91,17 +91,18 @@ dbt_table_p dbt_load_file(const str *tbn, const str *dbn)
dbt_table_p dtp = NULL; dbt_table_p dtp = NULL;
dbt_column_p colp, colp0 = NULL; dbt_column_p colp, colp0 = NULL;
dbt_row_p rowp, rowp0 = NULL; dbt_row_p rowp, rowp0 = NULL;
enum {DBT_FLINE_ST, DBT_NLINE_ST, DBT_DATA_ST} state; enum {DBT_FLINE_ST, DBT_NLINE_ST, DBT_DATA_ST} state;
LM_DBG("request for table [%.*s]\n", tbn->len, tbn->s);
if(!tbn || !tbn->s || tbn->len<=0 || tbn->len>=255) if(!tbn || !tbn->s || tbn->len<=0 || tbn->len>=255)
return NULL; return NULL;
LM_DBG("request for table [%.*s] (len: %d)\n", tbn->len, tbn->s, tbn->len);
path[0] = 0; path[0] = 0;
if(dbn && dbn->s && dbn->len>0) if(dbn && dbn->s && dbn->len>0)
{ {
LM_DBG("db is [%.*s]\n", dbn->len, dbn->s); LM_DBG("db is [%.*s] (len: %d)\n", dbn->len, dbn->s, dbn->len);
if(dbn->len+tbn->len<511) if(dbn->len+tbn->len<511)
{ {
strncpy(path, dbn->s, dbn->len); strncpy(path, dbn->s, dbn->len);
@ -115,12 +116,14 @@ dbt_table_p dbt_load_file(const str *tbn, const str *dbn)
strncpy(path, tbn->s, tbn->len); strncpy(path, tbn->s, tbn->len);
path[tbn->len] = 0; path[tbn->len] = 0;
} }
LM_DBG("loading file [%s]\n", path); LM_DBG("loading file [%s]\n", path);
fin = fopen(path, "rt"); fin = fopen(path, "rt");
if(!fin) if(!fin) {
return NULL; LM_ERR("failed to open file [%s]\n", path);
return NULL;
}
buf = pkg_malloc(_db_text_read_buffer_size); buf = pkg_malloc(_db_text_read_buffer_size);
if(!buf) { if(!buf) {
LM_ERR("error allocating read buffer, %i\n", _db_text_read_buffer_size); LM_ERR("error allocating read buffer, %i\n", _db_text_read_buffer_size);

@ -130,7 +130,7 @@ int dlg_cseq_update(sip_msg_t *msg)
sr_cfgenv_t *cenv = NULL; sr_cfgenv_t *cenv = NULL;
if(dlg_cseq_prepare_msg(msg)!=0) { if(dlg_cseq_prepare_msg(msg)!=0) {
goto error; return -1;
} }
if(msg->first_line.type==SIP_REPLY) { if(msg->first_line.type==SIP_REPLY) {
/* nothing to do for outgoing replies */ /* nothing to do for outgoing replies */
@ -186,16 +186,14 @@ int dlg_cseq_update(sip_msg_t *msg)
trim(&nval); trim(&nval);
LM_DBG("adding auth cseq header value: %.*s\n", nval.len, nval.s); LM_DBG("adding auth cseq header value: %.*s\n", nval.len, nval.s);
parse_headers(msg, HDR_EOH_F, 0); if(parse_headers(msg, HDR_EOH_F, 0)==-1) {
LM_ERR("failed to parse all headers\n");
}
sr_hdr_add_zs(msg, cenv->uac_cseq_auth.s, &nval); sr_hdr_add_zs(msg, cenv->uac_cseq_auth.s, &nval);
done: done:
if(dlg!=NULL) dlg_release(dlg); if(dlg!=NULL) dlg_release(dlg);
return 0; return 0;
error:
if(dlg!=NULL) dlg_release(dlg);
return -1;
} }
@ -256,7 +254,9 @@ int dlg_cseq_refresh(sip_msg_t *msg, dlg_cell_t *dlg,
trim(&nval); trim(&nval);
LM_DBG("adding cseq refresh header value: %.*s\n", nval.len, nval.s); LM_DBG("adding cseq refresh header value: %.*s\n", nval.len, nval.s);
parse_headers(msg, HDR_EOH_F, 0); if(parse_headers(msg, HDR_EOH_F, 0)==-1) {
LM_ERR("failed to parse all headers\n");
}
cenv = sr_cfgenv_get(); cenv = sr_cfgenv_get();
sr_hdr_add_zs(msg, cenv->uac_cseq_refresh.s, &nval); sr_hdr_add_zs(msg, cenv->uac_cseq_refresh.s, &nval);
@ -397,7 +397,9 @@ int dlg_cseq_msg_sent(void *data)
goto done; goto done;
} }
parse_headers(&msg, HDR_EOH_F, 0); if(parse_headers(&msg, HDR_EOH_F, 0)==-1) {
LM_ERR("failed to parse all headers\n");
}
/* check if transaction is marked for a new increment */ /* check if transaction is marked for a new increment */
hfk = sr_hdr_get_z(&msg, cenv->uac_cseq_auth.s); hfk = sr_hdr_get_z(&msg, cenv->uac_cseq_auth.s);

@ -640,7 +640,7 @@ int dlg_add_profile(dlg_cell_t *dlg, str *value, struct dlg_profile_table *profi
/* build new linker */ /* build new linker */
linker = (struct dlg_profile_link*)shm_malloc( linker = (struct dlg_profile_link*)shm_malloc(
sizeof(struct dlg_profile_link) + (profile->has_value?(value->len+1):0) ); sizeof(struct dlg_profile_link)+(profile->has_value?(value->len+1):0));
if (linker==NULL) { if (linker==NULL) {
LM_ERR("no more shm memory\n"); LM_ERR("no more shm memory\n");
goto error; goto error;
@ -654,17 +654,29 @@ int dlg_add_profile(dlg_cell_t *dlg, str *value, struct dlg_profile_table *profi
/* set the value */ /* set the value */
if (profile->has_value) { if (profile->has_value) {
linker->hash_linker.value.s = (char*)(linker+1); linker->hash_linker.value.s = (char*)(linker+1);
memcpy( linker->hash_linker.value.s, value->s, value->len); memcpy(linker->hash_linker.value.s, value->s, value->len);
linker->hash_linker.value.len = value->len; linker->hash_linker.value.len = value->len;
linker->hash_linker.value.s[value->len] = '\0'; linker->hash_linker.value.s[value->len] = '\0';
} }
if(puid && puid->s && puid->len>0 && puid->len<SRUID_SIZE) { if(puid && puid->s && puid->len>0) {
strcpy(linker->hash_linker.puid, puid->s); if(puid->len<SRUID_SIZE) {
linker->hash_linker.puid_len = puid->len; strcpy(linker->hash_linker.puid, puid->s);
linker->hash_linker.puid_len = puid->len;
} else {
LM_ERR("puid size is too large\n");
shm_free(linker);
goto error;
}
} else { } else {
sruid_next_safe(&_dlg_profile_sruid); sruid_next_safe(&_dlg_profile_sruid);
strcpy(linker->hash_linker.puid, _dlg_profile_sruid.uid.s); if(_dlg_profile_sruid.uid.len<SRUID_SIZE) {
linker->hash_linker.puid_len = _dlg_profile_sruid.uid.len; strcpy(linker->hash_linker.puid, _dlg_profile_sruid.uid.s);
linker->hash_linker.puid_len = _dlg_profile_sruid.uid.len;
} else {
LM_ERR("sruid size is too large\n");
shm_free(linker);
goto error;
}
} }
linker->hash_linker.expires = expires; linker->hash_linker.expires = expires;
linker->hash_linker.flags = flags; linker->hash_linker.flags = flags;
@ -901,7 +913,7 @@ int dlg_set_timeout_by_profile(struct dlg_profile_table *profile,
struct dlg_map_list *d = malloc(sizeof(struct dlg_map_list)); struct dlg_map_list *d = malloc(sizeof(struct dlg_map_list));
if(!d) if(!d)
return -1; goto error;
memset(d, 0, sizeof(struct dlg_map_list)); memset(d, 0, sizeof(struct dlg_map_list));
@ -920,9 +932,7 @@ int dlg_set_timeout_by_profile(struct dlg_profile_table *profile,
} }
lock_release(&profile->lock); lock_release(&profile->lock);
} } else {
else {
i = calc_hash_profile(value, NULL, profile); i = calc_hash_profile(value, NULL, profile);
lock_get(&profile->lock); lock_get(&profile->lock);
@ -932,11 +942,11 @@ int dlg_set_timeout_by_profile(struct dlg_profile_table *profile,
if(ph) { if(ph) {
do { do {
if(ph && value->len == ph->value.len && if(ph && value->len == ph->value.len &&
memcmp(value->s, ph->value.s, value->len) == 0) { memcmp(value->s, ph->value.s, value->len) == 0) {
struct dlg_map_list *d = malloc(sizeof(struct dlg_map_list)); struct dlg_map_list *d = malloc(sizeof(struct dlg_map_list));
if(!d) if(!d)
return -1; goto error;
memset(d, 0, sizeof(struct dlg_map_list)); memset(d, 0, sizeof(struct dlg_map_list));
@ -969,17 +979,21 @@ int dlg_set_timeout_by_profile(struct dlg_profile_table *profile,
LM_CRIT("Unable to find dialog %d:%d\n", map_scan->h_entry, map_scan->h_id); LM_CRIT("Unable to find dialog %d:%d\n", map_scan->h_entry, map_scan->h_id);
} else if(this_dlg->state >= DLG_STATE_EARLY) { } else if(this_dlg->state >= DLG_STATE_EARLY) {
if(update_dlg_timeout(this_dlg, timeout) < 0) { if(update_dlg_timeout(this_dlg, timeout) < 0) {
LM_ERR("Unable to set timeout on %d:%d\n", map_scan->h_entry, LM_ERR("Unable to set timeout on %d:%d\n", map_scan->h_entry,
map_scan->h_id); map_scan->h_id);
} }
dlg_release(this_dlg);
dlg_release(this_dlg);
} }
free(map_scan); free(map_scan);
} }
return 0; return 0;
error:
for(map_scan = map_head; map_scan != NULL; map_scan = map_scan_next) {
map_scan_next = map_scan->next;
free(map_scan);
}
return -1;
} }
/****************************** MI commands *********************************/ /****************************** MI commands *********************************/

@ -483,6 +483,7 @@ int pv_set_dlg_ctx(struct sip_msg* msg, pv_param_t *param,
int op, pv_value_t *val) int op, pv_value_t *val)
{ {
int n; int n;
int rlen;
char *rtp; char *rtp;
if(param==NULL) if(param==NULL)
@ -509,13 +510,15 @@ int pv_set_dlg_ctx(struct sip_msg* msg, pv_param_t *param,
&& val->rs.len<DLG_TOROUTE_SIZE) { && val->rs.len<DLG_TOROUTE_SIZE) {
_dlg_ctx.to_route = route_lookup(&main_rt, val->rs.s); _dlg_ctx.to_route = route_lookup(&main_rt, val->rs.s);
strcpy(_dlg_ctx.to_route_name, val->rs.s); strcpy(_dlg_ctx.to_route_name, val->rs.s);
} else _dlg_ctx.to_route = 0; } else { _dlg_ctx.to_route = 0; }
} else { } else {
if(n!=0) { if(n!=0) {
rtp = int2str(n, NULL); rtp = int2str(n, &rlen);
_dlg_ctx.to_route = route_lookup(&main_rt, rtp); if(rlen<DLG_TOROUTE_SIZE) {
strcpy(_dlg_ctx.to_route_name, rtp); _dlg_ctx.to_route = route_lookup(&main_rt, rtp);
} else _dlg_ctx.to_route = 0; strcpy(_dlg_ctx.to_route_name, rtp);
} else { _dlg_ctx.to_route = 0; }
} else { _dlg_ctx.to_route = 0; }
} }
if(_dlg_ctx.to_route <0) _dlg_ctx.to_route = 0; if(_dlg_ctx.to_route <0) _dlg_ctx.to_route = 0;
break; break;

@ -30,6 +30,7 @@
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdint.h>
#include <time.h> #include <time.h>
#include "../../ut.h" #include "../../ut.h"

@ -8,9 +8,9 @@ NAME=evapi.so
ifeq ($(CROSS_COMPILE),) ifeq ($(CROSS_COMPILE),)
BUILDER = $(shell which pkg-config) BUILDER = $(shell which pkg-config)
ifneq ($(BUILDER),) ifneq ($(BUILDER),)
PKGLIBUV = $(shell $(BUILDER) --exists libev > /dev/null 2>&1 ; echo $$? ) PKGLIBUV = $(shell $(BUILDER) --exists libev > /dev/null 2>&1 ; echo $$? )
ifneq ($(PKGLIBUV),0) ifneq ($(PKGLIBUV),0)
BUILDER = BUILDER =
endif endif
endif endif
endif endif
@ -19,13 +19,14 @@ ifneq ($(BUILDER),)
DEFS += $(shell $(BUILDER) --cflags libev) DEFS += $(shell $(BUILDER) --cflags libev)
LIBS += $(shell $(BUILDER) --libs libev) LIBS += $(shell $(BUILDER) --libs libev)
else else
ifeq ($(OS), darwin) ifneq (,$(findstring darwin,$(OS)))
DEFS += -I/opt/local/include DEFS += -I/opt/local/include -I$(LOCALBASE)/include
LIBS += -L/opt/local/lib LIBS += -L/opt/local/lib -L$(LOCALBASE)/lib -lev
endif else
DEFS += -I$(LOCALBASE)/include -I$(SYSBASE)/include DEFS += -I$(LOCALBASE)/include -I$(SYSBASE)/include
LIBS += -L$(LOCALBASE)/lib -L$(SYSBASE)/lib -lev LIBS += -L$(LOCALBASE)/lib -L$(SYSBASE)/lib -lev
endif endif
endif
DEFS+=-DKAMAILIO_MOD_INTERFACE DEFS+=-DKAMAILIO_MOD_INTERFACE

@ -444,7 +444,7 @@ void evapi_accept_client(struct ev_loop *loop, struct ev_io *watcher, int revent
break; break;
} }
} }
if(i==EVAPI_MAX_CLIENTS) { if(i>=EVAPI_MAX_CLIENTS) {
LM_ERR("too many clients\n"); LM_ERR("too many clients\n");
close(csock); close(csock);
free(evapi_client); free(evapi_client);

@ -237,7 +237,7 @@ static int child_init(int rank)
LM_DBG("rank is (%d)\n", rank); LM_DBG("rank is (%d)\n", rank);
if(rank==PROC_MAIN) { if(rank==PROC_MAIN) {
if(ht_timer_procs>0) { if(ht_has_autoexpire() && ht_timer_procs>0) {
for(i=0; i<ht_timer_procs; i++) { for(i=0; i<ht_timer_procs; i++) {
if(fork_sync_timer(PROC_TIMER, "HTable Timer", 1 /*socks flag*/, if(fork_sync_timer(PROC_TIMER, "HTable Timer", 1 /*socks flag*/,
ht_timer, (void*)(long)i, ht_timer_interval)<0) { ht_timer, (void*)(long)i, ht_timer_interval)<0) {

@ -1,301 +1,301 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:simpleType name="tPriority" final="list restriction"> <xs:simpleType name="tPriority" final="list restriction">
<xs:restriction base="xs:int"> <xs:restriction base="xs:int">
<xs:minInclusive value="0"/> <xs:minInclusive value="0"/>
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
<xs:simpleType name="tProfilePartIndicator" final="list restriction"> <xs:simpleType name="tProfilePartIndicator" final="list restriction">
<xs:restriction base="xs:unsignedByte"> <xs:restriction base="xs:unsignedByte">
<xs:maxInclusive value="1"/> <xs:maxInclusive value="1"/>
<xs:enumeration value="0"> <xs:enumeration value="0">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
<label xml:lang="en">REGISTERED</label> <label xml:lang="en">REGISTERED</label>
<definition xml:lang="en">iFC is part of the registered profile</definition> <definition xml:lang="en">iFC is part of the registered profile</definition>
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:enumeration> </xs:enumeration>
<xs:enumeration value="1"> <xs:enumeration value="1">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
<label xml:lang="en">UNREGISTERED</label> <label xml:lang="en">UNREGISTERED</label>
<definition xml:lang="en">iFC is part of the unregistered profile</definition> <definition xml:lang="en">iFC is part of the unregistered profile</definition>
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:enumeration> </xs:enumeration>
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
<xs:simpleType name="tSharedIFCSetID" final="list restriction"> <xs:simpleType name="tSharedIFCSetID" final="list restriction">
<xs:restriction base="xs:int"> <xs:restriction base="xs:int">
<xs:minInclusive value="0"/> <xs:minInclusive value="0"/>
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
<xs:simpleType name="tGroupID" final="list restriction"> <xs:simpleType name="tGroupID" final="list restriction">
<xs:restriction base="xs:int"> <xs:restriction base="xs:int">
<xs:minInclusive value="0"/> <xs:minInclusive value="0"/>
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
<xs:simpleType name="tRegistrationType" final="list restriction"> <xs:simpleType name="tRegistrationType" final="list restriction">
<xs:restriction base="xs:unsignedByte"> <xs:restriction base="xs:unsignedByte">
<xs:maxInclusive value="2"/> <xs:maxInclusive value="2"/>
<xs:enumeration value="0"> <xs:enumeration value="0">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
<label xml:lang="en">INITIAL_REGISTRATION</label> <label xml:lang="en">INITIAL_REGISTRATION</label>
<definition xml:lang="en">Matches to REGISTER messages that are related to initial registration</definition> <definition xml:lang="en">Matches to REGISTER messages that are related to initial registration</definition>
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:enumeration> </xs:enumeration>
<xs:enumeration value="1"> <xs:enumeration value="1">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
<label xml:lang="en">RE-REGISTRATION</label> <label xml:lang="en">RE-REGISTRATION</label>
<definition xml:lang="en">Matches to REGISTER messages that are related to re-registration</definition> <definition xml:lang="en">Matches to REGISTER messages that are related to re-registration</definition>
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:enumeration> </xs:enumeration>
<xs:enumeration value="2"> <xs:enumeration value="2">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
<label xml:lang="en">DE-REGISTRATION</label> <label xml:lang="en">DE-REGISTRATION</label>
<definition xml:lang="en">Matches to REGISTER messages that are related to de-registration</definition> <definition xml:lang="en">Matches to REGISTER messages that are related to de-registration</definition>
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:enumeration> </xs:enumeration>
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
<xs:simpleType name="tDefaultHandling" final="list restriction"> <xs:simpleType name="tDefaultHandling" final="list restriction">
<xs:restriction base="xs:unsignedByte"> <xs:restriction base="xs:unsignedByte">
<xs:maxInclusive value="1"/> <xs:maxInclusive value="1"/>
<xs:enumeration value="0"> <xs:enumeration value="0">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
<label xml:lang="en">SESSION_CONTINUED</label> <label xml:lang="en">SESSION_CONTINUED</label>
<definition xml:lang="en">Session Continued</definition> <definition xml:lang="en">Session Continued</definition>
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:enumeration> </xs:enumeration>
<xs:enumeration value="1"> <xs:enumeration value="1">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
<label xml:lang="en">SESSION_TERMINATED</label> <label xml:lang="en">SESSION_TERMINATED</label>
<definition xml:lang="en">Session Terminated</definition> <definition xml:lang="en">Session Terminated</definition>
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:enumeration> </xs:enumeration>
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
<xs:simpleType name="tDirectionOfRequest" final="list restriction"> <xs:simpleType name="tDirectionOfRequest" final="list restriction">
<xs:restriction base="xs:unsignedByte"> <xs:restriction base="xs:unsignedByte">
<xs:maxInclusive value="3"/> <xs:maxInclusive value="3"/>
<xs:enumeration value="0"> <xs:enumeration value="0">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
<label xml:lang="en">ORIGINATING_SESSION</label> <label xml:lang="en">ORIGINATING_SESSION</label>
<definition xml:lang="en">Originating Session</definition> <definition xml:lang="en">Originating Session</definition>
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:enumeration> </xs:enumeration>
<xs:enumeration value="1"> <xs:enumeration value="1">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
<label xml:lang="en">TERMINATING_REGISTERED</label> <label xml:lang="en">TERMINATING_REGISTERED</label>
<definition xml:lang="en">Terminating Session for registered user</definition> <definition xml:lang="en">Terminating Session for registered user</definition>
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:enumeration> </xs:enumeration>
<xs:enumeration value="2"> <xs:enumeration value="2">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
<label xml:lang="en">TERMINATING_UNREGISTERED</label> <label xml:lang="en">TERMINATING_UNREGISTERED</label>
<definition xml:lang="en">Terminating Session for unregistered user</definition> <definition xml:lang="en">Terminating Session for unregistered user</definition>
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:enumeration> </xs:enumeration>
<xs:enumeration value="3"> <xs:enumeration value="3">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
<label xml:lang="en">ORIGINATING_UNREGISTERED</label> <label xml:lang="en">ORIGINATING_UNREGISTERED</label>
<definition xml:lang="en">Originating Session for an unregistered user</definition> <definition xml:lang="en">Originating Session for an unregistered user</definition>
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:enumeration> </xs:enumeration>
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
<xs:simpleType name="tPrivateID" final="list restriction"> <xs:simpleType name="tPrivateID" final="list restriction">
<xs:restriction base="xs:anyURI"/> <xs:restriction base="xs:anyURI"/>
</xs:simpleType> </xs:simpleType>
<xs:simpleType name="tSIP_URL" final="list restriction"> <xs:simpleType name="tSIP_URL" final="list restriction">
<xs:restriction base="xs:anyURI"/> <xs:restriction base="xs:anyURI"/>
</xs:simpleType> </xs:simpleType>
<xs:simpleType name="tTEL_URL" final="list restriction"> <xs:simpleType name="tTEL_URL" final="list restriction">
<xs:restriction base="xs:anyURI"/> <xs:restriction base="xs:anyURI"/>
</xs:simpleType> </xs:simpleType>
<xs:simpleType name="tIdentity" final="list restriction"> <xs:simpleType name="tIdentity" final="list restriction">
<xs:union memberTypes="tSIP_URL tTEL_URL"/> <xs:union memberTypes="tSIP_URL tTEL_URL"/>
</xs:simpleType> </xs:simpleType>
<xs:simpleType name="tIdentityType" final="list restriction"> <xs:simpleType name="tIdentityType" final="list restriction">
<xs:restriction base="xs:unsignedByte"> <xs:restriction base="xs:unsignedByte">
<xs:minInclusive value="0"/> <xs:minInclusive value="0"/>
<xs:maxInclusive value="2"/> <xs:maxInclusive value="2"/>
<xs:enumeration value="0"> <xs:enumeration value="0">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
<label xml:lang="en">PUBLIC_USER_IDENTITY</label> <label xml:lang="en">PUBLIC_USER_IDENTITY</label>
<definition xml:lang="en">Identity is a Public User Identity.</definition> <definition xml:lang="en">Identity is a Public User Identity.</definition>
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:enumeration> </xs:enumeration>
<xs:enumeration value="1"> <xs:enumeration value="1">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
<label xml:lang="en">DISTINCT_PSI</label> <label xml:lang="en">DISTINCT_PSI</label>
<definition xml:lang="en">Identity is a distinct Public Service Identity.</definition> <definition xml:lang="en">Identity is a distinct Public Service Identity.</definition>
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:enumeration> </xs:enumeration>
<xs:enumeration value="2"> <xs:enumeration value="2">
<xs:annotation> <xs:annotation>
<xs:documentation> <xs:documentation>
<label xml:lang="en">WILDCARDED_PSI</label> <label xml:lang="en">WILDCARDED_PSI</label>
<definition xml:lang="en">Identity matches a wildcarded Public Service Identity.</definition> <definition xml:lang="en">Identity matches a wildcarded Public Service Identity.</definition>
</xs:documentation> </xs:documentation>
</xs:annotation> </xs:annotation>
</xs:enumeration> </xs:enumeration>
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
<xs:complexType name="tPublicIdentityExtension"> <xs:complexType name="tPublicIdentityExtension">
<xs:sequence> <xs:sequence>
<xs:element name="IdentityType" type="tIdentityType" minOccurs="0"/> <xs:element name="IdentityType" type="tIdentityType" minOccurs="0"/>
<xs:element name="WildcardedPSI" type="xs:anyURI" minOccurs="0"/> <xs:element name="WildcardedPSI" type="xs:anyURI" minOccurs="0"/>
<xs:element name="Extension" type="tExtension" minOccurs="0"/> <xs:element name="Extension" type="tExtension" minOccurs="0"/>
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
<xs:simpleType name="tServiceInfo" final="list restriction"> <xs:simpleType name="tServiceInfo" final="list restriction">
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:minLength value="0"/> <xs:minLength value="0"/>
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
<xs:simpleType name="tString" final="list restriction"> <xs:simpleType name="tString" final="list restriction">
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:minLength value="0"/> <xs:minLength value="0"/>
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
<xs:simpleType name="tBool"> <xs:simpleType name="tBool">
<xs:restriction base="xs:boolean"/> <xs:restriction base="xs:boolean"/>
</xs:simpleType> </xs:simpleType>
<xs:simpleType name="tSubscribedMediaProfileId" final="list restriction"> <xs:simpleType name="tSubscribedMediaProfileId" final="list restriction">
<xs:restriction base="xs:int"> <xs:restriction base="xs:int">
<xs:minInclusive value="0"/> <xs:minInclusive value="0"/>
</xs:restriction> </xs:restriction>
</xs:simpleType> </xs:simpleType>
<xs:complexType name="tExtension"> <xs:complexType name="tExtension">
<xs:sequence> <xs:sequence>
<xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded"/> <xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
<xs:complexType name="tServiceProfileExtension"> <xs:complexType name="tServiceProfileExtension">
<xs:sequence> <xs:sequence>
<xs:element name="SharedIFCSetID" type="tSharedIFCSetID" minOccurs="0" maxOccurs="unbounded"/> <xs:element name="SharedIFCSetID" type="tSharedIFCSetID" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="Extension" type="tExtension" minOccurs="0"/> <xs:element name="Extension" type="tExtension" minOccurs="0"/>
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
<xs:complexType name="tSePoTriExtension"> <xs:complexType name="tSePoTriExtension">
<xs:sequence> <xs:sequence>
<xs:element name="RegistrationType" type="tRegistrationType" minOccurs="0" maxOccurs="2"/> <xs:element name="RegistrationType" type="tRegistrationType" minOccurs="0" maxOccurs="2"/>
<xs:element name="Extension" type="tExtension" minOccurs="0"/> <xs:element name="Extension" type="tExtension" minOccurs="0"/>
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
<xs:complexType name="tIMSSubscription"> <xs:complexType name="tIMSSubscription">
<xs:sequence> <xs:sequence>
<xs:element name="PrivateID" type="tPrivateID"/> <xs:element name="PrivateID" type="tPrivateID"/>
<xs:element name="ServiceProfile" type="tServiceProfile" maxOccurs="unbounded"/> <xs:element name="ServiceProfile" type="tServiceProfile" maxOccurs="unbounded"/>
<xs:element name="Extension" type="tExtension" minOccurs="0"/> <xs:element name="Extension" type="tExtension" minOccurs="0"/>
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
<xs:complexType name="tServiceProfile"> <xs:complexType name="tServiceProfile">
<xs:sequence> <xs:sequence>
<xs:element name="PublicIdentity" type="tPublicIdentity" maxOccurs="unbounded"/> <xs:element name="PublicIdentity" type="tPublicIdentity" maxOccurs="unbounded"/>
<xs:element name="CoreNetworkServicesAuthorization" type="tCoreNetworkServicesAuthorization" minOccurs="0"/> <xs:element name="CoreNetworkServicesAuthorization" type="tCoreNetworkServicesAuthorization" minOccurs="0"/>
<xs:element name="InitialFilterCriteria" type="tInitialFilterCriteria" minOccurs="0" maxOccurs="unbounded"/> <xs:element name="InitialFilterCriteria" type="tInitialFilterCriteria" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="Extension" type="tServiceProfileExtension" minOccurs="0"/> <xs:element name="Extension" type="tServiceProfileExtension" minOccurs="0"/>
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
<xs:complexType name="tCoreNetworkServicesAuthorization"> <xs:complexType name="tCoreNetworkServicesAuthorization">
<xs:sequence> <xs:sequence>
<xs:element name="SubscribedMediaProfileId" type="tSubscribedMediaProfileId" minOccurs="0"/> <xs:element name="SubscribedMediaProfileId" type="tSubscribedMediaProfileId" minOccurs="0"/>
<xs:element name="Extension" type="tExtension" minOccurs="0"/> <xs:element name="Extension" type="tExtension" minOccurs="0"/>
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
<xs:complexType name="tInitialFilterCriteria"> <xs:complexType name="tInitialFilterCriteria">
<xs:sequence> <xs:sequence>
<xs:element name="Priority" type="tPriority"/> <xs:element name="Priority" type="tPriority"/>
<xs:element name="TriggerPoint" type="tTrigger" minOccurs="0"/> <xs:element name="TriggerPoint" type="tTrigger" minOccurs="0"/>
<xs:element name="ApplicationServer" type="tApplicationServer"/> <xs:element name="ApplicationServer" type="tApplicationServer"/>
<xs:element name="ProfilePartIndicator" type="tProfilePartIndicator" minOccurs="0"/> <xs:element name="ProfilePartIndicator" type="tProfilePartIndicator" minOccurs="0"/>
<xs:element name="Extension" type="tExtension" minOccurs="0"/> <xs:element name="Extension" type="tExtension" minOccurs="0"/>
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
<xs:complexType name="tTrigger"> <xs:complexType name="tTrigger">
<xs:sequence> <xs:sequence>
<xs:element name="ConditionTypeCNF" type="tBool"/> <xs:element name="ConditionTypeCNF" type="tBool"/>
<xs:element name="SPT" type="tSePoTri" maxOccurs="unbounded"/> <xs:element name="SPT" type="tSePoTri" maxOccurs="unbounded"/>
<xs:element name="Extension" type="tExtension" minOccurs="0"/> <xs:element name="Extension" type="tExtension" minOccurs="0"/>
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
<xs:complexType name="tSePoTri"> <xs:complexType name="tSePoTri">
<xs:sequence> <xs:sequence>
<xs:element name="ConditionNegated" type="tBool" default="0" minOccurs="0"/> <xs:element name="ConditionNegated" type="tBool" default="0" minOccurs="0"/>
<xs:element name="Group" type="tGroupID" maxOccurs="unbounded"/> <xs:element name="Group" type="tGroupID" maxOccurs="unbounded"/>
<xs:choice> <xs:choice>
<xs:element name="RequestURI" type="tString"/> <xs:element name="RequestURI" type="tString"/>
<xs:element name="Method" type="tString"/> <xs:element name="Method" type="tString"/>
<xs:element name="SIPHeader" type="tHeader"/> <xs:element name="SIPHeader" type="tHeader"/>
<xs:element name="SessionCase" type="tDirectionOfRequest"/> <xs:element name="SessionCase" type="tDirectionOfRequest"/>
<xs:element name="SessionDescription" type="tSessionDescription"/> <xs:element name="SessionDescription" type="tSessionDescription"/>
</xs:choice> </xs:choice>
<xs:element name="Extension" type="tSePoTriExtension" minOccurs="0"/> <xs:element name="Extension" type="tSePoTriExtension" minOccurs="0"/>
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
<xs:complexType name="tHeader"> <xs:complexType name="tHeader">
<xs:sequence> <xs:sequence>
<xs:element name="Header" type="tString"/> <xs:element name="Header" type="tString"/>
<xs:element name="Content" type="tString" minOccurs="0"/> <xs:element name="Content" type="tString" minOccurs="0"/>
<xs:element name="Extension" type="tExtension" minOccurs="0"/> <xs:element name="Extension" type="tExtension" minOccurs="0"/>
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
<xs:complexType name="tSessionDescription"> <xs:complexType name="tSessionDescription">
<xs:sequence> <xs:sequence>
<xs:element name="Line" type="tString"/> <xs:element name="Line" type="tString"/>
<xs:element name="Content" type="tString" minOccurs="0"/> <xs:element name="Content" type="tString" minOccurs="0"/>
<xs:element name="Extension" type="tExtension" minOccurs="0"/> <xs:element name="Extension" type="tExtension" minOccurs="0"/>
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
<xs:complexType name="tApplicationServer"> <xs:complexType name="tApplicationServer">
<xs:sequence> <xs:sequence>
<xs:element name="ServerName" type="tSIP_URL"/> <xs:element name="ServerName" type="tSIP_URL"/>
<xs:element name="DefaultHandling" type="tDefaultHandling" minOccurs="0"/> <xs:element name="DefaultHandling" type="tDefaultHandling" minOccurs="0"/>
<xs:element name="ServiceInfo" type="tServiceInfo" minOccurs="0"/> <xs:element name="ServiceInfo" type="tServiceInfo" minOccurs="0"/>
<xs:element name="Extension" type="tExtension" minOccurs="0"/> <xs:element name="Extension" type="tExtension" minOccurs="0"/>
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
<xs:complexType name="tPublicIdentity"> <xs:complexType name="tPublicIdentity">
<xs:sequence> <xs:sequence>
<xs:element name="BarringIndication" type="tBool" default="0" minOccurs="0"/> <xs:element name="BarringIndication" type="tBool" default="0" minOccurs="0"/>
<xs:element name="Identity" type="tIdentity"/> <xs:element name="Identity" type="tIdentity"/>
<xs:element name="Extension" type="tPublicIdentityExtension" minOccurs="0"/> <xs:element name="Extension" type="tPublicIdentityExtension" minOccurs="0"/>
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
<xs:element name="IMSSubscription" type="tIMSSubscription"/> <xs:element name="IMSSubscription" type="tIMSSubscription"/>
</xs:schema> </xs:schema>

@ -2,12 +2,12 @@
* Copyright (c) 2012 Rogerz Zhang <rogerz.zhang@gmail.com> * Copyright (c) 2012 Rogerz Zhang <rogerz.zhang@gmail.com>
* *
* Jansson is free software; you can redistribute it and/or modify * Jansson is free software; you can redistribute it and/or modify
* it under the terms of the MIT license. * it under the terms of the MIT license.
*/ */
#ifndef _JANSSON_FUNCS_H_ #ifndef _JANSSON_PATH_H_
#define _JANSSON_FUNCS_H_ #define _JANSSON_PATH_H_
#include <jansson.h> #include <jansson.h>
json_t *json_path_get(const json_t *json, const char *path); json_t *json_path_get(const json_t *json, const char *path);

@ -1,11 +1,11 @@
CC = gcc CC = gcc
FILES = *.c ../netstring.c ../jsonrpc_global.c seatest/seatest.c FILES = *.c ../netstring.c ../jsonrpc_global.c seatest/seatest.c
OUT_EXE = test OUT_EXE = test
build: $(FILES) build: $(FILES)
$(CC) -std=gnu99 -pedantic -D TEST -o $(OUT_EXE) $(FILES) -lm -levent $(CC) -std=gnu99 -pedantic -D TEST -o $(OUT_EXE) $(FILES) -lm -levent
clean: clean:
rm -f *.o core rm -f *.o core
rebuild: clean build rebuild: clean build

@ -1,19 +1,19 @@
Copyright (c) 2010 Keith Nicholas Copyright (c) 2010 Keith Nicholas
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions: furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software. all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE. THE SOFTWARE.

@ -1,248 +1,248 @@
#include "seatest.h" #include "seatest.h"
#include <string.h> #include <string.h>
#ifdef WIN32 #ifdef WIN32
#include <conio.h> #include <conio.h>
#include "windows.h" #include "windows.h"
#else #else
unsigned int GetTickCount() { return 0;} unsigned int GetTickCount() { return 0;}
void _getch( void ) { } void _getch( void ) { }
#endif #endif
static int sea_tests_run = 0; static int sea_tests_run = 0;
static int sea_tests_passed = 0; static int sea_tests_passed = 0;
static int sea_tests_failed = 0; static int sea_tests_failed = 0;
static char* seatest_current_fixture; static char* seatest_current_fixture;
static void (*seatest_suite_setup_func)( void ) = 0; static void (*seatest_suite_setup_func)( void ) = 0;
static void (*seatest_suite_teardown_func)( void ) = 0; static void (*seatest_suite_teardown_func)( void ) = 0;
static void (*seatest_fixture_setup)( void ) = 0; static void (*seatest_fixture_setup)( void ) = 0;
static void (*seatest_fixture_teardown)( void ) = 0; static void (*seatest_fixture_teardown)( void ) = 0;
void suite_setup(void (*setup)( void )) void suite_setup(void (*setup)( void ))
{ {
seatest_suite_setup_func = setup; seatest_suite_setup_func = setup;
} }
void suite_teardown(void (*teardown)( void )) void suite_teardown(void (*teardown)( void ))
{ {
seatest_suite_teardown_func = teardown; seatest_suite_teardown_func = teardown;
} }
void seatest_suite_setup( void ) void seatest_suite_setup( void )
{ {
if(seatest_suite_setup_func != 0) seatest_suite_setup_func(); if(seatest_suite_setup_func != 0) seatest_suite_setup_func();
} }
void seatest_suite_teardown( void ) void seatest_suite_teardown( void )
{ {
if(seatest_suite_teardown_func != 0) seatest_suite_teardown_func(); if(seatest_suite_teardown_func != 0) seatest_suite_teardown_func();
} }
void fixture_setup(void (*setup)( void )) void fixture_setup(void (*setup)( void ))
{ {
seatest_fixture_setup = setup; seatest_fixture_setup = setup;
} }
void fixture_teardown(void (*teardown)( void )) void fixture_teardown(void (*teardown)( void ))
{ {
seatest_fixture_teardown = teardown; seatest_fixture_teardown = teardown;
} }
void seatest_setup( void ) void seatest_setup( void )
{ {
if(seatest_fixture_setup != 0) seatest_fixture_setup(); if(seatest_fixture_setup != 0) seatest_fixture_setup();
} }
void seatest_teardown( void ) void seatest_teardown( void )
{ {
if(seatest_fixture_teardown != 0) seatest_fixture_teardown(); if(seatest_fixture_teardown != 0) seatest_fixture_teardown();
} }
char* test_file_name(char* path) char* test_file_name(char* path)
{ {
char* file = path + strlen(path); char* file = path + strlen(path);
while(file != path && *file!= '\\' ) file--; while(file != path && *file!= '\\' ) file--;
if(*file == '\\') file++; if(*file == '\\') file++;
return file; return file;
} }
static int seatest_fixture_tests_run; static int seatest_fixture_tests_run;
static int seatest_fixture_tests_failed; static int seatest_fixture_tests_failed;
void seatest_simple_test_result(int passed, char* reason, const char* function, unsigned int line) void seatest_simple_test_result(int passed, char* reason, const char* function, unsigned int line)
{ {
if (!passed) if (!passed)
{ {
printf("%-20s Line %-5d %s\r\n", function, line, reason ); printf("%-20s Line %-5d %s\r\n", function, line, reason );
sea_tests_failed++; sea_tests_failed++;
} }
else else
{ {
sea_tests_passed++; sea_tests_passed++;
} }
} }
void seatest_assert_true(int test, const char* function, unsigned int line) void seatest_assert_true(int test, const char* function, unsigned int line)
{ {
seatest_simple_test_result(test, "Should of been true", function, line); seatest_simple_test_result(test, "Should of been true", function, line);
} }
void seatest_assert_false(int test, const char* function, unsigned int line) void seatest_assert_false(int test, const char* function, unsigned int line)
{ {
seatest_simple_test_result(!test, "Should of been false", function, line); seatest_simple_test_result(!test, "Should of been false", function, line);
} }
void seatest_assert_int_equal(int expected, int actual, const char* function, unsigned int line) void seatest_assert_int_equal(int expected, int actual, const char* function, unsigned int line)
{ {
char s[SEATEST_PRINT_BUFFER_SIZE]; char s[SEATEST_PRINT_BUFFER_SIZE];
sprintf(s, "Expected %d but was %d", expected, actual); sprintf(s, "Expected %d but was %d", expected, actual);
seatest_simple_test_result(expected==actual, s, function, line); seatest_simple_test_result(expected==actual, s, function, line);
} }
void seatest_assert_ulong_equal(unsigned long expected, unsigned long actual, const char* function, unsigned int line) void seatest_assert_ulong_equal(unsigned long expected, unsigned long actual, const char* function, unsigned int line)
{ {
char s[SEATEST_PRINT_BUFFER_SIZE]; char s[SEATEST_PRINT_BUFFER_SIZE];
sprintf(s, "Expected %lu but was %lu", expected, actual); sprintf(s, "Expected %lu but was %lu", expected, actual);
seatest_simple_test_result(expected==actual, s, function, line); seatest_simple_test_result(expected==actual, s, function, line);
} }
void seatest_assert_float_equal( float expected, float actual, float delta, const char* function, unsigned int line ) void seatest_assert_float_equal( float expected, float actual, float delta, const char* function, unsigned int line )
{ {
char s[SEATEST_PRINT_BUFFER_SIZE]; char s[SEATEST_PRINT_BUFFER_SIZE];
float result = expected-actual; float result = expected-actual;
sprintf(s, "Expected %f but was %f", expected, actual); sprintf(s, "Expected %f but was %f", expected, actual);
if(result < 0.0) result = 0.0f - result; if(result < 0.0) result = 0.0f - result;
seatest_simple_test_result( result <= delta, s, function, line); seatest_simple_test_result( result <= delta, s, function, line);
} }
void seatest_assert_double_equal( double expected, double actual, double delta, const char* function, unsigned int line ) void seatest_assert_double_equal( double expected, double actual, double delta, const char* function, unsigned int line )
{ {
char s[SEATEST_PRINT_BUFFER_SIZE]; char s[SEATEST_PRINT_BUFFER_SIZE];
double result = expected-actual; double result = expected-actual;
sprintf(s, "Expected %f but was %f", expected, actual); sprintf(s, "Expected %f but was %f", expected, actual);
if(result < 0.0) result = 0.0 - result; if(result < 0.0) result = 0.0 - result;
seatest_simple_test_result( result <= delta, s, function, line); seatest_simple_test_result( result <= delta, s, function, line);
} }
void seatest_assert_string_equal(char* expected, char* actual, const char* function, unsigned int line) void seatest_assert_string_equal(char* expected, char* actual, const char* function, unsigned int line)
{ {
char s[SEATEST_PRINT_BUFFER_SIZE]; char s[SEATEST_PRINT_BUFFER_SIZE];
sprintf(s, "Expected %s but was %s", expected, actual); sprintf(s, "Expected %s but was %s", expected, actual);
seatest_simple_test_result(strcmp(expected, actual)==0, s, function, line); seatest_simple_test_result(strcmp(expected, actual)==0, s, function, line);
} }
void seatest_assert_string_ends_with(char* expected, char* actual, const char* function, unsigned int line) void seatest_assert_string_ends_with(char* expected, char* actual, const char* function, unsigned int line)
{ {
char s[SEATEST_PRINT_BUFFER_SIZE]; char s[SEATEST_PRINT_BUFFER_SIZE];
sprintf(s, "Expected %s to end with %s", actual, expected); sprintf(s, "Expected %s to end with %s", actual, expected);
seatest_simple_test_result(strcmp(expected, actual+(strlen(actual)-strlen(expected)))==0, s, function, line); seatest_simple_test_result(strcmp(expected, actual+(strlen(actual)-strlen(expected)))==0, s, function, line);
} }
void seatest_assert_string_starts_with(char* expected, char* actual, const char* function, unsigned int line) void seatest_assert_string_starts_with(char* expected, char* actual, const char* function, unsigned int line)
{ {
char s[SEATEST_PRINT_BUFFER_SIZE]; char s[SEATEST_PRINT_BUFFER_SIZE];
sprintf(s, "Expected %s to start with %s", actual, expected); sprintf(s, "Expected %s to start with %s", actual, expected);
seatest_simple_test_result(strncmp(expected, actual, strlen(expected))==0, s, function, line); seatest_simple_test_result(strncmp(expected, actual, strlen(expected))==0, s, function, line);
} }
void seatest_assert_string_contains(char* expected, char* actual, const char* function, unsigned int line) void seatest_assert_string_contains(char* expected, char* actual, const char* function, unsigned int line)
{ {
char s[SEATEST_PRINT_BUFFER_SIZE]; char s[SEATEST_PRINT_BUFFER_SIZE];
sprintf(s, "Expected %s to be in %s", expected, actual); sprintf(s, "Expected %s to be in %s", expected, actual);
seatest_simple_test_result(strstr(actual, expected)!=0, s, function, line); seatest_simple_test_result(strstr(actual, expected)!=0, s, function, line);
} }
void seatest_assert_string_doesnt_contain(char* expected, char* actual, const char* function, unsigned int line) void seatest_assert_string_doesnt_contain(char* expected, char* actual, const char* function, unsigned int line)
{ {
char s[SEATEST_PRINT_BUFFER_SIZE]; char s[SEATEST_PRINT_BUFFER_SIZE];
sprintf(s, "Expected %s not to have %s in it", actual, expected); sprintf(s, "Expected %s not to have %s in it", actual, expected);
seatest_simple_test_result(strstr(actual, expected)==0, s, function, line); seatest_simple_test_result(strstr(actual, expected)==0, s, function, line);
} }
void seatest_run_test(void) void seatest_run_test(void)
{ {
sea_tests_run++; sea_tests_run++;
} }
void seatest_header_printer(char* s, int length, char f) void seatest_header_printer(char* s, int length, char f)
{ {
int l = strlen(s); int l = strlen(s);
int d = (length- (l + 2)) / 2; int d = (length- (l + 2)) / 2;
int i; int i;
for(i = 0; i<d; i++) printf("%c",f); for(i = 0; i<d; i++) printf("%c",f);
printf(" %s ", s); printf(" %s ", s);
for(i = (d+l+2); i<length; i++) printf("%c",f); for(i = (d+l+2); i<length; i++) printf("%c",f);
printf("\r\n"); printf("\r\n");
} }
void seatest_test_fixture_start(char* filepath) void seatest_test_fixture_start(char* filepath)
{ {
seatest_current_fixture = test_file_name(filepath); seatest_current_fixture = test_file_name(filepath);
seatest_header_printer(seatest_current_fixture, 50, '-'); seatest_header_printer(seatest_current_fixture, 50, '-');
seatest_fixture_tests_failed = sea_tests_failed; seatest_fixture_tests_failed = sea_tests_failed;
seatest_fixture_tests_run = sea_tests_run; seatest_fixture_tests_run = sea_tests_run;
seatest_fixture_teardown = 0; seatest_fixture_teardown = 0;
seatest_fixture_setup = 0; seatest_fixture_setup = 0;
} }
void seatest_test_fixture_end() void seatest_test_fixture_end()
{ {
char s[SEATEST_PRINT_BUFFER_SIZE]; char s[SEATEST_PRINT_BUFFER_SIZE];
sprintf(s, "%d run %d failed", sea_tests_run-seatest_fixture_tests_run, sea_tests_failed-seatest_fixture_tests_failed); sprintf(s, "%d run %d failed", sea_tests_run-seatest_fixture_tests_run, sea_tests_failed-seatest_fixture_tests_failed);
seatest_header_printer(s, 50, ' '); seatest_header_printer(s, 50, ' ');
printf("\r\n"); printf("\r\n");
} }
static char* seatest_fixture_filter = 0; static char* seatest_fixture_filter = 0;
static char* seatest_test_filter = 0; static char* seatest_test_filter = 0;
void fixture_filter(char* filter) void fixture_filter(char* filter)
{ {
seatest_fixture_filter = filter; seatest_fixture_filter = filter;
} }
void test_filter(char* filter) void test_filter(char* filter)
{ {
seatest_test_filter = filter; seatest_test_filter = filter;
} }
int seatest_should_run( char* fixture, char* test) int seatest_should_run( char* fixture, char* test)
{ {
int run = 1; int run = 1;
if(seatest_fixture_filter) if(seatest_fixture_filter)
{ {
if(strncmp(seatest_fixture_filter, fixture, strlen(seatest_fixture_filter)) != 0) run = 0; if(strncmp(seatest_fixture_filter, fixture, strlen(seatest_fixture_filter)) != 0) run = 0;
} }
if(seatest_test_filter) if(seatest_test_filter)
{ {
if(strncmp(seatest_test_filter, test, strlen(seatest_test_filter)) != 0) run = 0; if(strncmp(seatest_test_filter, test, strlen(seatest_test_filter)) != 0) run = 0;
} }
return run; return run;
} }
int run_tests(void (*tests)(void)) int run_tests(void (*tests)(void))
{ {
unsigned long end; unsigned long end;
unsigned long start = GetTickCount(); unsigned long start = GetTickCount();
tests(); tests();
end = GetTickCount(); end = GetTickCount();
printf("\r\n\r\n==================SEATEST v%s====================\r\n\r\n", SEATEST_VERSION); printf("\r\n\r\n==================SEATEST v%s====================\r\n\r\n", SEATEST_VERSION);
if (sea_tests_failed > 0) { if (sea_tests_failed > 0) {
printf(" Failed\r\n"); printf(" Failed\r\n");
} }
else { else {
printf(" ALL TESTS PASSED\r\n"); printf(" ALL TESTS PASSED\r\n");
} }
printf(" %d tests run\r\n", sea_tests_run); printf(" %d tests run\r\n", sea_tests_run);
printf(" in %lu ms\r\n",end - start); printf(" in %lu ms\r\n",end - start);
printf("==================================================\r\n"); printf("==================================================\r\n");
_getch(); _getch();
return sea_tests_failed == 0; return sea_tests_failed == 0;
} }

@ -1,74 +1,74 @@
#ifndef SEATEST_H #ifndef SEATEST_H
#define SEATEST_H #define SEATEST_H
#include <stdio.h> #include <stdio.h>
/* /*
Defines Defines
*/ */
#define SEATEST_VERSION "0.5" #define SEATEST_VERSION "0.5"
#define SEATEST_PROJECT_HOME "http://code.google.com/p/seatest/" #define SEATEST_PROJECT_HOME "http://code.google.com/p/seatest/"
#define SEATEST_PRINT_BUFFER_SIZE 100000 #define SEATEST_PRINT_BUFFER_SIZE 100000
/* /*
Declarations Declarations
*/ */
void seatest_test_fixture_start(char* filepath); void seatest_test_fixture_start(char* filepath);
void seatest_test_fixture_end( void ); void seatest_test_fixture_end( void );
void seatest_simple_test_result(int passed, char* reason, const char* function, unsigned int line); void seatest_simple_test_result(int passed, char* reason, const char* function, unsigned int line);
void seatest_assert_true(int test, const char* function, unsigned int line); void seatest_assert_true(int test, const char* function, unsigned int line);
void seatest_assert_false(int test, const char* function, unsigned int line); void seatest_assert_false(int test, const char* function, unsigned int line);
void seatest_assert_int_equal(int expected, int actual, const char* function, unsigned int line); void seatest_assert_int_equal(int expected, int actual, const char* function, unsigned int line);
void seatest_assert_ulong_equal(unsigned long expected, unsigned long actual, const char* function, unsigned int line); void seatest_assert_ulong_equal(unsigned long expected, unsigned long actual, const char* function, unsigned int line);
void seatest_assert_float_equal(float expected, float actual, float delta, const char* function, unsigned int line); void seatest_assert_float_equal(float expected, float actual, float delta, const char* function, unsigned int line);
void seatest_assert_double_equal(double expected, double actual, double delta, const char* function, unsigned int line); void seatest_assert_double_equal(double expected, double actual, double delta, const char* function, unsigned int line);
void seatest_assert_string_equal(char* expected, char* actual, const char* function, unsigned int line); void seatest_assert_string_equal(char* expected, char* actual, const char* function, unsigned int line);
void seatest_assert_string_ends_with(char* expected, char* actual, const char* function, unsigned int line); void seatest_assert_string_ends_with(char* expected, char* actual, const char* function, unsigned int line);
void seatest_assert_string_starts_with(char* expected, char* actual, const char* function, unsigned int line); void seatest_assert_string_starts_with(char* expected, char* actual, const char* function, unsigned int line);
void seatest_assert_string_contains(char* expected, char* actual, const char* function, unsigned int line); void seatest_assert_string_contains(char* expected, char* actual, const char* function, unsigned int line);
void seatest_assert_string_doesnt_contain(char* expected, char* actual, const char* function, unsigned int line); void seatest_assert_string_doesnt_contain(char* expected, char* actual, const char* function, unsigned int line);
int seatest_should_run( char* fixture, char* test); int seatest_should_run( char* fixture, char* test);
void seatest_run_test(void); void seatest_run_test(void);
void seatest_setup( void ); void seatest_setup( void );
void seatest_teardown( void ); void seatest_teardown( void );
void seatest_suite_teardown( void ); void seatest_suite_teardown( void );
void seatest_suite_setup( void ); void seatest_suite_setup( void );
/* /*
Assert Macros Assert Macros
*/ */
#define assert_true(test) do { seatest_assert_true(test, __FUNCTION__, __LINE__); } while (0) #define assert_true(test) do { seatest_assert_true(test, __FUNCTION__, __LINE__); } while (0)
#define assert_false(test) do { seatest_assert_false(test, __FUNCTION__, __LINE__); } while (0) #define assert_false(test) do { seatest_assert_false(test, __FUNCTION__, __LINE__); } while (0)
#define assert_int_equal(expected, actual) do { seatest_assert_int_equal(expected, actual, __FUNCTION__, __LINE__); } while (0) #define assert_int_equal(expected, actual) do { seatest_assert_int_equal(expected, actual, __FUNCTION__, __LINE__); } while (0)
#define assert_ulong_equal(expected, actual) do { seatest_assert_ulong_equal(expected, actual, __FUNCTION__, __LINE__); } while (0) #define assert_ulong_equal(expected, actual) do { seatest_assert_ulong_equal(expected, actual, __FUNCTION__, __LINE__); } while (0)
#define assert_string_equal(expected, actual) do { seatest_assert_string_equal(expected, actual, __FUNCTION__, __LINE__); } while (0) #define assert_string_equal(expected, actual) do { seatest_assert_string_equal(expected, actual, __FUNCTION__, __LINE__); } while (0)
#define assert_n_array_equal(expected, actual, n) do { int seatest_count; for(seatest_count=0; seatest_count<n; seatest_count++) { char s_seatest[SEATEST_PRINT_BUFFER_SIZE]; sprintf(s_seatest,"Expected %d to be %d at position %d", actual[seatest_count], expected[seatest_count], seatest_count); seatest_simple_test_result((expected[seatest_count] == actual[seatest_count]), s_seatest, __FUNCTION__, __LINE__);} } while (0) #define assert_n_array_equal(expected, actual, n) do { int seatest_count; for(seatest_count=0; seatest_count<n; seatest_count++) { char s_seatest[SEATEST_PRINT_BUFFER_SIZE]; sprintf(s_seatest,"Expected %d to be %d at position %d", actual[seatest_count], expected[seatest_count], seatest_count); seatest_simple_test_result((expected[seatest_count] == actual[seatest_count]), s_seatest, __FUNCTION__, __LINE__);} } while (0)
#define assert_bit_set(bit_number, value) { seatest_simple_test_result(((1 << bit_number) & value), " Expected bit to be set" , __FUNCTION__, __LINE__); } while (0) #define assert_bit_set(bit_number, value) { seatest_simple_test_result(((1 << bit_number) & value), " Expected bit to be set" , __FUNCTION__, __LINE__); } while (0)
#define assert_bit_not_set(bit_number, value) { seatest_simple_test_result(!((1 << bit_number) & value), " Expected bit not to to be set" , __FUNCTION__, __LINE__); } while (0) #define assert_bit_not_set(bit_number, value) { seatest_simple_test_result(!((1 << bit_number) & value), " Expected bit not to to be set" , __FUNCTION__, __LINE__); } while (0)
#define assert_bit_mask_matches(value, mask) { seatest_simple_test_result(((value & mask) == mask), " Expected all bits of mask to be set" , __FUNCTION__, __LINE__); } while (0) #define assert_bit_mask_matches(value, mask) { seatest_simple_test_result(((value & mask) == mask), " Expected all bits of mask to be set" , __FUNCTION__, __LINE__); } while (0)
#define assert_fail(message) { seatest_simple_test_result(0, message, __FUNCTION__, __LINE__); } while (0) #define assert_fail(message) { seatest_simple_test_result(0, message, __FUNCTION__, __LINE__); } while (0)
#define assert_float_equal(expected, actual, delta) do { seatest_assert_float_equal(expected, actual, delta, __FUNCTION__, __LINE__); } while (0) #define assert_float_equal(expected, actual, delta) do { seatest_assert_float_equal(expected, actual, delta, __FUNCTION__, __LINE__); } while (0)
#define assert_double_equal(expected, actual, delta) do { seatest_assert_double_equal(expected, actual, delta, __FUNCTION__, __LINE__); } while (0) #define assert_double_equal(expected, actual, delta) do { seatest_assert_double_equal(expected, actual, delta, __FUNCTION__, __LINE__); } while (0)
#define assert_string_contains(expected, actual) do { seatest_assert_string_contains(expected, actual, __FUNCTION__, __LINE__); } while (0) #define assert_string_contains(expected, actual) do { seatest_assert_string_contains(expected, actual, __FUNCTION__, __LINE__); } while (0)
#define assert_string_doesnt_contain(expected, actual) do { seatest_assert_string_doesnt_contain(expected, actual, __FUNCTION__, __LINE__); } while (0) #define assert_string_doesnt_contain(expected, actual) do { seatest_assert_string_doesnt_contain(expected, actual, __FUNCTION__, __LINE__); } while (0)
#define assert_string_starts_with(expected, actual) do { seatest_assert_string_starts_with(expected, actual, __FUNCTION__, __LINE__); } while (0) #define assert_string_starts_with(expected, actual) do { seatest_assert_string_starts_with(expected, actual, __FUNCTION__, __LINE__); } while (0)
#define assert_string_ends_with(expected, actual) do { seatest_assert_string_ends_with(expected, actual, __FUNCTION__, __LINE__); } while (0) #define assert_string_ends_with(expected, actual) do { seatest_assert_string_ends_with(expected, actual, __FUNCTION__, __LINE__); } while (0)
/* /*
Fixture / Test Management Fixture / Test Management
*/ */
void fixture_setup(void (*setup)( void )); void fixture_setup(void (*setup)( void ));
void fixture_teardown(void (*teardown)( void )); void fixture_teardown(void (*teardown)( void ));
#define run_test(test) do { if(seatest_should_run(__FILE__, #test)) {seatest_suite_setup(); seatest_setup(); test(); seatest_teardown(); seatest_suite_teardown(); seatest_run_test(); }} while (0) #define run_test(test) do { if(seatest_should_run(__FILE__, #test)) {seatest_suite_setup(); seatest_setup(); test(); seatest_teardown(); seatest_suite_teardown(); seatest_run_test(); }} while (0)
#define test_fixture_start() do { seatest_test_fixture_start(__FILE__); } while (0) #define test_fixture_start() do { seatest_test_fixture_start(__FILE__); } while (0)
#define test_fixture_end() do { seatest_test_fixture_end();} while (0) #define test_fixture_end() do { seatest_test_fixture_end();} while (0)
void fixture_filter(char* filter); void fixture_filter(char* filter);
void test_filter(char* filter); void test_filter(char* filter);
int run_tests(void (*tests)(void)); int run_tests(void (*tests)(void));
void suite_teardown(void (*teardown)( void )); void suite_teardown(void (*teardown)( void ));
void suite_setup(void (*setup)( void )); void suite_setup(void (*setup)( void ));
#endif #endif

@ -57,9 +57,8 @@ int json_get_field(struct sip_msg* msg, char* json, char* field, char* dst)
j = json_tokener_parse(json_s.s); j = json_tokener_parse(json_s.s);
if (is_error(j)) { if (j==NULL) {
LM_ERR("empty or invalid JSON\n"); LM_ERR("empty or invalid JSON\n");
if(j!=NULL) json_object_put(j);
return -1; return -1;
} }
@ -75,6 +74,6 @@ int json_get_field(struct sip_msg* msg, char* json, char* field, char* dst)
ret = -1; ret = -1;
} }
if(j!=NULL) json_object_put(j); json_object_put(j);
return ret; return ret;
} }

@ -701,8 +701,7 @@ static int mod_init(void)
LM_ERR("no memory for gw table\n"); LM_ERR("no memory for gw table\n");
goto err; goto err;
} }
memset(gw_pt[i], 0, sizeof(struct gw_info *) * memset(gw_pt[i], 0, sizeof(struct gw_info) * (lcr_gw_count_param + 1));
(lcr_gw_count_param + 1));
} }
/* Allocate and initialize locks */ /* Allocate and initialize locks */
@ -2461,8 +2460,8 @@ static int next_gw(struct sip_msg* _m, char* _s1, char* _s2)
* Take Request-URI user from ruri_user_avp and generate Request * Take Request-URI user from ruri_user_avp and generate Request
* and Destination URIs. */ * and Destination URIs. */
if (!generate_uris(_m, r_uri, &(ruri_user_val.s), &r_uri_len, dst_uri, if (generate_uris(_m, r_uri, &(ruri_user_val.s), &r_uri_len, dst_uri,
&dst_uri_len, &addr, &gw_index, &flags, &tag_str)) { &dst_uri_len, &addr, &gw_index, &flags, &tag_str) <= 0) {
return -1; return -1;
} }
} }
@ -2470,7 +2469,10 @@ static int next_gw(struct sip_msg* _m, char* _s1, char* _s2)
/* Rewrite Request URI */ /* Rewrite Request URI */
uri_str.s = r_uri; uri_str.s = r_uri;
uri_str.len = r_uri_len; uri_str.len = r_uri_len;
rewrite_uri(_m, &uri_str); if(rewrite_uri(_m, &uri_str)<0) {
LM_ERR("failed to rewrite uri\n");
return -1;
}
/* Set Destination URI if not empty */ /* Set Destination URI if not empty */
if (dst_uri_len > 0) { if (dst_uri_len > 0) {
@ -2479,7 +2481,7 @@ static int next_gw(struct sip_msg* _m, char* _s1, char* _s2)
LM_DBG("setting du to <%.*s>\n", uri_str.len, uri_str.s); LM_DBG("setting du to <%.*s>\n", uri_str.len, uri_str.s);
rval = set_dst_uri(_m, &uri_str); rval = set_dst_uri(_m, &uri_str);
if (rval != 0) { if (rval != 0) {
LM_ERR("calling do_action failed with return value <%d>\n", rval); LM_ERR("calling set dst uri failed with return value <%d>\n", rval);
return -1; return -1;
} }

@ -51,10 +51,10 @@ extern int _mt_allow_duplicates;
/** structures containing prefix-value pairs */ /** structures containing prefix-value pairs */
static m_tree_t **_ptree = NULL; static m_tree_t **_ptree = NULL;
/* quick transaltion table */ /* quick translation table */
#define MT_CHAR_TABLE_SIZE 256 #define MT_CHAR_TABLE_SIZE 256
#define MT_CHAR_TABLE_NOTSET 255 #define MT_CHAR_TABLE_NOTSET 255
unsigned char _mt_char_table[MT_CHAR_TABLE_SIZE]; static unsigned char _mt_char_table[MT_CHAR_TABLE_SIZE];
/** /**
* *
@ -66,12 +66,8 @@ void mt_char_table_init(void)
_mt_char_table[i] = MT_CHAR_TABLE_NOTSET; _mt_char_table[i] = MT_CHAR_TABLE_NOTSET;
} }
for(i=0; i<mt_char_list.len; i++) { for(i=0; i<mt_char_list.len; i++) {
if((unsigned int)mt_char_list.s[i]>=MT_CHAR_TABLE_SIZE) { unsigned char ch = mt_char_list.s[i];
LM_ERR("char at position %u in [%.*s] is out of range - skipping\n", _mt_char_table[ch] = (unsigned char)i;
i, mt_char_list.len, mt_char_list.s);
continue;
}
_mt_char_table[(unsigned int)mt_char_list.s[i]] = (unsigned char)i;
} }
} }
@ -204,6 +200,7 @@ int mt_add_to_tree(m_tree_t *pt, str *sp, str *svalue)
int l, ivalue = 0; int l, ivalue = 0;
mt_node_t *itn, *itn0; mt_node_t *itn, *itn0;
mt_is_t *tvalues; mt_is_t *tvalues;
unsigned char mtch;
if(pt==NULL || sp==NULL || sp->s==NULL if(pt==NULL || sp==NULL || sp->s==NULL
|| svalue==NULL || svalue->s==NULL) || svalue==NULL || svalue->s==NULL)
@ -241,18 +238,15 @@ int mt_add_to_tree(m_tree_t *pt, str *sp, str *svalue)
} }
itn0 = pt->head; itn0 = pt->head;
if((unsigned int)sp->s[l]>=MT_CHAR_TABLE_SIZE) {
LM_ERR("invalid range for char %d in prefix [%c (0x%x)]\n", mtch = _mt_char_table[(unsigned char)sp->s[l]];
l, sp->s[l], sp->s[l]); if(mtch==MT_CHAR_TABLE_NOTSET)
return -1;
}
if(_mt_char_table[(unsigned int)sp->s[l]]==MT_CHAR_TABLE_NOTSET)
{ {
LM_ERR("invalid char %d in prefix [%c (0x%x)]\n", LM_ERR("invalid char at %d in [%.*s] [%c (0x%x)]\n",
l, sp->s[l], sp->s[l]); l, sp->len, sp->s, sp->s[l], sp->s[l]);
return -1; return -1;
} }
itn = itn0[_mt_char_table[(unsigned int)sp->s[l]]].child; itn = itn0[mtch].child;
while(l < sp->len-1) while(l < sp->len-1)
{ {
@ -267,26 +261,22 @@ int mt_add_to_tree(m_tree_t *pt, str *sp, str *svalue)
memset(itn, 0, MT_NODE_SIZE*sizeof(mt_node_t)); memset(itn, 0, MT_NODE_SIZE*sizeof(mt_node_t));
pt->nrnodes++; pt->nrnodes++;
pt->memsize += MT_NODE_SIZE*sizeof(mt_node_t); pt->memsize += MT_NODE_SIZE*sizeof(mt_node_t);
itn0[_mt_char_table[(unsigned int)sp->s[l]]].child = itn; itn0[mtch].child = itn;
} }
l++;
if((unsigned int)sp->s[l]>=MT_CHAR_TABLE_SIZE) { l++;
LM_ERR("invalid range for char %d in prefix [%c (0x%x)]\n", mtch = _mt_char_table[(unsigned char)sp->s[l]];
l, sp->s[l], sp->s[l]); if(mtch==MT_CHAR_TABLE_NOTSET)
return -1;
}
if(_mt_char_table[(unsigned int)sp->s[l]]==MT_CHAR_TABLE_NOTSET)
{ {
LM_ERR("invalid char %d in prefix [%c (0x%x)]\n", LM_ERR("invalid char at %d in [%.*s]\n",
l, sp->s[l], sp->s[l]); l, sp->len, sp->s);
return -1; return -1;
} }
itn0 = itn; itn0 = itn;
itn = itn0[_mt_char_table[(unsigned int)sp->s[l]]].child; itn = itn0[mtch].child;
} }
if(itn0[_mt_char_table[(unsigned int)sp->s[l]]].tvalues != NULL) { if(itn0[mtch].tvalues != NULL) {
if(_mt_ignore_duplicates != 0) { if(_mt_ignore_duplicates != 0) {
LM_NOTICE("prefix already allocated [%.*s/%.*s]\n", LM_NOTICE("prefix already allocated [%.*s/%.*s]\n",
sp->len, sp->s, svalue->len, svalue->s); sp->len, sp->s, svalue->len, svalue->s);
@ -319,11 +309,9 @@ int mt_add_to_tree(m_tree_t *pt, str *sp, str *svalue)
strncpy(tvalues->tvalue.s.s, svalue->s, svalue->len); strncpy(tvalues->tvalue.s.s, svalue->s, svalue->len);
tvalues->tvalue.s.s[svalue->len] = '\0'; tvalues->tvalue.s.s[svalue->len] = '\0';
} }
tvalues->next = itn0[_mt_char_table[(unsigned int)sp->s[l]]].tvalues; tvalues->next = itn0[mtch].tvalues;
itn0[_mt_char_table[(unsigned int)sp->s[l]]].tvalues = tvalues; itn0[mtch].tvalues = tvalues;
mt_node_set_payload(&itn0[mtch], pt->type);
mt_node_set_payload(&itn0[_mt_char_table[(unsigned int)sp->s[l]]],
pt->type);
return 0; return 0;
} }
@ -382,26 +370,22 @@ is_t* mt_get_tvalue(m_tree_t *pt, str *tomatch, int *len)
while(itn!=NULL && l < tomatch->len && l < MT_MAX_DEPTH) while(itn!=NULL && l < tomatch->len && l < MT_MAX_DEPTH)
{ {
/* check range */ unsigned char mtch = _mt_char_table[(unsigned char)tomatch->s[l]];
if((unsigned int)tomatch->s[l]>=MT_CHAR_TABLE_SIZE) {
LM_DBG("out of range char at %d in [%.*s]\n",
l, tomatch->len, tomatch->s);
return NULL;
}
/* check validity */ /* check validity */
if(_mt_char_table[(unsigned int)tomatch->s[l]]==MT_CHAR_TABLE_NOTSET) if(mtch==MT_CHAR_TABLE_NOTSET)
{ {
LM_DBG("not matching char at %d in [%.*s]\n", LM_DBG("not matching char at %d in [%.*s]\n",
l, tomatch->len, tomatch->s); l, tomatch->len, tomatch->s);
return NULL; return NULL;
} }
if(itn[_mt_char_table[(unsigned int)tomatch->s[l]]].tvalues!=NULL) if(itn[mtch].tvalues!=NULL)
{ {
tvalue = &itn[_mt_char_table[(unsigned int)tomatch->s[l]]].tvalues->tvalue; tvalue = &itn[mtch].tvalues->tvalue;
} }
itn = itn[_mt_char_table[(unsigned int)tomatch->s[l]]].child; itn = itn[mtch].child;
l++; l++;
} }
@ -435,19 +419,15 @@ int mt_add_tvalues(struct sip_msg *msg, m_tree_t *pt, str *tomatch)
itn = pt->head; itn = pt->head;
while (itn != NULL && l < tomatch->len && l < MT_MAX_DEPTH) { while (itn != NULL && l < tomatch->len && l < MT_MAX_DEPTH) {
/* check range */ unsigned char mtch = _mt_char_table[(unsigned char)tomatch->s[l]];
if((unsigned int)tomatch->s[l]>=MT_CHAR_TABLE_SIZE) {
LM_DBG("out of range char at %d in [%.*s]\n",
l, tomatch->len, tomatch->s);
return -1;
}
/* check validity */ /* check validity */
if(_mt_char_table[(unsigned int)tomatch->s[l]]==MT_CHAR_TABLE_NOTSET) { if(mtch==MT_CHAR_TABLE_NOTSET) {
LM_ERR("invalid char at %d in [%.*s]\n", LM_ERR("invalid char at %d in [%.*s]\n",
l, tomatch->len, tomatch->s); l, tomatch->len, tomatch->s);
return -1; return -1;
} }
tvalues = itn[_mt_char_table[(unsigned int)tomatch->s[l]]].tvalues; tvalues = itn[mtch].tvalues;
while (tvalues != NULL) { while (tvalues != NULL) {
if (pt->type == MT_TREE_IVAL) { if (pt->type == MT_TREE_IVAL) {
val.n = tvalues->tvalue.n; val.n = tvalues->tvalue.n;
@ -465,7 +445,7 @@ int mt_add_tvalues(struct sip_msg *msg, m_tree_t *pt, str *tomatch)
tvalues = tvalues->next; tvalues = tvalues->next;
} }
itn = itn[_mt_char_table[(unsigned int)tomatch->s[l]]].child; itn = itn[mtch].child;
l++; l++;
} }
@ -550,23 +530,19 @@ int mt_match_prefix(struct sip_msg *msg, m_tree_t *it,
while(itn!=NULL && l < tomatch->len && l < MT_MAX_DEPTH) while(itn!=NULL && l < tomatch->len && l < MT_MAX_DEPTH)
{ {
/* check range */ unsigned char mtch = _mt_char_table[(unsigned char)tomatch->s[l]];
if((unsigned int)tomatch->s[l]>=MT_CHAR_TABLE_SIZE) {
LM_DBG("out of range char at %d in [%.*s]\n",
l, tomatch->len, tomatch->s);
return -1;
}
/* check validity */ /* check validity */
if(_mt_char_table[(unsigned int)tomatch->s[l]]==MT_CHAR_TABLE_NOTSET) if(mtch==MT_CHAR_TABLE_NOTSET)
{ {
LM_ERR("invalid char at %d in [%.*s]\n", LM_ERR("invalid char at %d in [%.*s]\n",
l, tomatch->len, tomatch->s); l, tomatch->len, tomatch->s);
return -1; return -1;
} }
if(itn[_mt_char_table[(unsigned int)tomatch->s[l]]].tvalues!=NULL) if(itn[mtch].tvalues!=NULL)
{ {
dw = (mt_dw_t*)itn[_mt_char_table[(unsigned int)tomatch->s[l]]].data; dw = (mt_dw_t*)itn[mtch].data;
while(dw) { while(dw) {
tmp_list[2*n]=dw->dstid; tmp_list[2*n]=dw->dstid;
tmp_list[2*n+1]=dw->weight; tmp_list[2*n+1]=dw->weight;
@ -580,7 +556,7 @@ int mt_match_prefix(struct sip_msg *msg, m_tree_t *it,
if(n==MT_MAX_DST_LIST) if(n==MT_MAX_DST_LIST)
break; break;
itn = itn[_mt_char_table[(unsigned int)tomatch->s[l]]].child; itn = itn[mtch].child;
l++; l++;
} }
@ -1189,30 +1165,27 @@ int mt_rpc_add_tvalues(rpc_t* rpc, void* ctx, m_tree_t *pt, str *tomatch)
mt_node_t *itn; mt_node_t *itn;
mt_is_t *tvalues; mt_is_t *tvalues;
void *vstruct = NULL; void *vstruct = NULL;
str prefix = *tomatch; str prefix = STR_NULL;
if (pt == NULL || tomatch == NULL || tomatch->s == NULL) { if (pt == NULL || tomatch == NULL || tomatch->s == NULL) {
LM_ERR("bad parameters\n"); LM_ERR("bad parameters\n");
return -1; return -1;
} }
prefix = *tomatch;
l = 0; l = 0;
itn = pt->head; itn = pt->head;
while (itn != NULL && l < tomatch->len && l < MT_MAX_DEPTH) { while (itn != NULL && l < tomatch->len && l < MT_MAX_DEPTH) {
/* check range */ unsigned char mtch = _mt_char_table[(unsigned char)tomatch->s[l]];
if((unsigned int)tomatch->s[l]>=MT_CHAR_TABLE_SIZE) {
LM_DBG("out of range char at %d in [%.*s]\n",
l, tomatch->len, tomatch->s);
return -1;
}
/* check validity */ /* check validity */
if(_mt_char_table[(unsigned int)tomatch->s[l]]==MT_CHAR_TABLE_NOTSET) { if(mtch==MT_CHAR_TABLE_NOTSET) {
LM_ERR("invalid char at %d in [%.*s]\n", LM_ERR("invalid char at %d in [%.*s]\n",
l, tomatch->len, tomatch->s); l, tomatch->len, tomatch->s);
return -1; return -1;
} }
tvalues = itn[_mt_char_table[(unsigned int)tomatch->s[l]]].tvalues; tvalues = itn[mtch].tvalues;
while (tvalues != NULL) { while (tvalues != NULL) {
prefix.len = l+1; prefix.len = l+1;
if (rpc->add(ctx, "{", &vstruct) < 0) { if (rpc->add(ctx, "{", &vstruct) < 0) {
@ -1237,7 +1210,7 @@ int mt_rpc_add_tvalues(rpc_t* rpc, void* ctx, m_tree_t *pt, str *tomatch)
tvalues = tvalues->next; tvalues = tvalues->next;
} }
itn = itn[_mt_char_table[(unsigned int)tomatch->s[l]]].child; itn = itn[mtch].child;
l++; l++;
} }
@ -1255,7 +1228,7 @@ int mt_rpc_match_prefix(rpc_t* rpc, void* ctx, m_tree_t *it,
is_t *tvalue; is_t *tvalue;
mt_dw_t *dw; mt_dw_t *dw;
int tprefix_len = 0; int tprefix_len = 0;
str prefix = *tomatch; str prefix = STR_NULL;
void *vstruct = NULL; void *vstruct = NULL;
#define MT_MAX_DST_LIST 64 #define MT_MAX_DST_LIST 64
@ -1267,6 +1240,7 @@ int mt_rpc_match_prefix(rpc_t* rpc, void* ctx, m_tree_t *it,
LM_ERR("bad parameters\n"); LM_ERR("bad parameters\n");
return -1; return -1;
} }
prefix = *tomatch;
if (rpc->add(ctx, "S", &it->tname) < 0) { if (rpc->add(ctx, "S", &it->tname) < 0) {
rpc->fault(ctx, 500, "Internal error adding tname"); rpc->fault(ctx, 500, "Internal error adding tname");
@ -1316,23 +1290,19 @@ int mt_rpc_match_prefix(rpc_t* rpc, void* ctx, m_tree_t *it,
while(itn!=NULL && l < tomatch->len && l < MT_MAX_DEPTH) while(itn!=NULL && l < tomatch->len && l < MT_MAX_DEPTH)
{ {
/* check range */ unsigned char mtch = _mt_char_table[(unsigned char)tomatch->s[l]];
if((unsigned int)tomatch->s[l]>=MT_CHAR_TABLE_SIZE) {
LM_DBG("out of range char at %d in [%.*s]\n",
l, tomatch->len, tomatch->s);
return -1;
}
/* check validity */ /* check validity */
if(_mt_char_table[(unsigned int)tomatch->s[l]]==MT_CHAR_TABLE_NOTSET) if(mtch==MT_CHAR_TABLE_NOTSET)
{ {
LM_ERR("invalid char at %d in [%.*s]\n", LM_ERR("invalid char at %d in [%.*s]\n",
l, tomatch->len, tomatch->s); l, tomatch->len, tomatch->s);
return -1; return -1;
} }
if(itn[_mt_char_table[(unsigned int)tomatch->s[l]]].tvalues!=NULL) if(itn[mtch].tvalues!=NULL)
{ {
dw = (mt_dw_t*)itn[_mt_char_table[(unsigned int)tomatch->s[l]]].data; dw = (mt_dw_t*)itn[mtch].data;
while(dw) { while(dw) {
tmp_list[2*n]=dw->dstid; tmp_list[2*n]=dw->dstid;
tmp_list[2*n+1]=dw->weight; tmp_list[2*n+1]=dw->weight;
@ -1346,7 +1316,7 @@ int mt_rpc_match_prefix(rpc_t* rpc, void* ctx, m_tree_t *it,
if(n==MT_MAX_DST_LIST) if(n==MT_MAX_DST_LIST)
break; break;
itn = itn[_mt_char_table[(unsigned int)tomatch->s[l]]].child; itn = itn[mtch].child;
l++; l++;
} }

@ -777,16 +777,20 @@ static int mt_load_db_trees()
{ {
/* check for NULL values ?!?! */ /* check for NULL values ?!?! */
tname.s = (char*)(RES_ROWS(db_res)[i].values[0].val.string_val); tname.s = (char*)(RES_ROWS(db_res)[i].values[0].val.string_val);
tname.len = strlen(tname.s);
tprefix.s = (char*)(RES_ROWS(db_res)[i].values[1].val.string_val); tprefix.s = (char*)(RES_ROWS(db_res)[i].values[1].val.string_val);
tprefix.len = strlen(tprefix.s);
tvalue.s = (char*)(RES_ROWS(db_res)[i].values[2].val.string_val); tvalue.s = (char*)(RES_ROWS(db_res)[i].values[2].val.string_val);
if(tprefix.s==NULL || tvalue.s==NULL || tname.s==NULL)
{
LM_ERR("Error - null fields in db\n");
continue;
}
tname.len = strlen(tname.s);
tprefix.len = strlen(tprefix.s);
tvalue.len = strlen(tvalue.s); tvalue.len = strlen(tvalue.s);
if(tprefix.s==NULL || tvalue.s==NULL || tname.s==NULL || if(tname.len<=0 || tprefix.len<=0 || tvalue.len<=0)
tprefix.len<=0 || tvalue.len<=0 || tname.len<=0)
{ {
LM_ERR("Error - bad values in db\n"); LM_ERR("Error - bad values in db\n");
continue; continue;

@ -252,7 +252,7 @@ Chapter 1. Admin Guide
Example 1.1. Set force_socket parameter Example 1.1. Set force_socket parameter
... ...
modparam("nathelper", "force_socket", "localhost:33333") modparam("nathelper", "force_socket", "127.0.0.1:5060")
... ...
4.2. natping_interval (integer) 4.2. natping_interval (integer)

@ -139,7 +139,7 @@
<title>Set <varname>force_socket</varname> parameter</title> <title>Set <varname>force_socket</varname> parameter</title>
<programlisting format="linespecific"> <programlisting format="linespecific">
... ...
modparam("nathelper", "force_socket", "localhost:33333") modparam("nathelper", "force_socket", "127.0.0.1:5060")
... ...
</programlisting> </programlisting>
</example> </example>

@ -606,6 +606,8 @@ mod_init(void)
struct in_addr addr; struct in_addr addr;
pv_spec_t avp_spec; pv_spec_t avp_spec;
str s; str s;
int port, proto;
str host;
if(register_mi_mod(exports.name, mi_cmds)!=0) if(register_mi_mod(exports.name, mi_cmds)!=0)
{ {
@ -631,8 +633,13 @@ mod_init(void)
rcv_avp_type = 0; rcv_avp_type = 0;
} }
if (force_socket_str.s && force_socket_str.len>0) { if(force_socket_str.s && force_socket_str.len > 0) {
force_socket=grep_sock_info(&force_socket_str,0,0); if(parse_phostport(force_socket_str.s, &host.s, &host.len, &port, &proto) == 0) {
force_socket = grep_sock_info(&host, port, proto);
if(force_socket == 0) {
LM_ERR("non-local force_socket <%s>\n", force_socket_str.s);
}
}
} }
/* create raw socket? */ /* create raw socket? */

@ -621,21 +621,25 @@ int pdt_load_db(void)
{ {
/* check for NULL values ?!?! */ /* check for NULL values ?!?! */
sdomain.s = (char*)(RES_ROWS(db_res)[i].values[0].val.string_val); sdomain.s = (char*)(RES_ROWS(db_res)[i].values[0].val.string_val);
sdomain.len = strlen(sdomain.s);
p.s = (char*)(RES_ROWS(db_res)[i].values[1].val.string_val); p.s = (char*)(RES_ROWS(db_res)[i].values[1].val.string_val);
p.len = strlen(p.s);
d.s = (char*)(RES_ROWS(db_res)[i].values[2].val.string_val); d.s = (char*)(RES_ROWS(db_res)[i].values[2].val.string_val);
if(p.s==NULL || d.s==NULL || sdomain.s==NULL)
{
LM_ERR("Error - bad values in db\n");
continue;
}
sdomain.len = strlen(sdomain.s);
p.len = strlen(p.s);
d.len = strlen(d.s); d.len = strlen(d.s);
if(p.s==NULL || d.s==NULL || sdomain.s==NULL || if(p.len<=0 || d.len<=0 || sdomain.len<=0)
p.len<=0 || d.len<=0 || sdomain.len<=0)
{ {
LM_ERR("Error - bad values in db\n"); LM_ERR("Error - bad values in db\n");
continue; continue;
} }
if(pdt_check_domain!=0 && _ptree_new!=NULL if(pdt_check_domain!=0 && _ptree_new!=NULL
&& pdt_check_pd(_ptree_new, &sdomain, &p, &d)==1) && pdt_check_pd(_ptree_new, &sdomain, &p, &d)==1)
{ {

@ -1148,9 +1148,12 @@ done:
if(rules_doc->s) if(rules_doc->s)
pkg_free(rules_doc->s); pkg_free(rules_doc->s);
pkg_free(rules_doc); pkg_free(rules_doc);
rules_doc = NULL;
} }
if(pres_uri.s) if(pres_uri.s) {
pkg_free(pres_uri.s); pkg_free(pres_uri.s);
pres_uri.s = NULL;
}
if (pa_dbf.end_transaction) if (pa_dbf.end_transaction)
{ {
@ -1189,7 +1192,6 @@ error:
} }
if(pres_uri.s) { if(pres_uri.s) {
pkg_free(pres_uri.s); pkg_free(pres_uri.s);
pres_uri.s = NULL;
} }
if (pa_dbf.abort_transaction) { if (pa_dbf.abort_transaction) {

@ -730,19 +730,19 @@ int sbranch_append(sip_msg_t *msg)
uri.s = br->uri; uri.s = br->uri;
uri.len = br->len; uri.len = br->len;
if(br->dst_uri_len==0) { if(br->dst_uri_len) {
duri.s = br->dst_uri; duri.s = br->dst_uri;
duri.len = br->dst_uri_len; duri.len = br->dst_uri_len;
} }
if(br->path_len==0) { if(br->path_len) {
path.s = br->path; path.s = br->path;
path.len = br->path_len; path.len = br->path_len;
} }
if(br->ruid_len==0) { if(br->ruid_len) {
ruid.s = br->ruid; ruid.s = br->ruid;
ruid.len = br->ruid_len; ruid.len = br->ruid_len;
} }
if(br->location_ua_len==0) { if(br->location_ua_len) {
location_ua.s = br->location_ua; location_ua.s = br->location_ua;
location_ua.len = br->location_ua_len; location_ua.len = br->location_ua_len;
} }

@ -66,6 +66,7 @@ script_var_t* add_var(str *name, int vtype)
if(it->name.s==0) if(it->name.s==0)
{ {
pkg_free(it);
LM_ERR("out of pkg mem!\n"); LM_ERR("out of pkg mem!\n");
return 0; return 0;
} }

@ -431,9 +431,7 @@ static int load_pcres(int action)
LM_ERR("no more memory for pcres\n"); LM_ERR("no more memory for pcres\n");
goto err; goto err;
} }
for (i=0; i<num_pcres_tmp; i++) { memset(pcres, 0, sizeof(pcre *) * num_pcres_tmp);
pcres[i] = NULL;
}
for (i=0; i<num_pcres_tmp; i++) { for (i=0; i<num_pcres_tmp; i++) {
pcre_rc = pcre_fullinfo(pcres_tmp[i], NULL, PCRE_INFO_SIZE, &pcre_size); pcre_rc = pcre_fullinfo(pcres_tmp[i], NULL, PCRE_INFO_SIZE, &pcre_size);
if ((pcres[i] = shm_malloc(pcre_size)) == 0) { if ((pcres[i] = shm_malloc(pcre_size)) == 0) {
@ -450,6 +448,10 @@ static int load_pcres(int action)
pkg_free(pcres_tmp[i]); pkg_free(pcres_tmp[i]);
} }
pkg_free(pcres_tmp); pkg_free(pcres_tmp);
/* Free allocated slots for unused patterns */
for (i = num_pcres_tmp; i < max_groups; i++) {
pkg_free(patterns[i]);
}
pkg_free(patterns); pkg_free(patterns);
lock_release(reload_lock); lock_release(reload_lock);

@ -729,6 +729,7 @@ int registered4(struct sip_msg* _m, udomain_t* _d, str* _uri, int match_flag, in
} }
} }
get_act_time();
for (ptr = r->contacts; ptr; ptr = ptr->next) { for (ptr = r->contacts; ptr; ptr = ptr->next) {
if(!VALID_CONTACT(ptr, act_time)) continue; if(!VALID_CONTACT(ptr, act_time)) continue;
if (match_callid.s && /* optionally enforce tighter matching w/ Call-ID */ if (match_callid.s && /* optionally enforce tighter matching w/ Call-ID */

@ -228,9 +228,11 @@ int delete_expired_subs_rlsdb( void )
} }
pkg_free(rlsubs_did.s); pkg_free(rlsubs_did.s);
rlsubs_did.s = NULL;
} }
rls_dbf.free_result(rls_db, result); rls_dbf.free_result(rls_db, result);
result = NULL;
if (rls_dbf.end_transaction) if (rls_dbf.end_transaction)
{ {

@ -529,12 +529,12 @@ int record_route_preset(struct sip_msg* _m, str* _data)
} }
if (append_fromtag) { if (append_fromtag) {
if (parse_from_header(_m) < 0) { if (parse_from_header(_m) < 0 || get_from(_m)==NULL) {
LM_ERR("From parsing failed\n"); LM_ERR("From parsing failed\n");
ret = -2; ret = -2;
goto error; goto error;
} }
from = (struct to_body*)_m->from->parsed; from = get_from(_m);
} }
l = anchor_lump(_m, _m->headers->name.s - _m->buf, 0, HDR_RECORDROUTE_T); l = anchor_lump(_m, _m->headers->name.s - _m->buf, 0, HDR_RECORDROUTE_T);

@ -3185,6 +3185,7 @@ rtpengine_offer_answer(struct sip_msg *msg, const char *flags, int op, int more)
str body, newbody; str body, newbody;
struct lump *anchor; struct lump *anchor;
pv_value_t pv_val; pv_value_t pv_val;
str cur_body = {0, 0};
dict = rtpp_function_call_ok(&bencbuf, msg, op, flags, &body); dict = rtpp_function_call_ok(&bencbuf, msg, op, flags, &body);
if (!dict) if (!dict)
@ -3214,7 +3215,12 @@ rtpengine_offer_answer(struct sip_msg *msg, const char *flags, int op, int more)
pkg_free(newbody.s); pkg_free(newbody.s);
} else { } else {
anchor = del_lump(msg, body.s - msg->buf, body.len, 0); /* get the body from the message as body ptr may have changed */
cur_body.len = 0;
cur_body.s = get_body(msg);
cur_body.len = msg->buf + msg->len - cur_body.s;
anchor = del_lump(msg, cur_body.s - msg->buf, cur_body.len, 0);
if (!anchor) { if (!anchor) {
LM_ERR("del_lump failed\n"); LM_ERR("del_lump failed\n");
goto error_free; goto error_free;

@ -35,7 +35,7 @@ Daniel-Constantin Mierla
4.7. sdp_with_active_media(type) 4.7. sdp_with_active_media(type)
4.8. sdp_remove_media(type) 4.8. sdp_remove_media(type)
4.9. sdp_with_transport(type) 4.9. sdp_with_transport(type)
4.10. sdp_with_transport_like(string) 4.10. sdp_with_transport_like(type)
4.11. sdp_transport(pv) 4.11. sdp_transport(pv)
4.12. sdp_remove_transport(type) 4.12. sdp_remove_transport(type)
4.13. sdp_with_codecs_by_id(list) 4.13. sdp_with_codecs_by_id(list)
@ -90,7 +90,7 @@ Chapter 1. Admin Guide
4.7. sdp_with_active_media(type) 4.7. sdp_with_active_media(type)
4.8. sdp_remove_media(type) 4.8. sdp_remove_media(type)
4.9. sdp_with_transport(type) 4.9. sdp_with_transport(type)
4.10. sdp_with_transport_like(string) 4.10. sdp_with_transport_like(type)
4.11. sdp_transport(pv) 4.11. sdp_transport(pv)
4.12. sdp_remove_transport(type) 4.12. sdp_remove_transport(type)
4.13. sdp_with_codecs_by_id(list) 4.13. sdp_with_codecs_by_id(list)
@ -142,7 +142,7 @@ Chapter 1. Admin Guide
4.7. sdp_with_active_media(type) 4.7. sdp_with_active_media(type)
4.8. sdp_remove_media(type) 4.8. sdp_remove_media(type)
4.9. sdp_with_transport(type) 4.9. sdp_with_transport(type)
4.10. sdp_with_transport_like(string) 4.10. sdp_with_transport_like(type)
4.11. sdp_transport(pv) 4.11. sdp_transport(pv)
4.12. sdp_remove_transport(type) 4.12. sdp_remove_transport(type)
4.13. sdp_with_codecs_by_id(list) 4.13. sdp_with_codecs_by_id(list)
@ -321,26 +321,27 @@ sdp_remove_media("video");
4.9. sdp_with_transport(type) 4.9. sdp_with_transport(type)
Return true of the SDP has 'media=media port type ...' line. Useful to Return true of the SDP has 'media=media port type ...' line. Useful to
check the transport of the RTP sessions, such as 'RTP/AVP', 'RTP/SAVP' check the transport of the RTP sessions, such as 'RTP/AVP', 'RTP/SAVP',
or 'RTP/SAVPF'. The parameter can be static string or variable holding 'RTP/SAVPF' or 'UDP/TLS/RTP/SAVPF'. The parameter can be static string
the transport type. or variable holding the transport type. The function does an exact
match of the strings.
This function can be used from ANY_ROUTE. This function can be used from ANY_ROUTE.
Example 1.9. sdp_with_transport usage Example 1.9. sdp_with_transport usage
... ...
# check for RTP/SAVP stream # check for RTP/SAVP stream
if(sdp_with_transport("RTP/SAVP")) if(sdp_with_transport("UDP/TLS/RTP/SAVPF"))
{ {
# the session has a SRTP/SAVP stream # the session has a UDP/TLS/RTP/SAVPF stream
} }
... ...
4.10. sdp_with_transport_like(string) 4.10. sdp_with_transport_like(type)
Returns true if the SDP has 'media=media port type ...' line, where Returns true if the SDP has 'media=media port type ...' line, where
type contains string. The parameter can be static string or variable type contains the string in the parameter. The parameter can be static
holding a string. string or variable holding a string.
This function can be used from ANY_ROUTE. This function can be used from ANY_ROUTE.

@ -10,13 +10,13 @@
<!-- Module User's Guide --> <!-- Module User's Guide -->
<chapter> <chapter>
<title>&adminguide;</title> <title>&adminguide;</title>
<section> <section>
<title>Overview</title> <title>Overview</title>
<para> <para>
This module provides functions for checking and managing the This module provides functions for checking and managing the
<acronym>SDP</acronym> payloads of SIP messages. <acronym>SDP</acronym> payloads of SIP messages.
</para> </para>
<para> <para>
@ -311,9 +311,11 @@ sdp_remove_media("video");
<function moreinfo="none">sdp_with_transport(type)</function> <function moreinfo="none">sdp_with_transport(type)</function>
</title> </title>
<para> <para>
Return true of the SDP has 'media=media port type ...' line. Useful to check Return true of the SDP has 'media=media port type ...' line. Useful to
the transport of the RTP sessions, such as 'RTP/AVP', 'RTP/SAVP' or 'RTP/SAVPF'. The check the transport of the RTP sessions, such as 'RTP/AVP', 'RTP/SAVP',
parameter can be static string or variable holding the transport type. 'RTP/SAVPF' or 'UDP/TLS/RTP/SAVPF'. The parameter can be static string
or variable holding the transport type. The function does an exact
match of the strings.
</para> </para>
<para> <para>
This function can be used from ANY_ROUTE. This function can be used from ANY_ROUTE.
@ -323,9 +325,9 @@ sdp_remove_media("video");
<programlisting format="linespecific"> <programlisting format="linespecific">
... ...
# check for RTP/SAVP stream # check for RTP/SAVP stream
if(sdp_with_transport("RTP/SAVP")) if(sdp_with_transport("UDP/TLS/RTP/SAVPF"))
{ {
# the session has a SRTP/SAVP stream # the session has a UDP/TLS/RTP/SAVPF stream
} }
... ...
</programlisting> </programlisting>
@ -333,11 +335,11 @@ if(sdp_with_transport("RTP/SAVP"))
</section> </section>
<section id="sdpops.f.sdp_with_transport_like"> <section id="sdpops.f.sdp_with_transport_like">
<title> <title>
<function moreinfo="none">sdp_with_transport_like(string)</function> <function moreinfo="none">sdp_with_transport_like(type)</function>
</title> </title>
<para> <para>
Returns true if the SDP has 'media=media port type ...' line, Returns true if the SDP has 'media=media port type ...' line,
where type contains string. The where type contains the string in the parameter. The
parameter can be static string or variable holding a string. parameter can be static string or variable holding a string.
</para> </para>
<para> <para>

@ -257,7 +257,7 @@ enum hash_source source = hs_error;
//unsigned int rr_idx = 0; //unsigned int rr_idx = 0;
struct hep_timehdr* heptime; struct hep_timeinfo* heptime;
/*! \brief /*! \brief
* Exported functions * Exported functions
@ -1112,7 +1112,7 @@ static int child_init(int rank)
} }
heptime = (struct hep_timehdr*)pkg_malloc(sizeof(struct hep_timehdr)); heptime = (struct hep_timeinfo*)pkg_malloc(sizeof(struct hep_timeinfo));
if(heptime==NULL) { if(heptime==NULL) {
LM_ERR("no more pkg memory left\n"); LM_ERR("no more pkg memory left\n");
return -1; return -1;

@ -199,6 +199,7 @@ int sd_lookup(struct sip_msg* _msg, char* _table, char* _owner)
RES_ROWS(db_res)[0].values[0].val.blob_val.len); RES_ROWS(db_res)[0].values[0].val.blob_val.len);
user_s.len = RES_ROWS(db_res)[0].values[0].val.blob_val.len; user_s.len = RES_ROWS(db_res)[0].values[0].val.blob_val.len;
user_s.s[user_s.len] = '\0'; user_s.s[user_s.len] = '\0';
break;
default: default:
LM_ERR("unknown type of DB new_uri column\n"); LM_ERR("unknown type of DB new_uri column\n");
if (db_res != NULL && db_funcs.free_result(db_handle, db_res) < 0) if (db_res != NULL && db_funcs.free_result(db_handle, db_res) < 0)

@ -999,7 +999,7 @@ if (starts_with("$rU", "+358"))
The core will take care of the last boundary ending "--". Detecting The core will take care of the last boundary ending "--". Detecting
wich one is the last and fixing the others if needed. wich one is the last and fixing the others if needed.
Note: it may be required that msg_apply_changes() from textops module Note: it may be required that msg_apply_changes() from textopsx module
has to be executed if there are other operations over the new body. has to be executed if there are other operations over the new body.
Example 1.37. set_body_multipart usage Example 1.37. set_body_multipart usage

@ -1392,7 +1392,7 @@ if (starts_with("$rU", "+358"))
the last and fixing the others if needed. the last and fixing the others if needed.
</para> </para>
<para> <para>
Note: it may be required that msg_apply_changes() from textops module Note: it may be required that msg_apply_changes() from textopsx module
has to be executed if there are other operations over the new body. has to be executed if there are other operations over the new body.
</para> </para>
<example> <example>

@ -480,16 +480,25 @@ static int tls_foreach_CTX_in_cfg(tls_domains_cfg_t* cfg,
int fix_shm_pathname(str* path) int fix_shm_pathname(str* path)
{ {
str new_path; str new_path;
char* abs_path; char *abs_path;
if (path->s && path->len && *path->s != '.' && *path->s != '/') { if(path->s && path->len && *path->s != '.' && *path->s != '/') {
abs_path = get_abs_pathname(0, path); abs_path = get_abs_pathname(0, path);
if (abs_path == 0) return -1; if(abs_path == 0) {
LM_ERR("get abs pathname failed\n");
return -1;
}
new_path.len = strlen(abs_path); new_path.len = strlen(abs_path);
new_path.s = shm_malloc(new_path.len + 1); new_path.s = shm_malloc(new_path.len + 1);
if(new_path.s == 0) {
LM_ERR("no more shm memory\n");
pkg_free(abs_path);
return -1;
}
memcpy(new_path.s, abs_path, new_path.len); memcpy(new_path.s, abs_path, new_path.len);
new_path.s[new_path.len] = 0; new_path.s[new_path.len] = 0;
shm_free(path->s); shm_free(path->s);
pkg_free(abs_path);
*path = new_path; *path = new_path;
} }
return 0; return 0;

@ -778,4 +778,10 @@ void destroy_tls_h(void)
tls_destroy_cfg(); tls_destroy_cfg();
tls_destroy_locks(); tls_destroy_locks();
tls_ct_wq_destroy(); tls_ct_wq_destroy();
#if OPENSSL_VERSION_NUMBER >= 0x010100000L
/* explicit execution of libssl cleanup to avoid being executed again
* by atexit(), when shm is gone */
DBG("executing openssl v1.1+ cleanup\n");
OPENSSL_cleanup();
#endif
} }

@ -198,7 +198,11 @@ static int get_cipher(str* res, sip_msg_t* msg)
ERR("Cipher name too long\n"); ERR("Cipher name too long\n");
goto err; goto err;
} }
memcpy(buf, cipher.s, cipher.len); if(cipher.s!=NULL && cipher.len>0) {
memcpy(buf, cipher.s, cipher.len);
} else {
buf[0] = '\0';
}
res->s = buf; res->s = buf;
res->len = cipher.len; res->len = cipher.len;
tcpconn_put(c); tcpconn_put(c);
@ -298,7 +302,11 @@ static int get_version(str* res, sip_msg_t* msg)
ERR("Version string too long\n"); ERR("Version string too long\n");
goto err; goto err;
} }
memcpy(buf, version.s, version.len); if(version.s!=NULL && version.len>0) {
memcpy(buf, version.s, version.len);
} else {
buf[0] = '\0';
}
res->s = buf; res->s = buf;
res->len = version.len; res->len = version.len;
tcpconn_put(c); tcpconn_put(c);

@ -282,7 +282,7 @@ int t_relay_to( struct sip_msg *p_msg , struct proxy_l *proxy, int proto,
/* at this point if the msg is an ACK it is an e2e ACK and /* at this point if the msg is an ACK it is an e2e ACK and
e2e ACKs do not establish a transaction and are fwd-ed statelessly */ e2e ACKs do not establish a transaction and are fwd-ed statelessly */
if ( p_msg->REQ_METHOD==METHOD_ACK) { if ( p_msg->REQ_METHOD==METHOD_ACK) {
DBG( "SER: forwarding ACK statelessly \n"); DBG("forwarding ACK statelessly\n");
if (proxy==0) { if (proxy==0) {
init_dest_info(&dst); init_dest_info(&dst);
dst.proto=proto; dst.proto=proto;
@ -303,7 +303,11 @@ int t_relay_to( struct sip_msg *p_msg , struct proxy_l *proxy, int proto,
proxy2su(&dst.to, proxy); proxy2su(&dst.to, proxy);
/* dst->send_sock not set, but forward_request will take care /* dst->send_sock not set, but forward_request will take care
* of it */ * of it */
ret=forward_request( p_msg , 0, 0, &dst) ; ret=forward_request(p_msg, 0, 0, &dst);
}
if (ret>=0) {
/* convert return code for cfg script */
ret=1;
} }
goto done; goto done;
} }

@ -266,17 +266,35 @@ static inline int via_matching( struct via_body *inv_via,
* different senders generating the same tid * different senders generating the same tid
*/ */
if (inv_via->host.len!=ack_via->host.len) if (inv_via->host.len!=ack_via->host.len)
return 0;; return 0;
if (memcmp(inv_via->host.s, ack_via->host.s, if (memcmp(inv_via->host.s, ack_via->host.s,
ack_via->host.len)!=0) ack_via->host.len)!=0)
return 0; return 0;
if (inv_via->port!=ack_via->port) if (inv_via->port!=ack_via->port) {
return 0; if(inv_via->port==0
&& ack_via->port!=SIP_PORT && ack_via->port!=SIPS_PORT)
return 0;
if(ack_via->port==0
&& inv_via->port!=SIP_PORT && inv_via->port!=SIPS_PORT)
return 0;
}
if (inv_via->transport.len!=ack_via->transport.len) if (inv_via->transport.len!=ack_via->transport.len)
return 0; return 0;
if (memcmp(inv_via->transport.s, ack_via->transport.s, if (memcmp(inv_via->transport.s, ack_via->transport.s,
ack_via->transport.len)!=0) ack_via->transport.len)!=0)
return 0; return 0;
if (inv_via->port!=ack_via->port
&& (inv_via->port==0 || ack_via->port==0)) {
/* test SIPS_PORT (5061) is used with TLS transport */
if(inv_via->port==SIPS_PORT || ack_via->port==SIPS_PORT) {
if(inv_via->transport.len!=3
|| memcmp(inv_via->transport.s, "TLS", 3)!=0) {
return 0;
}
}
}
/* everything matched -- we found it */ /* everything matched -- we found it */
return 1; return 1;
} }

@ -250,6 +250,12 @@ static inline int t_uac_prepare(uac_req_t *uac_r,
/* new message => take the dialog send_socket if set, or the default /* new message => take the dialog send_socket if set, or the default
send_socket if not*/ send_socket if not*/
SND_FLAGS_INIT(&snd_flags); SND_FLAGS_INIT(&snd_flags);
if (uac_r->dialog->send_sock != NULL)
{
snd_flags.f |= SND_F_FORCE_SOCKET;
}
#ifdef USE_DNS_FAILOVER #ifdef USE_DNS_FAILOVER
if (cfg_get(core, core_cfg, use_dns_failover)){ if (cfg_get(core, core_cfg, use_dns_failover)){
dns_srv_handle_init(&dns_h); dns_srv_handle_init(&dns_h);

@ -337,15 +337,18 @@ static int t_cancel_branches(struct sip_msg* msg, char *k, char *s2)
init_cancel_info(&cancel_data); init_cancel_info(&cancel_data);
switch(n) { switch(n) {
case 1: case 1:
/* prepare cancel for every branch except idx */ /* prepare cancel for every branch except idx (others) */
_tmx_tmb.prepare_to_cancel(t, _tmx_tmb.prepare_to_cancel(t,
&cancel_data.cancel_bitmap, 1<<idx); &cancel_data.cancel_bitmap, 1<<idx);
break;
case 2: case 2:
/* prepare cancel for current branch (idx) */
if(msg->first_line.u.reply.statuscode>=200) if(msg->first_line.u.reply.statuscode>=200)
break; break;
cancel_data.cancel_bitmap = 1<<idx; cancel_data.cancel_bitmap = 1<<idx;
break; break;
default: default:
/* prepare cancel for all branches */
if (msg->first_line.u.reply.statuscode>=200) if (msg->first_line.u.reply.statuscode>=200)
/* prepare cancel for every branch except idx */ /* prepare cancel for every branch except idx */
_tmx_tmb.prepare_to_cancel(t, _tmx_tmb.prepare_to_cancel(t,

@ -260,7 +260,7 @@ int tmx_check_pretran(sip_msg_t *msg)
if(likely(vbr!=NULL)) { if(likely(vbr!=NULL)) {
svbranch = vbr->value; svbranch = vbr->value;
trim(&svbranch); trim(&svbranch);
dsize += svbranch.len; dsize += svbranch.len + 1;
} }
if(dsize<256) dsize = 256; if(dsize<256) dsize = 256;

@ -34,6 +34,7 @@ Daniel-Constantin Mierla
3.7. vparam_prefix (str) 3.7. vparam_prefix (str)
3.8. callid_prefix (str) 3.8. callid_prefix (str)
3.9. sanity_checks (integer) 3.9. sanity_checks (integer)
3.10. uri_prefix_checks (integer)
List of Examples List of Examples
@ -46,6 +47,7 @@ Daniel-Constantin Mierla
1.7. Set vparam_prefix parameter 1.7. Set vparam_prefix parameter
1.8. Set callid_prefix parameter 1.8. Set callid_prefix parameter
1.9. Set sanity_checks parameter 1.9. Set sanity_checks parameter
1.10. Set uri_prefix_checks parameter
Chapter 1. Admin Guide Chapter 1. Admin Guide
@ -68,6 +70,7 @@ Chapter 1. Admin Guide
3.7. vparam_prefix (str) 3.7. vparam_prefix (str)
3.8. callid_prefix (str) 3.8. callid_prefix (str)
3.9. sanity_checks (integer) 3.9. sanity_checks (integer)
3.10. uri_prefix_checks (integer)
1. Overview 1. Overview
@ -113,6 +116,7 @@ Chapter 1. Admin Guide
3.7. vparam_prefix (str) 3.7. vparam_prefix (str)
3.8. callid_prefix (str) 3.8. callid_prefix (str)
3.9. sanity_checks (integer) 3.9. sanity_checks (integer)
3.10. uri_prefix_checks (integer)
3.1. mask_key (str) 3.1. mask_key (str)
@ -226,3 +230,22 @@ modparam("topoh", "callid_prefix", "***")
... ...
modparam("topoh", "sanity_checks", 1) modparam("topoh", "sanity_checks", 1)
... ...
3.10. uri_prefix_checks (integer)
If set to 1, topoh module will check if URIs to be decoded match the
expected prefix composed from mask IP and parameter name prefix. It can
make the topoh processing safer by avoiding to try decoding URIs which
were not encoded previously by topoh.
Note: do not enable this option if you have SIP devices that can alter
the URI values it takes from Contact or Record-Route headers (like
adding port 5060 when no port is in received URIs, or thet introduce
new parameters at unknown position).
Default value is 0.
Example 1.10. Set uri_prefix_checks parameter
...
modparam("topoh", "uri_prefix_checks", 1)
...

@ -10,9 +10,9 @@
<!-- Module User's Guide --> <!-- Module User's Guide -->
<chapter> <chapter>
<title>&adminguide;</title> <title>&adminguide;</title>
<section> <section>
<title>Overview</title> <title>Overview</title>
<para> <para>
@ -253,7 +253,34 @@ modparam("topoh", "sanity_checks", 1)
</programlisting> </programlisting>
</example> </example>
</section> </section>
<section>
<title><varname>uri_prefix_checks</varname> (integer)</title>
<para>
If set to 1, topoh module will check if URIs to be decoded match
the expected prefix composed from mask IP and parameter name prefix.
It can make the topoh processing safer by avoiding to try decoding
URIs which were not encoded previously by topoh.
</para>
<para>
Note: do not enable this option if you have SIP devices that can
alter the URI values it takes from Contact or Record-Route headers
(like adding port 5060 when no port is in received URIs, or
thet introduce new parameters at unknown position).
</para>
<para>
<emphasis>
Default value is 0.
</emphasis>
</para>
<example>
<title>Set <varname>uri_prefix_checks</varname> parameter</title>
<programlisting format="linespecific">
...
modparam("topoh", "uri_prefix_checks", 1)
...
</programlisting>
</example>
</section>
</section> </section>
</chapter> </chapter>

@ -57,6 +57,7 @@ extern str th_vparam_prefix;
extern int th_param_mask_callid; extern int th_param_mask_callid;
extern int th_mask_addr_myself; extern int th_mask_addr_myself;
extern int th_uri_prefix_checks;
int th_skip_rw(char *s, int len) int th_skip_rw(char *s, int len)
{ {
@ -391,8 +392,8 @@ int th_unmask_via(sip_msg_t *msg, str *cookie)
if(i!=1) if(i!=1)
{ {
/* Skip if via is not encoded */ /* Skip if via is not encoded */
if (via->host.len!=th_ip.len if (th_uri_prefix_checks && (via->host.len!=th_ip.len
|| strncasecmp(via->host.s, th_ip.s, th_ip.len)!=0) || strncasecmp(via->host.s, th_ip.s, th_ip.len)!=0))
{ {
LM_DBG("via %d is not encoded",i); LM_DBG("via %d is not encoded",i);
continue; continue;
@ -687,10 +688,13 @@ int th_unmask_route(sip_msg_t *msg)
if(i!=1) if(i!=1)
{ {
/* Skip if route is not encoded */ /* Skip if route is not encoded */
if ((rr->nameaddr.uri.len<th_uri_prefix.len) || if (th_uri_prefix_checks
(strncasecmp(rr->nameaddr.uri.s,th_uri_prefix.s,th_uri_prefix.len)!=0)) && ((rr->nameaddr.uri.len<th_uri_prefix.len) ||
(strncasecmp(rr->nameaddr.uri.s,th_uri_prefix.s,
th_uri_prefix.len)!=0)))
{ {
LM_DBG("rr %d is not encoded: [%.*s]",i,rr->nameaddr.uri.len,rr->nameaddr.uri.s); LM_DBG("rr %d is not encoded: [%.*s]", i,
rr->nameaddr.uri.len, rr->nameaddr.uri.s);
rr = rr->next; rr = rr->next;
continue; continue;
} }
@ -736,8 +740,9 @@ int th_unmask_ruri(sip_msg_t *msg)
str out; str out;
/* Do nothing if ruri is not encoded */ /* Do nothing if ruri is not encoded */
if ((REQ_LINE(msg).uri.len<th_uri_prefix.len) || if (th_uri_prefix_checks && ((REQ_LINE(msg).uri.len<th_uri_prefix.len) ||
(strncasecmp(REQ_LINE(msg).uri.s,th_uri_prefix.s,th_uri_prefix.len)!=0)) (strncasecmp(REQ_LINE(msg).uri.s, th_uri_prefix.s,
th_uri_prefix.len)!=0)))
{ {
LM_DBG("ruri [%.*s] is not encoded",REQ_LINE(msg).uri.len,REQ_LINE(msg).uri.s); LM_DBG("ruri [%.*s] is not encoded",REQ_LINE(msg).uri.len,REQ_LINE(msg).uri.s);
return 0; return 0;
@ -798,8 +803,8 @@ int th_unmask_refer_to(sip_msg_t *msg)
uri = &(get_refer_to(msg)->uri); uri = &(get_refer_to(msg)->uri);
/* Do nothing if refer_to is not encoded */ /* Do nothing if refer_to is not encoded */
if ((uri->len<th_uri_prefix.len) if (th_uri_prefix_checks && ((uri->len<th_uri_prefix.len)
|| (strncasecmp(uri->s, th_uri_prefix.s, th_uri_prefix.len)!=0)) || (strncasecmp(uri->s, th_uri_prefix.s, th_uri_prefix.len)!=0)))
{ {
LM_DBG("refer-to [%.*s] is not encoded",uri->len,uri->s); LM_DBG("refer-to [%.*s] is not encoded",uri->len,uri->s);
return 0; return 0;

@ -74,11 +74,12 @@ str th_uri_prefix = {0, 0};
int th_param_mask_callid = 0; int th_param_mask_callid = 0;
int th_sanity_checks = 0; int th_sanity_checks = 0;
sanity_api_t scb; int th_uri_prefix_checks = 0;
int th_mask_addr_myself = 0; int th_mask_addr_myself = 0;
int th_msg_received(void *data); int th_msg_received(void *data);
int th_msg_sent(void *data); int th_msg_sent(void *data);
sanity_api_t scb;
/** module functions */ /** module functions */
static int mod_init(void); static int mod_init(void);
@ -93,6 +94,7 @@ static param_export_t params[]={
{"vparam_prefix", PARAM_STR, &th_vparam_prefix}, {"vparam_prefix", PARAM_STR, &th_vparam_prefix},
{"callid_prefix", PARAM_STR, &th_callid_prefix}, {"callid_prefix", PARAM_STR, &th_callid_prefix},
{"sanity_checks", PARAM_INT, &th_sanity_checks}, {"sanity_checks", PARAM_INT, &th_sanity_checks},
{"uri_prefix_checks", PARAM_INT, &th_uri_prefix_checks},
{0,0,0} {0,0,0}
}; };

@ -46,29 +46,31 @@ int ts_append(struct sip_msg* msg, str *ruri, char *table) {
int res; int res;
int appended; int appended;
lock_entry_by_ruri(ruri);
if (use_domain) { if (use_domain) {
t_uri = ruri; t_uri = ruri;
} } else {
else { if(parse_uri(ruri->s, ruri->len, &p_uri)<0) {
parse_uri(ruri->s, ruri->len, &p_uri); LM_ERR("failed to parse uri %.*s\n", ruri->len, ruri->s);
return -1;
}
t_uri = &p_uri.user; t_uri = &p_uri.user;
} }
lock_entry_by_ruri(t_uri);
res = get_ts_urecord(t_uri, &_r); res = get_ts_urecord(t_uri, &_r);
if (res != 0) { if (res != 0) {
LM_ERR("failed to retrieve record for %.*s\n", ruri->len, ruri->s); LM_ERR("failed to retrieve record for %.*s\n", t_uri->len, t_uri->s);
unlock_entry_by_ruri(ruri); unlock_entry_by_ruri(t_uri);
return -1; return -1;
} }
ptr = _r->transactions; ptr = _r->transactions;
while(ptr) { while(ptr) {
LM_DBG("transaction %u:%u found for %.*s, going to append branches\n",ptr->tindex, ptr->tlabel, ruri->len, ruri->s); LM_DBG("transaction %u:%u found for %.*s, going to append branches\n",ptr->tindex, ptr->tlabel, t_uri->len, t_uri->s);
appended = ts_append_to(msg, ptr->tindex, ptr->tlabel, table, ruri); appended = ts_append_to(msg, ptr->tindex, ptr->tlabel, table, ruri);
if (appended > 0) if (appended > 0)
@ -76,7 +78,7 @@ int ts_append(struct sip_msg* msg, str *ruri, char *table) {
ptr = ptr->next; ptr = ptr->next;
} }
unlock_entry_by_ruri(ruri); unlock_entry_by_ruri(t_uri);
return 1; return 1;
} }

@ -201,13 +201,13 @@ int wsconn_add(struct receive_info rcv, unsigned int sub_protocol)
LM_DBG("wsconn_add id [%d]\n", id); LM_DBG("wsconn_add id [%d]\n", id);
/* Allocate and fill in new WebSocket connection */ /* Allocate and fill in new WebSocket connection */
wsc = shm_malloc(sizeof(ws_connection_t) + BUF_SIZE); wsc = shm_malloc(sizeof(ws_connection_t) + BUF_SIZE + 1);
if (wsc == NULL) if (wsc == NULL)
{ {
LM_ERR("allocating shared memory\n"); LM_ERR("allocating shared memory\n");
return -1; return -1;
} }
memset(wsc, 0, sizeof(ws_connection_t) + BUF_SIZE); memset(wsc, 0, sizeof(ws_connection_t) + BUF_SIZE + 1);
wsc->id = id; wsc->id = id;
wsc->id_hash = id_hash; wsc->id_hash = id_hash;
wsc->state = WS_S_OPEN; wsc->state = WS_S_OPEN;

@ -214,13 +214,13 @@ static int encode_and_send_ws_frame(ws_frame_t *frame, conn_close_t conn_close)
/* Allocate send buffer and build frame */ /* Allocate send buffer and build frame */
frame_length = frame->payload_len + extended_length + 2; frame_length = frame->payload_len + extended_length + 2;
if ((send_buf = pkg_malloc(sizeof(unsigned char) * frame_length)) if ((send_buf = pkg_malloc(sizeof(char) * frame_length))
== NULL) == NULL)
{ {
LM_ERR("allocating send buffer from pkg memory\n"); LM_ERR("allocating send buffer from pkg memory\n");
return -1; return -1;
} }
memset(send_buf, 0, sizeof(unsigned char) * frame_length); memset(send_buf, 0, sizeof(char) * frame_length);
send_buf[pos++] = 0x80 | (frame->opcode & 0xff); send_buf[pos++] = 0x80 | (frame->opcode & 0xff);
if (extended_length == 0) if (extended_length == 0)
send_buf[pos++] = (frame->payload_len & 0xff); send_buf[pos++] = (frame->payload_len & 0xff);
@ -411,7 +411,7 @@ static int decode_and_validate_ws_frame(ws_frame_t *frame,
short *err_code, str *err_text) short *err_code, str *err_text)
{ {
unsigned int i, len = tcpinfo->len; unsigned int i, len = tcpinfo->len;
int mask_start, j; unsigned int mask_start, j;
char *buf = tcpinfo->buf; char *buf = tcpinfo->buf;
LM_DBG("decoding WebSocket frame\n"); LM_DBG("decoding WebSocket frame\n");
@ -540,6 +540,13 @@ static int decode_and_validate_ws_frame(ws_frame_t *frame,
*err_text = str_status_protocol_error; *err_text = str_status_protocol_error;
return -1; return -1;
} }
if(frame->payload_len >= BUF_SIZE) {
LM_WARN("message is too long for our buffer size (%d / %d)\n",
BUF_SIZE, frame->payload_len);
*err_code = 1009;
*err_text = str_status_message_too_big;
return -1;
}
frame->payload_data = &buf[mask_start + 4]; frame->payload_data = &buf[mask_start + 4];
for (i = 0; i < frame->payload_len; i++) for (i = 0; i < frame->payload_len; i++)
{ {

@ -284,7 +284,7 @@ static int xcaps_send_reply(sip_msg_t *msg, int code, str *reason,
} }
if(body && body->len>0) if(body && body->len>0)
{ {
if (add_lump_rpl(msg, body->s, body->len, LUMP_RPL_BODY) < 0) if (add_lump_rpl(msg, body->s, body->len, LUMP_RPL_BODY) == 0)
{ {
LM_ERR("Error while adding reply lump\n"); LM_ERR("Error while adding reply lump\n");
return -1; return -1;

@ -354,11 +354,12 @@ static int xhttp_handler(sip_msg_t* msg)
} else { } else {
DBG("new fake msg created (%d bytes):\n<%.*s>\n", DBG("new fake msg created (%d bytes):\n<%.*s>\n",
fake_msg_len, fake_msg_len, fake_msg); fake_msg_len, fake_msg_len, fake_msg);
if (xhttp_process_request(msg, fake_msg, fake_msg_len)<0) if (xhttp_process_request(msg, fake_msg, fake_msg_len)<0) {
ret=NONSIP_MSG_ERROR; ret=NONSIP_MSG_ERROR;
pkg_free(fake_msg);
} }
return ret; pkg_free(fake_msg);
}
return ret;
} else { } else {
LM_DBG("http msg unchanged (%d bytes):\n<%.*s>\n", LM_DBG("http msg unchanged (%d bytes):\n<%.*s>\n",
msg->len, msg->len, msg->buf); msg->len, msg->len, msg->buf);
@ -403,7 +404,7 @@ static int xhttp_send_reply(sip_msg_t *msg, int code, str *reason,
if(body!=NULL && body->len>0) if(body!=NULL && body->len>0)
{ {
if (add_lump_rpl(msg, body->s, body->len, LUMP_RPL_BODY) < 0) if (add_lump_rpl(msg, body->s, body->len, LUMP_RPL_BODY) == 0)
{ {
LM_ERR("Error while adding reply lump\n"); LM_ERR("Error while adding reply lump\n");
return -1; return -1;

@ -677,8 +677,8 @@ static inline int lumps_len(struct sip_msg* msg, struct lump* lumps,
case SUBST_SND_IP: \ case SUBST_SND_IP: \
if (send_sock){ \ if (send_sock){ \
new_len+=send_address_str->len; \ new_len+=send_address_str->len; \
if (send_sock->address.af!=AF_INET && \ if (send_sock->address.af==AF_INET6 && \
send_address_str==&(send_sock->address_str)) \ send_address_str->s[0]!='[') \
new_len+=2; \ new_len+=2; \
}else{ \ }else{ \
LM_CRIT("FIXME: null send_sock\n"); \ LM_CRIT("FIXME: null send_sock\n"); \
@ -723,8 +723,8 @@ static inline int lumps_len(struct sip_msg* msg, struct lump* lumps,
case SUBST_SND_ALL: \ case SUBST_SND_ALL: \
if (send_sock){ \ if (send_sock){ \
new_len+=send_address_str->len; \ new_len+=send_address_str->len; \
if ((send_sock->address.af!=AF_INET) && \ if ((send_sock->address.af==AF_INET6) && \
(send_address_str==&(send_sock->address_str))) \ (send_address_str->s[0]!='[')) \
new_len+=2; \ new_len+=2; \
if ((send_sock->port_no!=SIP_PORT) || \ if ((send_sock->port_no!=SIP_PORT) || \
(send_port_str!=&(send_sock->port_no_str))){ \ (send_port_str!=&(send_sock->port_no_str))){ \
@ -765,7 +765,7 @@ static inline int lumps_len(struct sip_msg* msg, struct lump* lumps,
default: \ default: \
LM_CRIT("unknown subst type %d\n", (subst_l)->u.subst); \ LM_CRIT("unknown subst type %d\n", (subst_l)->u.subst); \
} }
if (send_info){ if (send_info){
send_sock=send_info->send_sock; send_sock=send_info->send_sock;
}else{ }else{
@ -934,7 +934,7 @@ void process_lumps( struct sip_msg* msg,
default:\ default:\
LM_CRIT("unknown comp %d\n", msg->rcv.comp); \ LM_CRIT("unknown comp %d\n", msg->rcv.comp); \
} }
#define SENDCOMP_PARAM_ADD \ #define SENDCOMP_PARAM_ADD \
/* add ;comp=xxxx */ \ /* add ;comp=xxxx */ \
switch(send_info->comp){ \ switch(send_info->comp){ \
@ -955,7 +955,7 @@ void process_lumps( struct sip_msg* msg,
break;\ break;\
default:\ default:\
LM_CRIT("unknown comp %d\n", msg->rcv.comp); \ LM_CRIT("unknown comp %d\n", msg->rcv.comp); \
} }
#else #else
#define RCVCOMP_PARAM_ADD #define RCVCOMP_PARAM_ADD
#define SENDCOMP_PARAM_ADD #define SENDCOMP_PARAM_ADD
@ -1056,14 +1056,14 @@ void process_lumps( struct sip_msg* msg,
case SUBST_SND_IP: \ case SUBST_SND_IP: \
if (send_sock){ \ if (send_sock){ \
if ((send_sock->address.af!=AF_INET) && \ if ((send_sock->address.af!=AF_INET) && \
(send_address_str==&(send_sock->address_str))){\ (send_address_str->s[0]!='[')){\
new_buf[offset]='['; offset++; \ new_buf[offset]='['; offset++; \
}\ }\
memcpy(new_buf+offset, send_address_str->s, \ memcpy(new_buf+offset, send_address_str->s, \
send_address_str->len); \ send_address_str->len); \
offset+=send_address_str->len; \ offset+=send_address_str->len; \
if ((send_sock->address.af!=AF_INET) && \ if ((send_sock->address.af!=AF_INET) && \
(send_address_str==&(send_sock->address_str))){\ (send_address_str->s[0]!='[')){\
new_buf[offset]=']'; offset++; \ new_buf[offset]=']'; offset++; \
}\ }\
}else{ \ }else{ \
@ -1085,14 +1085,14 @@ void process_lumps( struct sip_msg* msg,
if (send_sock){ \ if (send_sock){ \
/* address */ \ /* address */ \
if ((send_sock->address.af!=AF_INET) && \ if ((send_sock->address.af!=AF_INET) && \
(send_address_str==&(send_sock->address_str))){\ (send_address_str->s[0]!='[')){\
new_buf[offset]='['; offset++; \ new_buf[offset]='['; offset++; \
}\ }\
memcpy(new_buf+offset, send_address_str->s, \ memcpy(new_buf+offset, send_address_str->s, \
send_address_str->len); \ send_address_str->len); \
offset+=send_address_str->len; \ offset+=send_address_str->len; \
if ((send_sock->address.af!=AF_INET) && \ if ((send_sock->address.af!=AF_INET) && \
(send_address_str==&(send_sock->address_str))){\ (send_address_str->s[0]!='[')){\
new_buf[offset]=']'; offset++; \ new_buf[offset]=']'; offset++; \
}\ }\
/* :port */ \ /* :port */ \
@ -2781,14 +2781,18 @@ char* via_builder( unsigned int *len,
pkg_free(line_buf); pkg_free(line_buf);
return 0; return 0;
} }
/* add [] only if ipv6 and outbound socket address is used; /* add [] only if ipv6 address is used;
* if using pre-set no check is made */ * if using pre-set no check is made */
if ((send_sock->address.af==AF_INET6) && if (send_sock->address.af==AF_INET6) {
(address_str==&(send_sock->address_str))) { /* lightweight safety checks if brackets set
line_buf[via_prefix_len]='['; * or non-ipv6 (e.g., advertised hostname) */
line_buf[via_prefix_len+1+address_str->len]=']'; if(address_str->s[0] != '['
extra_len=1; && memchr(address_str->s, ':', address_str->len)!=NULL) {
via_len+=2; /* [ ]*/ line_buf[via_prefix_len]='[';
line_buf[via_prefix_len+1+address_str->len]=']';
extra_len=1;
via_len+=2; /* [ ]*/
}
} }
memcpy(line_buf+via_prefix_len+extra_len, address_str->s, memcpy(line_buf+via_prefix_len+extra_len, address_str->s,
address_str->len); address_str->len);

@ -1,48 +1,48 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
<!ENTITY admin SYSTEM "osp_admin.xml"> <!ENTITY admin SYSTEM "osp_admin.xml">
<!ENTITY devel SYSTEM "osp_devel.xml"> <!ENTITY devel SYSTEM "osp_devel.xml">
<!ENTITY faq SYSTEM "osp_faq.xml"> <!ENTITY faq SYSTEM "osp_faq.xml">
<!-- Include general documentation entities --> <!-- Include general documentation entities -->
<!ENTITY % docentities SYSTEM "../../../docbook/entities.xml"> <!ENTITY % docentities SYSTEM "../../../docbook/entities.xml">
%docentities; %docentities;
]> ]>
<book> <book>
<bookinfo> <bookinfo>
<title>OSP Module for Secure, Multi-Lateral Peering</title> <title>OSP Module for Secure, Multi-Lateral Peering</title>
<productname class="trade">&sername;</productname> <productname class="trade">&sername;</productname>
<authorgroup> <authorgroup>
<author> <author>
<firstname>Ulrich</firstname> <firstname>Ulrich</firstname>
<surname>Abend</surname> <surname>Abend</surname>
<affiliation> <affiliation>
<orgname>&fhg;</orgname> <orgname>&fhg;</orgname>
<address><email>ullstar@iptel.org</email></address> <address><email>ullstar@iptel.org</email></address>
</affiliation> </affiliation>
</author> </author>
<editor> <editor>
<firstname>Di-Shi</firstname> <firstname>Di-Shi</firstname>
<surname>Sun</surname> <surname>Sun</surname>
<affiliation> <affiliation>
<orgname>TransNexus, Inc.</orgname> <orgname>TransNexus, Inc.</orgname>
<address><email>support@transnexus.com</email></address> <address><email>support@transnexus.com</email></address>
</affiliation> </affiliation>
</editor> </editor>
</authorgroup> </authorgroup>
<copyright> <copyright>
<year>2003</year> <year>2003</year>
<holder>&fhg;</holder> <holder>&fhg;</holder>
</copyright> </copyright>
</bookinfo> </bookinfo>
<toc></toc> <toc></toc>
&admin; &admin;
&devel; &devel;
&faq; &faq;
</book> </book>

@ -1,363 +1,363 @@
<!-- OSP Module User's Guide --> <!-- OSP Module User's Guide -->
<chapter> <chapter>
<chapterinfo> <chapterinfo>
</chapterinfo> </chapterinfo>
<title>User's Guide</title> <title>User's Guide</title>
<section> <section>
<title>Overview</title> <title>Overview</title>
<para>The OSP module enables SER to support secure, multi-lateral peering using the OSP standard defined by ETSI (TS 101 321 V4.1.1). This module will enable your SER to:</para> <para>The OSP module enables SER to support secure, multi-lateral peering using the OSP standard defined by ETSI (TS 101 321 V4.1.1). This module will enable your SER to:</para>
<itemizedlist> <itemizedlist>
<listitem> <listitem>
<para>Send a peering authorization request to a peering server.</para> <para>Send a peering authorization request to a peering server.</para>
</listitem> </listitem>
<listitem> <listitem>
<para>Validate a digitally signed peering authorization token received in a SIP INVITE message.</para> <para>Validate a digitally signed peering authorization token received in a SIP INVITE message.</para>
</listitem> </listitem>
<listitem> <listitem>
<para>Report usage information to a peering server.</para> <para>Report usage information to a peering server.</para>
</listitem> </listitem>
</itemizedlist> </itemizedlist>
</section> </section>
<section> <section>
<title>Dependencies</title> <title>Dependencies</title>
<para>The OSP module depends on the following modules which must be loaded before the OSP module.</para> <para>The OSP module depends on the following modules which must be loaded before the OSP module.</para>
<itemizedlist> <itemizedlist>
<listitem> <listitem>
<para><emphasis>sl</emphasis> -- stateless replier</para> <para><emphasis>sl</emphasis> -- stateless replier</para>
</listitem> </listitem>
<listitem> <listitem>
<para><emphasis>tm</emphasis> -- stateful processing</para> <para><emphasis>tm</emphasis> -- stateful processing</para>
</listitem> </listitem>
<listitem> <listitem>
<para><emphasis>rr</emphasis> -- Record-Route/Route operation</para> <para><emphasis>rr</emphasis> -- Record-Route/Route operation</para>
</listitem> </listitem>
<listitem> <listitem>
<para><emphasis>textops</emphasis> -- text based operation</para> <para><emphasis>textops</emphasis> -- text based operation</para>
</listitem> </listitem>
<listitem> <listitem>
<para><emphasis>avpops</emphasis> -- AVP operation</para> <para><emphasis>avpops</emphasis> -- AVP operation</para>
</listitem> </listitem>
<listitem> <listitem>
<para><emphasis>OSP Toolkit</emphasis> -- The OSP Toolkit, available from http://sourceforge.net/projects/osp-toolkit, must be built before building SER with the OSP Module. For instructions on building SER with the OSP Toolkit, see http://www.transnexus.com/White%20Papers/Multi-Lateral_Peering_with_SER_V2.0.x.pdf</para> <para><emphasis>OSP Toolkit</emphasis> -- The OSP Toolkit, available from http://sourceforge.net/projects/osp-toolkit, must be built before building SER with the OSP Module. For instructions on building SER with the OSP Toolkit, see http://www.transnexus.com/White%20Papers/Multi-Lateral_Peering_with_SER_V2.0.x.pdf</para>
</listitem> </listitem>
</itemizedlist> </itemizedlist>
</section> </section>
<section> <section>
<title>Exported Parameters</title> <title>Exported Parameters</title>
<section> <section>
<title><varname>sp1_uri</varname>, <varname>sp2_uri</varname>, ..., <varname>sp16_uri</varname></title> <title><varname>sp1_uri</varname>, <varname>sp2_uri</varname>, ..., <varname>sp16_uri</varname></title>
<para>These sp_uri (string) parameters define peering servers to be used for requesting peering authorization and routing information. At least one peering server must be configured. Others are required only if there are more than one peering servers. Each peering server address takes the form of a standard URL, and consists of up to four components:</para> <para>These sp_uri (string) parameters define peering servers to be used for requesting peering authorization and routing information. At least one peering server must be configured. Others are required only if there are more than one peering servers. Each peering server address takes the form of a standard URL, and consists of up to four components:</para>
<itemizedlist> <itemizedlist>
<listitem> <listitem>
<para>An optional indication of the protocol to be used for communicating with the peering server. Both HTTP and HTTP secured with SSL/TLS are supported and are indicated by "http://" and "https://" respectively. If the protocol is not explicitly indicated, the SER defaults to HTTP secured with SSL.</para> <para>An optional indication of the protocol to be used for communicating with the peering server. Both HTTP and HTTP secured with SSL/TLS are supported and are indicated by "http://" and "https://" respectively. If the protocol is not explicitly indicated, the SER defaults to HTTP secured with SSL.</para>
</listitem> </listitem>
<listitem> <listitem>
<para>The Internet domain name for the peering server. An IP address may also be used, provided it is enclosed in square brackets such as [172.16.1.1].</para> <para>The Internet domain name for the peering server. An IP address may also be used, provided it is enclosed in square brackets such as [172.16.1.1].</para>
</listitem> </listitem>
<listitem> <listitem>
<para>An optional TCP port number for communicating with the peering server. If the port number is omitted, the SER defaults to port 1080 (for HTTP) or port 1443 (for HTTP secured with SSL).</para> <para>An optional TCP port number for communicating with the peering server. If the port number is omitted, the SER defaults to port 1080 (for HTTP) or port 1443 (for HTTP secured with SSL).</para>
<para>The uniform resource identifier for requests to the peering server. This component is not optional and must be included.</para> <para>The uniform resource identifier for requests to the peering server. This component is not optional and must be included.</para>
</listitem> </listitem>
</itemizedlist> </itemizedlist>
<example> <example>
<title>Setting the OSP servers</title> <title>Setting the OSP servers</title>
<programlisting format="linespecific"> <programlisting format="linespecific">
modparam("osp","sp1_uri","http://osptestserver.transnexus.com:1080/osp") modparam("osp","sp1_uri","http://osptestserver.transnexus.com:1080/osp")
modparam("osp","sp2_uri","https://[1.2.3.4]:1443/osp") modparam("osp","sp2_uri","https://[1.2.3.4]:1443/osp")
</programlisting> </programlisting>
</example> </example>
</section> </section>
<section> <section>
<title><varname>device_ip</varname></title> <title><varname>device_ip</varname></title>
<para>The device_ip (string) is a recommended parameter that explicitly defines the IP address of SER in a peering request message (as SourceAlternate type=transport). The IP address must be in brackets as shown in the example below.</para> <para>The device_ip (string) is a recommended parameter that explicitly defines the IP address of SER in a peering request message (as SourceAlternate type=transport). The IP address must be in brackets as shown in the example below.</para>
<example> <example>
<title>Setting the device IP address</title> <title>Setting the device IP address</title>
<programlisting format="linespecific"> <programlisting format="linespecific">
modparam("osp","device_ip","[1.1.1.1]") modparam("osp","device_ip","[1.1.1.1]")
</programlisting> </programlisting>
</example> </example>
</section> </section>
<section> <section>
<title><varname>token_format</varname></title> <title><varname>token_format</varname></title>
<para>When SER receives a SIP INVITE with a peering token, the OSP Module will validate the token to determine whether or not the call has been authorized by a peering server. Peering tokens may, or may not, be digitally signed. The token format (integer) parameter defines if SER will validate signed or unsigned tokens or both. The values for token format are defined below. The default value is 2.</para> <para>When SER receives a SIP INVITE with a peering token, the OSP Module will validate the token to determine whether or not the call has been authorized by a peering server. Peering tokens may, or may not, be digitally signed. The token format (integer) parameter defines if SER will validate signed or unsigned tokens or both. The values for token format are defined below. The default value is 2.</para>
<para>0 - Validate only signed tokens. Calls with valid signed tokens are allowed.</para> <para>0 - Validate only signed tokens. Calls with valid signed tokens are allowed.</para>
<para>1 - Validate only unsigned tokens. Calls with valid unsigned tokens are allowed.</para> <para>1 - Validate only unsigned tokens. Calls with valid unsigned tokens are allowed.</para>
<para>2 - Validate both signed and unsigned tokens are allowed. Calls with valid tokens are allowed.</para> <para>2 - Validate both signed and unsigned tokens are allowed. Calls with valid tokens are allowed.</para>
<example> <example>
<title>Setting the token format</title> <title>Setting the token format</title>
<programlisting format="linespecific"> <programlisting format="linespecific">
modparam("osp","token_format",2) modparam("osp","token_format",2)
</programlisting> </programlisting>
</example> </example>
</section> </section>
<section> <section>
<title><varname>private_key</varname>, <varname>local_certificate</varname>, <varname>ca_certificates</varname></title> <title><varname>private_key</varname>, <varname>local_certificate</varname>, <varname>ca_certificates</varname></title>
<para>These parameters identify files are used for validating peering authorization tokens and establishing a secure channel between SER and a peering server using SSL. The files are generated using the 'Enroll' utility from the OSP Toolkit. By default, the proxy will look for pkey.pem, localcert.pem, and cacart_0.pem in the default configuration directory. The default config directory is set at compile time using CFG_DIR and defaults to /usr/local/etc/ser/. The files may be copied to the expected file location or the parameters below may be changed.</para> <para>These parameters identify files are used for validating peering authorization tokens and establishing a secure channel between SER and a peering server using SSL. The files are generated using the 'Enroll' utility from the OSP Toolkit. By default, the proxy will look for pkey.pem, localcert.pem, and cacart_0.pem in the default configuration directory. The default config directory is set at compile time using CFG_DIR and defaults to /usr/local/etc/ser/. The files may be copied to the expected file location or the parameters below may be changed.</para>
<example> <example>
<title>Set authorization files</title> <title>Set authorization files</title>
<para>If the default CFG_DIR value was used at compile time, the files will be loaded from:</para> <para>If the default CFG_DIR value was used at compile time, the files will be loaded from:</para>
<programlisting format="linespecific"> <programlisting format="linespecific">
modparam("osp","private_key","/usr/local/etc/ser/pkey.pem") modparam("osp","private_key","/usr/local/etc/ser/pkey.pem")
modparam("osp","local_certificate","/usr/local/etc/ser/localcert.pem") modparam("osp","local_certificate","/usr/local/etc/ser/localcert.pem")
modparam("osp","ca_certificates","/usr/local/etc/ser/cacert.pem") modparam("osp","ca_certificates","/usr/local/etc/ser/cacert.pem")
</programlisting> </programlisting>
</example> </example>
</section> </section>
<section> <section>
<title><varname>sp1_weight</varname>, <varname>sp2_weight</varname>, ..., <varname>sp16_weight</varname></title> <title><varname>sp1_weight</varname>, <varname>sp2_weight</varname>, ..., <varname>sp16_weight</varname></title>
<para>These sp_weight (integer) parameters are used for load balancing peering requests to peering servers. These parameters are most effective when configured as factors of 1000. For example, if sp1_uri should manage twice the traffic load of sp2_uri, then set sp1_weight to 2000 and sp2_weight to 1000. Shared load balancing between peering servers is recommended. However, peering servers can be configured as primary and backup by assigning a sp_weight of 0 to the primary server and a non-zero sp_weight to the back-up server. The default values for sp1_weight and sp2_weight are 1000.</para> <para>These sp_weight (integer) parameters are used for load balancing peering requests to peering servers. These parameters are most effective when configured as factors of 1000. For example, if sp1_uri should manage twice the traffic load of sp2_uri, then set sp1_weight to 2000 and sp2_weight to 1000. Shared load balancing between peering servers is recommended. However, peering servers can be configured as primary and backup by assigning a sp_weight of 0 to the primary server and a non-zero sp_weight to the back-up server. The default values for sp1_weight and sp2_weight are 1000.</para>
<example> <example>
<title>Setting the OSP server weights</title> <title>Setting the OSP server weights</title>
<programlisting format="linespecific"> <programlisting format="linespecific">
modparam("osp","sp1_weight",1000) modparam("osp","sp1_weight",1000)
</programlisting> </programlisting>
</example> </example>
</section> </section>
<section> <section>
<title><varname>device_port</varname></title> <title><varname>device_port</varname></title>
<para>The device_port (string) parameter is an optional field which includes the SIP port being used by SER in the peering request (as SourceAlternate type=network) to the peering server. If is not configured, this information is not included in the peering request. This field is useful if multiple SERs are running on the same Linux computer since it enables the peering server to administer different peering policies based on different SIP proxies. This parameter has not been implemented yet.</para> <para>The device_port (string) parameter is an optional field which includes the SIP port being used by SER in the peering request (as SourceAlternate type=network) to the peering server. If is not configured, this information is not included in the peering request. This field is useful if multiple SERs are running on the same Linux computer since it enables the peering server to administer different peering policies based on different SIP proxies. This parameter has not been implemented yet.</para>
<example> <example>
<title>Setting the device port</title> <title>Setting the device port</title>
<programlisting format="linespecific"> <programlisting format="linespecific">
modparam("osp","device_port","5060") modparam("osp","device_port","5060")
</programlisting> </programlisting>
</example> </example>
</section> </section>
<section> <section>
<title><varname>enable_crypto_hardware_support</varname></title> <title><varname>enable_crypto_hardware_support</varname></title>
<para>The enable_crypto_hardware_support (integer) parameter is used to set the cryptographic hardware acceleration engine in the openssl library. The default value is 0 (no crypto hardware is present). If crypto hardware is used, the value should be set to 1.</para> <para>The enable_crypto_hardware_support (integer) parameter is used to set the cryptographic hardware acceleration engine in the openssl library. The default value is 0 (no crypto hardware is present). If crypto hardware is used, the value should be set to 1.</para>
<example> <example>
<title>Setting the hardware support</title> <title>Setting the hardware support</title>
<programlisting format="linespecific"> <programlisting format="linespecific">
modparam("osp","enable_crypto_hardware_support",0) modparam("osp","enable_crypto_hardware_support",0)
</programlisting> </programlisting>
</example> </example>
</section> </section>
<section> <section>
<title><varname>ssl_lifetime</varname></title> <title><varname>ssl_lifetime</varname></title>
<para>The ssl_lifetime (integer) parameter defines the lifetime, in seconds, of a single SSL session key. Once this time limit is exceeded, the OSP Module will negotiate a new session key. Communication exchanges in progress will not be interrupted when this time limit expires. This is an optional field with default value is 200 seconds.</para> <para>The ssl_lifetime (integer) parameter defines the lifetime, in seconds, of a single SSL session key. Once this time limit is exceeded, the OSP Module will negotiate a new session key. Communication exchanges in progress will not be interrupted when this time limit expires. This is an optional field with default value is 200 seconds.</para>
<example> <example>
<title>Setting the ssl lifetime</title> <title>Setting the ssl lifetime</title>
<programlisting format="linespecific"> <programlisting format="linespecific">
modparam("osp","ssl_lifetime",200) modparam("osp","ssl_lifetime",200)
</programlisting> </programlisting>
</example> </example>
</section> </section>
<section> <section>
<title><varname>persistence</varname></title> <title><varname>persistence</varname></title>
<para>The persistence (integer) parameter defines the time, in seconds, that an HTTP connection should be maintained after the completion of a communication exchange. The OSP Module will maintain the connection for this time period in anticipation of future communication exchanges to the same peering server.</para> <para>The persistence (integer) parameter defines the time, in seconds, that an HTTP connection should be maintained after the completion of a communication exchange. The OSP Module will maintain the connection for this time period in anticipation of future communication exchanges to the same peering server.</para>
<example> <example>
<title>Setting the persistence</title> <title>Setting the persistence</title>
<programlisting format="linespecific"> <programlisting format="linespecific">
modparam("osp","persistence",1000) modparam("osp","persistence",1000)
</programlisting> </programlisting>
</example> </example>
</section> </section>
<section> <section>
<title><varname>retry_delay</varname></title> <title><varname>retry_delay</varname></title>
<para>The retry_delay (integer) parameter defines the time, in seconds, between retrying connection attempts to an OSP peering server. After exhausting all peering servers the OSP Module will delay for this amount of time before resuming connection attempts. This is an optional field with default value is 1 second.</para> <para>The retry_delay (integer) parameter defines the time, in seconds, between retrying connection attempts to an OSP peering server. After exhausting all peering servers the OSP Module will delay for this amount of time before resuming connection attempts. This is an optional field with default value is 1 second.</para>
<example> <example>
<title>Setting the retry delay</title> <title>Setting the retry delay</title>
<programlisting format="linespecific"> <programlisting format="linespecific">
modparam("osp","retry_delay",1) modparam("osp","retry_delay",1)
</programlisting> </programlisting>
</example> </example>
</section> </section>
<section> <section>
<title><varname>retry_limit</varname></title> <title><varname>retry_limit</varname></title>
<para>The retry_limit (integer) parameter defines the maximum number of retries for connection attempts to a peering server. If no connection is established after this many retry attempts to all peering servers, the OSP Module will cease connection attempts and return appropriate error codes. This number does not count the initial connection attempt, so that a retry_limit of 1 will result in a total of two connection attempts to every peering server. The default value is 2.</para> <para>The retry_limit (integer) parameter defines the maximum number of retries for connection attempts to a peering server. If no connection is established after this many retry attempts to all peering servers, the OSP Module will cease connection attempts and return appropriate error codes. This number does not count the initial connection attempt, so that a retry_limit of 1 will result in a total of two connection attempts to every peering server. The default value is 2.</para>
<example> <example>
<title>Setting the retry limit</title> <title>Setting the retry limit</title>
<programlisting format="linespecific"> <programlisting format="linespecific">
modparam("osp","retry_limit",2) modparam("osp","retry_limit",2)
</programlisting> </programlisting>
</example> </example>
</section> </section>
<section> <section>
<title><varname>timeout</varname></title> <title><varname>timeout</varname></title>
<para>The timeout (integer) parameter defines the maximum time in milliseconds, to wait for a response from a peering server. If no response is received within this time, the current connection is aborted and the OSP Module attempts to contact the next peering server. The default value is 10 seconds.</para> <para>The timeout (integer) parameter defines the maximum time in milliseconds, to wait for a response from a peering server. If no response is received within this time, the current connection is aborted and the OSP Module attempts to contact the next peering server. The default value is 10 seconds.</para>
<example> <example>
<title>Setting the timeout</title> <title>Setting the timeout</title>
<programlisting format="linespecific"> <programlisting format="linespecific">
modparam("osp","timeout",10) modparam("osp","timeout",10)
</programlisting> </programlisting>
</example> </example>
</section> </section>
<section> <section>
<title><varname>max_destinations</varname></title> <title><varname>max_destinations</varname></title>
<para>The max_destinations (integer) parameter defines the maximum number of destinations that SER requests the peering server to return in a peering response. The default value is 5.</para> <para>The max_destinations (integer) parameter defines the maximum number of destinations that SER requests the peering server to return in a peering response. The default value is 5.</para>
<example> <example>
<title>Setting the number of destination</title> <title>Setting the number of destination</title>
<programlisting format="linespecific"> <programlisting format="linespecific">
modparam("osp","max_destinations",5) modparam("osp","max_destinations",5)
</programlisting> </programlisting>
</example> </example>
</section> </section>
<section> <section>
<title><varname>validate_call_id</varname></title> <title><varname>validate_call_id</varname></title>
<para>The validate_call_id (integer) parameter instructs the OSP module to validate call id in the peering token. If this value is set to 1, the OSP Module validates that the call id in the SIP INVITE message matches the call id in the peering token. If they do not match the INVITE is rejected. If this value is set to 0, the OSP Module will not validate the call id in the peering token. The default value is 1.</para> <para>The validate_call_id (integer) parameter instructs the OSP module to validate call id in the peering token. If this value is set to 1, the OSP Module validates that the call id in the SIP INVITE message matches the call id in the peering token. If they do not match the INVITE is rejected. If this value is set to 0, the OSP Module will not validate the call id in the peering token. The default value is 1.</para>
<example> <example>
<title>Instructing the module to validate call id</title> <title>Instructing the module to validate call id</title>
<programlisting format="linespecific"> <programlisting format="linespecific">
modparam("osp","validate_call_id",1) modparam("osp","validate_call_id",1)
</programlisting> </programlisting>
</example> </example>
</section> </section>
<section> <section>
<title><varname>use_rpid_for_calling_number</varname></title> <title><varname>use_rpid_for_calling_number</varname></title>
<para>The use_rpid_for_calling_number(integer) parameter instructs the OSP module to use the calling number in the Remote-Party-ID of the SIP INVITE message. If this value is set to 1, the OSP Module uses the calling number in the Reomte-Party-ID header of the INVITE message when a Remote-Party-ID exists. If this value is set to 0, the OSP Module will use the calling number in the From header of the INVITE message. The default value is 1.</para> <para>The use_rpid_for_calling_number(integer) parameter instructs the OSP module to use the calling number in the Remote-Party-ID of the SIP INVITE message. If this value is set to 1, the OSP Module uses the calling number in the Reomte-Party-ID header of the INVITE message when a Remote-Party-ID exists. If this value is set to 0, the OSP Module will use the calling number in the From header of the INVITE message. The default value is 1.</para>
<example> <example>
<title>Instructing the module to use calling number in Remote-Party-ID</title> <title>Instructing the module to use calling number in Remote-Party-ID</title>
<programlisting format="linespecific"> <programlisting format="linespecific">
modparam("osp","use_rpid_calling_number",1) modparam("osp","use_rpid_calling_number",1)
</programlisting> </programlisting>
</example> </example>
</section> </section>
</section> </section>
<section> <section>
<title>Exported Functions</title> <title>Exported Functions</title>
<section> <section>
<title><function moreinfo="none">checkospheader()</function></title> <title><function moreinfo="none">checkospheader()</function></title>
<para>This function checks for the existence of the OSP-Auth-Token header field.</para> <para>This function checks for the existence of the OSP-Auth-Token header field.</para>
<para>This function can be used from REQUEST_ROUTE and FAILURE_ROUTE.</para> <para>This function can be used from REQUEST_ROUTE and FAILURE_ROUTE.</para>
<example> <example>
<title>checkospheader usage</title> <title>checkospheader usage</title>
<programlisting format="linespecific"> <programlisting format="linespecific">
... ...
if (checkospheader()) { if (checkospheader()) {
log("OSP header field found.\n"); log("OSP header field found.\n");
} else { } else {
log("no OSP header field present\n"); log("no OSP header field present\n");
}; };
... ...
</programlisting> </programlisting>
</example> </example>
</section> </section>
<section> <section>
<title><function moreinfo="none">validateospheader()</function></title> <title><function moreinfo="none">validateospheader()</function></title>
<para>This function validates an OSP-Token specified in the OSP-Auth-Tokenheader field of the SIP message. If a peering token is present, it will be validated locally. If no OSP header is found or the header token is invalid or expired, -1 is returned; on successful validation 1 is returned.</para> <para>This function validates an OSP-Token specified in the OSP-Auth-Tokenheader field of the SIP message. If a peering token is present, it will be validated locally. If no OSP header is found or the header token is invalid or expired, -1 is returned; on successful validation 1 is returned.</para>
<para>This function can be used from REQUEST_ROUTE and FAILURE_ROUTE.</para> <para>This function can be used from REQUEST_ROUTE and FAILURE_ROUTE.</para>
<example> <example>
<title>validateospheader usage</title> <title>validateospheader usage</title>
<programlisting format="linespecific"> <programlisting format="linespecific">
... ...
if (validateospheader()) { if (validateospheader()) {
log("valid OSP header found\n"); log("valid OSP header found\n");
} else { } else {
log("OSP header not found, invalid or expired\n"); log("OSP header not found, invalid or expired\n");
}; };
... ...
</programlisting> </programlisting>
</example> </example>
</section> </section>
<section> <section>
<title><function moreinfo="none">requestosprouting()</function></title> <title><function moreinfo="none">requestosprouting()</function></title>
<para>This function launches a query to the peering server requesting the IP address of one or more destination peers serving the called party. If destination peers are available, the peering server will return the IP address and a peering authorization token for each destination peer. The OSP-Auth-Token Header field is inserted into the SIP message and the SIP uri is rewritten to the IP address of destination peer provided by the peering server.</para> <para>This function launches a query to the peering server requesting the IP address of one or more destination peers serving the called party. If destination peers are available, the peering server will return the IP address and a peering authorization token for each destination peer. The OSP-Auth-Token Header field is inserted into the SIP message and the SIP uri is rewritten to the IP address of destination peer provided by the peering server.</para>
<para>The address of the called party must be a valid E164 number, otherwise this function returns -1. If the transaction was accepted by the peering server, the uri is being rewritten and 1 returned, on errors (peering servers are not available, authentication failed or there is no route to destination or the route is blocked) -1 is returned.</para> <para>The address of the called party must be a valid E164 number, otherwise this function returns -1. If the transaction was accepted by the peering server, the uri is being rewritten and 1 returned, on errors (peering servers are not available, authentication failed or there is no route to destination or the route is blocked) -1 is returned.</para>
<para>This function can be used from REQUEST_ROUTE and FAILURE_ROUTE.</para> <para>This function can be used from REQUEST_ROUTE and FAILURE_ROUTE.</para>
<example> <example>
<title>requestosprouting usage</title> <title>requestosprouting usage</title>
<programlisting format="linespecific"> <programlisting format="linespecific">
... ...
if (requestosprouting()) { if (requestosprouting()) {
log("successfully queried OSP server, now relaying call\n"); log("successfully queried OSP server, now relaying call\n");
} else { } else {
log("Authorization request was rejected from OSP server\n"); log("Authorization request was rejected from OSP server\n");
}; };
... ...
</programlisting> </programlisting>
</example> </example>
</section> </section>
<section> <section>
<title><function moreinfo="none">prepareospfirstroute()</function></title> <title><function moreinfo="none">prepareospfirstroute()</function></title>
<para>This function tries to prepare the INVITE to be forwarded or redirected using the first destination in the list returned by the peering server. If the route could not be prepared, the function returns 'FALSE' back to the script, which can then decide how to handle the failure.</para> <para>This function tries to prepare the INVITE to be forwarded or redirected using the first destination in the list returned by the peering server. If the route could not be prepared, the function returns 'FALSE' back to the script, which can then decide how to handle the failure.</para>
<para>This function can be used from REQUEST_ROUTE and FAILURE_ROUTE.</para> <para>This function can be used from REQUEST_ROUTE and FAILURE_ROUTE.</para>
<example> <example>
<title>prepareospfirstroute usage</title> <title>prepareospfirstroute usage</title>
<programlisting format="linespecific"> <programlisting format="linespecific">
... ...
if (prepareospfirstroute ()) { if (prepareospfirstroute ()) {
log("successfully prepared the first route, now relaying call\n"); log("successfully prepared the first route, now relaying call\n");
} else { } else {
log("could not prepare the route. The first destination was blocked\n"); log("could not prepare the route. The first destination was blocked\n");
}; };
... ...
</programlisting> </programlisting>
</example> </example>
</section> </section>
<section> <section>
<title><function moreinfo="none">prepareosprnextoute()</function></title> <title><function moreinfo="none">prepareosprnextoute()</function></title>
<para>Once the call could not be completed through the first destination, this function tries to prepare the INVITE message using the next destination in the list returned by the peering Server. If it succeeds in preparing the route, the message is either redirected or relayed on (using the t_relay call), or else the function returns 'FALSE' back to the script, which can then decide how to handle the failure.</para> <para>Once the call could not be completed through the first destination, this function tries to prepare the INVITE message using the next destination in the list returned by the peering Server. If it succeeds in preparing the route, the message is either redirected or relayed on (using the t_relay call), or else the function returns 'FALSE' back to the script, which can then decide how to handle the failure.</para>
<para>This function can be used from REQUEST_ROUTE and FAILURE_ROUTE.</para> <para>This function can be used from REQUEST_ROUTE and FAILURE_ROUTE.</para>
<example> <example>
<title>prepareospnextroute usage</title> <title>prepareospnextroute usage</title>
<programlisting format="linespecific"> <programlisting format="linespecific">
... ...
if (prepareospnextroute ()) { if (prepareospnextroute ()) {
log("successfully prepared the next route, now relaying call\n"); log("successfully prepared the next route, now relaying call\n");
} else { } else {
log("could not prepare the route. No next destination available\n"); log("could not prepare the route. No next destination available\n");
}; };
... ...
</programlisting> </programlisting>
</example> </example>
</section> </section>
<section> <section>
<title><function moreinfo="none">appendospheaders()</function></title> <title><function moreinfo="none">appendospheaders()</function></title>
<para>This function is used to append route specific OSP headers. Before calling appendospheaders, prepareospfirst/nextroute should be called.</para> <para>This function is used to append route specific OSP headers. Before calling appendospheaders, prepareospfirst/nextroute should be called.</para>
<para>This function can be used from BRANCH_ROUTE.</para> <para>This function can be used from BRANCH_ROUTE.</para>
<example> <example>
<title>appendospheaders usage</title> <title>appendospheaders usage</title>
<programlisting format="linespecific"> <programlisting format="linespecific">
... ...
branch_route[1] { branch_route[1] {
log("Prepare route specific OSP information\n"); log("Prepare route specific OSP information\n");
appendospheaders(); appendospheaders();
} }
... ...
</programlisting> </programlisting>
</example> </example>
</section> </section>
<section> <section>
<title><function moreinfo="none">prepareallosproute()</function></title> <title><function moreinfo="none">prepareallosproute()</function></title>
<para>This function tries to prepare all the routes in the list returned by the peering server. The message is then either forked off or redirected to the destination. If unsuccessful in preparing the routes a SIP 500 is sent back and a trace message is logged.</para> <para>This function tries to prepare all the routes in the list returned by the peering server. The message is then either forked off or redirected to the destination. If unsuccessful in preparing the routes a SIP 500 is sent back and a trace message is logged.</para>
<para>This function can be used from REQUEST_ROUTE and FAILURE_ROUTE.</para> <para>This function can be used from REQUEST_ROUTE and FAILURE_ROUTE.</para>
<example> <example>
<title>prepareallosproute usage</title> <title>prepareallosproute usage</title>
<programlisting format="linespecific"> <programlisting format="linespecific">
... ...
if (prepareallosproute()) { if (prepareallosproute()) {
log("Routes are prepared, now either forking or redirecting the call\n"); log("Routes are prepared, now either forking or redirecting the call\n");
} else { } else {
log("Could not prepare the routes. No destination available\n"); log("Could not prepare the routes. No destination available\n");
}; };
... ...
</programlisting> </programlisting>
</example> </example>
</section> </section>
<section> <section>
<title><function moreinfo="none">reportospusage()</function></title> <title><function moreinfo="none">reportospusage()</function></title>
<para>This function should be called after receiving a BYE message. If the message contains an OSP cookie, the function will forward originating and/or terminating duration usage information to a peering server. The function returns TRUE if the BYE includes an OSP cookie. The actual usage message will be send on a different thread and will not delay BYE processing. The function should be called before relaying the message.</para> <para>This function should be called after receiving a BYE message. If the message contains an OSP cookie, the function will forward originating and/or terminating duration usage information to a peering server. The function returns TRUE if the BYE includes an OSP cookie. The actual usage message will be send on a different thread and will not delay BYE processing. The function should be called before relaying the message.</para>
<para>This function can be used from REQUEST_ROUTE.</para> <para>This function can be used from REQUEST_ROUTE.</para>
<example> <example>
<title>reportospusage usage</title> <title>reportospusage usage</title>
<programlisting format="linespecific"> <programlisting format="linespecific">
... ...
if (reportospusage ()) { if (reportospusage ()) {
log("OSP call duration usage will be reported\n"); log("OSP call duration usage will be reported\n");
} else { } else {
log("The BYE message does not include OSP information, it was not authorized by an OSP server\n"); log("The BYE message does not include OSP information, it was not authorized by an OSP server\n");
}; };
... ...
</programlisting> </programlisting>
</example> </example>
</section> </section>
</section> </section>
</chapter> </chapter>
<!-- Keep this element at the end of the file <!-- Keep this element at the end of the file
Local Variables: Local Variables:
xml-parent-document: ("osp.xml" "Book" "chapter") xml-parent-document: ("osp.xml" "Book" "chapter")
End: End:
--> -->

@ -1,14 +1,14 @@
<!-- OSP Module Developer's Guide --> <!-- OSP Module Developer's Guide -->
<chapter> <chapter>
<chapterinfo> <chapterinfo>
</chapterinfo> </chapterinfo>
<title>Developer's Guide</title> <title>Developer's Guide</title>
<para>The functions of the OSP modules are not used by other SER modules.</para> <para>The functions of the OSP modules are not used by other SER modules.</para>
</chapter> </chapter>
<!-- Keep this element at the end of the file <!-- Keep this element at the end of the file
Local Variables: Local Variables:
xml-parent-document: ("osp.xml" "book" "chapter") xml-parent-document: ("osp.xml" "book" "chapter")
End: End:
--> -->

@ -1,44 +1,44 @@
<!-- OSP Module FAQ --> <!-- OSP Module FAQ -->
<chapter> <chapter>
<chapterinfo> <chapterinfo>
</chapterinfo> </chapterinfo>
<title>Frequently Asked Questions</title> <title>Frequently Asked Questions</title>
<qandaset> <qandaset>
<qandaentry> <qandaentry>
<question><para>What platforms does this module work on?</para></question> <question><para>What platforms does this module work on?</para></question>
<answer><para>The module has been implemented using Linux, the underlying toolkit and the module code itself should compile and work on Solaris, *BSD, and probably most other unix platforms with ssl and pthreads available, but the OSP Module has only been tested Linux.</para></answer> <answer><para>The module has been implemented using Linux, the underlying toolkit and the module code itself should compile and work on Solaris, *BSD, and probably most other unix platforms with ssl and pthreads available, but the OSP Module has only been tested Linux.</para></answer>
</qandaentry> </qandaentry>
<qandaentry> <qandaentry>
<question><para>Where can I get more information on this module?</para></question> <question><para>Where can I get more information on this module?</para></question>
<answer><para>Please see http://www.iptel.org/views/moduledocs/ or post a message on the SER mailing list.</para></answer> <answer><para>Please see http://www.iptel.org/views/moduledocs/ or post a message on the SER mailing list.</para></answer>
</qandaentry> </qandaentry>
<qandaentry> <qandaentry>
<question><para>Where can I get more information on OSP?</para></question> <question><para>Where can I get more information on OSP?</para></question>
<answer><para>The OSP technical specification (ETSI TS 101 321) may be obtained from www.etsi.org. You can also post a message on the OSP Toolkit mailing list at https://lists.sourceforge.net/lists/listinfo/osp-toolkit-client.</para></answer> <answer><para>The OSP technical specification (ETSI TS 101 321) may be obtained from www.etsi.org. You can also post a message on the OSP Toolkit mailing list at https://lists.sourceforge.net/lists/listinfo/osp-toolkit-client.</para></answer>
</qandaentry> </qandaentry>
<qandaentry> <qandaentry>
<question><para>How do I obtain an OSP server for testing?</para></question> <question><para>How do I obtain an OSP server for testing?</para></question>
<answer> <answer>
<para>OSP peering servers are available from the following sources:</para> <para>OSP peering servers are available from the following sources:</para>
<itemizedlist> <itemizedlist>
<listitem><para>OpenOSP is an OSP server reference implementation created by Cisco Systems and available at http://www.vovida.org/applications/downloads/openosp/</para></listitem> <listitem><para>OpenOSP is an OSP server reference implementation created by Cisco Systems and available at http://www.vovida.org/applications/downloads/openosp/</para></listitem>
<listitem><para>RAMS is an open source, java based OSP server project available from http://sourceforge.net/projects/rams/</para></listitem> <listitem><para>RAMS is an open source, java based OSP server project available from http://sourceforge.net/projects/rams/</para></listitem>
<listitem><para>A free version of the commercial TransNexus OSP peering server is available at www.transnexus.com.</para></listitem> <listitem><para>A free version of the commercial TransNexus OSP peering server is available at www.transnexus.com.</para></listitem>
</itemizedlist> </itemizedlist>
</answer> </answer>
</qandaentry> </qandaentry>
<qandaentry> <qandaentry>
<question><para>How are the exported functions used by the OSP module?</para></question> <question><para>How are the exported functions used by the OSP module?</para></question>
<answer> <answer>
<para>See sample-osp-ser.cfg in modules/osp/etc for examples</para> <para>See sample-osp-ser.cfg in modules/osp/etc for examples</para>
</answer> </answer>
</qandaentry> </qandaentry>
</qandaset> </qandaset>
</chapter> </chapter>
<!-- Keep this element at the end of the file <!-- Keep this element at the end of the file
Local Variables: Local Variables:
xml-parent-document: ("osp.xml" "Book" "chapter") xml-parent-document: ("osp.xml" "Book" "chapter")
End: End:
--> -->

@ -1,10 +1,10 @@
-----BEGIN CERTIFICATE----- -----BEGIN CERTIFICATE-----
MIIBYDCCAQoCAQEwDQYJKoZIhvcNAQEEBQAwOzElMCMGA1UEAxMcb3NwdGVzdHNl MIIBYDCCAQoCAQEwDQYJKoZIhvcNAQEEBQAwOzElMCMGA1UEAxMcb3NwdGVzdHNl
cnZlci50cmFuc25leHVzLmNvbTESMBAGA1UEChMJT1NQU2VydmVyMB4XDTAyMDIw cnZlci50cmFuc25leHVzLmNvbTESMBAGA1UEChMJT1NQU2VydmVyMB4XDTAyMDIw
NDE4MjU1MloXDTEyMDIwMzE4MjU1MlowOzElMCMGA1UEAxMcb3NwdGVzdHNlcnZl NDE4MjU1MloXDTEyMDIwMzE4MjU1MlowOzElMCMGA1UEAxMcb3NwdGVzdHNlcnZl
ci50cmFuc25leHVzLmNvbTESMBAGA1UEChMJT1NQU2VydmVyMFwwDQYJKoZIhvcN ci50cmFuc25leHVzLmNvbTESMBAGA1UEChMJT1NQU2VydmVyMFwwDQYJKoZIhvcN
AQEBBQADSwAwSAJBAPGeGwV41EIhX0jEDFLRXQhDEr50OUQPq+f55VwQd0TQNts0 AQEBBQADSwAwSAJBAPGeGwV41EIhX0jEDFLRXQhDEr50OUQPq+f55VwQd0TQNts0
6BP29+UiNdRW3c3IRHdZcJdC1Cg68ME9cgeq0h8CAwEAATANBgkqhkiG9w0BAQQF 6BP29+UiNdRW3c3IRHdZcJdC1Cg68ME9cgeq0h8CAwEAATANBgkqhkiG9w0BAQQF
AANBAGkzBSj1EnnmUxbaiG1N4xjIuLAWydun7o3bFk2tV8dBIhnuh445obYyk1En AANBAGkzBSj1EnnmUxbaiG1N4xjIuLAWydun7o3bFk2tV8dBIhnuh445obYyk1En
Q27kI7eACCILBZqi2MHDOIMnoN0= Q27kI7eACCILBZqi2MHDOIMnoN0=
-----END CERTIFICATE----- -----END CERTIFICATE-----

@ -1,10 +1,10 @@
-----BEGIN CERTIFICATE----- -----BEGIN CERTIFICATE-----
MIIBeTCCASMCEHqkOHVRRWr+1COq3CR/xsowDQYJKoZIhvcNAQEEBQAwOzElMCMG MIIBeTCCASMCEHqkOHVRRWr+1COq3CR/xsowDQYJKoZIhvcNAQEEBQAwOzElMCMG
A1UEAxMcb3NwdGVzdHNlcnZlci50cmFuc25leHVzLmNvbTESMBAGA1UEChMJT1NQ A1UEAxMcb3NwdGVzdHNlcnZlci50cmFuc25leHVzLmNvbTESMBAGA1UEChMJT1NQ
U2VydmVyMB4XDTA1MDYyMzAwMjkxOFoXDTA2MDYyNDAwMjkxOFowRTELMAkGA1UE U2VydmVyMB4XDTA1MDYyMzAwMjkxOFoXDTA2MDYyNDAwMjkxOFowRTELMAkGA1UE
BhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNVBAoTGEludGVybmV0IFdp BhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNVBAoTGEludGVybmV0IFdp
ZGdpdHMgUHR5IEx0ZDBcMA0GCSqGSIb3DQEBAQUAA0sAMEgCQQCvLeZfj1G0wuJb ZGdpdHMgUHR5IEx0ZDBcMA0GCSqGSIb3DQEBAQUAA0sAMEgCQQCvLeZfj1G0wuJb
8JTcVeZaZftncEmRluOnaME3ustd918lRMDYokZmtmDZN8SrP0yd1pfVqZ7NkmBA 8JTcVeZaZftncEmRluOnaME3ustd918lRMDYokZmtmDZN8SrP0yd1pfVqZ7NkmBA
CbBX0k7pAgMBAAEwDQYJKoZIhvcNAQEEBQADQQDnV8QNFVVJx/+7IselU0wsepqM CbBX0k7pAgMBAAEwDQYJKoZIhvcNAQEEBQADQQDnV8QNFVVJx/+7IselU0wsepqM
urivXZzuxOmTEmTVDzCJx1xhA8jd3vGAj7XDIYiPub1PV23eY5a2ARJuw5w9 urivXZzuxOmTEmTVDzCJx1xhA8jd3vGAj7XDIYiPub1PV23eY5a2ARJuw5w9
-----END CERTIFICATE----- -----END CERTIFICATE-----

@ -955,7 +955,7 @@ hdr_field_t* get_hdr_by_name(const sip_msg_t* const msg, const char* const name,
for(hdr = msg->headers; hdr; hdr = hdr->next) { for(hdr = msg->headers; hdr; hdr = hdr->next) {
if(hdr->name.len == name_len && *hdr->name.s==*name if(hdr->name.len == name_len && *hdr->name.s==*name
&& strncmp(hdr->name.s, name, name_len)==0) && strncasecmp(hdr->name.s, name, name_len)==0)
return hdr; return hdr;
} }
return NULL; return NULL;
@ -968,7 +968,7 @@ hdr_field_t* next_sibling_hdr_by_name(const hdr_field_t* const hf)
for(hdr = hf->next; hdr; hdr = hdr->next) { for(hdr = hf->next; hdr; hdr = hdr->next) {
if(hdr->name.len == hf->name.len && *hdr->name.s==*hf->name.s if(hdr->name.len == hf->name.len && *hdr->name.s==*hf->name.s
&& strncmp(hdr->name.s, hf->name.s, hf->name.len)==0) && strncasecmp(hdr->name.s, hf->name.s, hf->name.len)==0)
return hdr; return hdr;
} }
return NULL; return NULL;

@ -55,6 +55,13 @@ static inline int do_parse_rr_body(char *buf, int len, rr_t **head)
trim_leading(&s); trim_leading(&s);
last = 0; last = 0;
if (*head) {
/* go to last rr in list */
last = *head;
while (last->next) {
last = last->next;
}
}
while(1) { while(1) {
/* Allocate and clear rr structure */ /* Allocate and clear rr structure */
@ -128,7 +135,8 @@ static inline int do_parse_rr_body(char *buf, int len, rr_t **head)
error: error:
if (r) free_rr(&r); if (r) free_rr(&r);
free_rr(head); /* Free any contacts created so far */ free_rr(head); /* Free any rr created so far */
*head = NULL;
LM_ERR("Failed parsing rr header body [%.*s]\n", len, ZSW(buf)); LM_ERR("Failed parsing rr header body [%.*s]\n", len, ZSW(buf));
return -1; return -1;

@ -996,9 +996,11 @@ int parse_uri(char* buf, int len, struct sip_uri* uri)
if (scheme==URN_SCH){ if (scheme==URN_SCH){
uri->host.s=s; uri->host.s=s;
uri->host.len=p-s; uri->host.len=p-s;
DBG("parsed urn scheme...\n"); DBG("parsed urn scheme with host: %.*s\n",
uri->host.len, uri->host.s);
/* this is the port, it can't be the passwd */ /* this is the port, it can't be the passwd */
}else goto error_bad_port; }else goto error_bad_port;
break;
case URI_HOST_P: case URI_HOST_P:
case URI_HOST6_END: case URI_HOST6_END:
uri->host.s=s; uri->host.s=s;

@ -1,5 +1,5 @@
%define name kamailio %define name kamailio
%define ver 4.4.6 %define ver 4.4.7
%define rel 0.0%{dist} %define rel 0.0%{dist}

@ -1,6 +1,8 @@
[Unit] [Unit]
Description=Kamailio (OpenSER) - the Open Source SIP Server Description=Kamailio (OpenSER) - the Open Source SIP Server
After=network.target Documentation=man:kamailio(8) https://www.kamailio.org/
Wants=network-online.target
After=network-online.target
[Service] [Service]
Type=forking Type=forking
@ -14,7 +16,7 @@ PIDFile=/run/kamailio/kamailio.pid
# ExecStart requires a full absolute path # ExecStart requires a full absolute path
ExecStart=/usr/sbin/kamailio -P /run/kamailio/kamailio.pid -f $CFGFILE -m $SHM_MEMORY -M $PKG_MEMORY ExecStart=/usr/sbin/kamailio -P /run/kamailio/kamailio.pid -f $CFGFILE -m $SHM_MEMORY -M $PKG_MEMORY
ExecStopPost=/usr/bin/rm -f /var/run/kamailio.pid ExecStopPost=/usr/bin/rm -f /var/run/kamailio.pid
Restart=on-abort Restart=on-failure
User=kamailio User=kamailio
Group=daemon Group=daemon
; For each TCP or TLS endpoint connection is requred file descriptor ; For each TCP or TLS endpoint connection is requred file descriptor

@ -1,5 +1,5 @@
%define name kamailio %define name kamailio
%define ver 4.4.6 %define ver 4.4.7
%define rel 1%{dist} %define rel 1%{dist}
%bcond_with dnssec %bcond_with dnssec

@ -21,6 +21,10 @@ sed -i -e 's/RADCLI/FREERADIUS/' ${DIST}/rules
# old mysql # old mysql
sed -i -e 's/default-mysql-client/mysql-client/' \ sed -i -e 's/default-mysql-client/mysql-client/' \
-e 's/default-libmysqlclient-dev/libmysqlclient-dev/' ${DIST}/control -e 's/default-libmysqlclient-dev/libmysqlclient-dev/' ${DIST}/control
echo "kamailio source: build-depends-on-obsolete-package build-depends: libmysqlclient-dev => default-libmysqlclient-dev" >> \
${DIST}/source.lintian-overrides
echo "kamailio-mysql-modules: depends-on-obsolete-package depends: mysql-client => default-mysql-client" >> \
${DIST}/kamailio-mysql-modules.lintian-overrides
# no libssl-dev # no libssl-dev
sed -i -e '/libssl-dev/d' ${DIST}/control sed -i -e '/libssl-dev/d' ${DIST}/control

@ -46,6 +46,10 @@ sed -i -e '/^EXTRA_EXCLUDED_MODULES=/s/$/ cnxcc/' ${DIST}/rules
# old mysql # old mysql
sed -i -e 's/default-mysql-client/mysql-client/' \ sed -i -e 's/default-mysql-client/mysql-client/' \
-e 's/default-libmysqlclient-dev/libmysqlclient-dev/' ${DIST}/control -e 's/default-libmysqlclient-dev/libmysqlclient-dev/' ${DIST}/control
echo "kamailio source: build-depends-on-obsolete-package build-depends: libmysqlclient-dev => default-libmysqlclient-dev" >> \
${DIST}/source.lintian-overrides
echo "kamailio-mysql-modules: depends-on-obsolete-package depends: mysql-client => default-mysql-client" >> \
${DIST}/kamailio-mysql-modules.lintian-overrides
# no libssl-dev # no libssl-dev
sed -i -e '/libssl-dev/d' ${DIST}/control sed -i -e '/libssl-dev/d' ${DIST}/control

@ -96,9 +96,18 @@ sed -i -e '/^EXTRA_EXCLUDED_MODULES=/s/$/ jansson/' ${DIST}/rules
sed -i -e 's/ jansson[ ,$]*//' ${DIST}/control sed -i -e 's/ jansson[ ,$]*//' ${DIST}/control
sed -i -e 's/janssonrpc-c//' ${DIST}/control sed -i -e 's/janssonrpc-c//' ${DIST}/control
# no http_async_client module needs libevent 2
sed -i -e 's/ http_async_client//' ${DIST}/control
sed -i -e 's/ http_async[ ,$]*/ /' ${DIST}/rules
sed -i -e '/^EXTRA_EXCLUDED_MODULES=/s/$/ http_async/' ${DIST}/rules
# old mysql # old mysql
sed -i -e 's/default-mysql-client/mysql-client/' \ sed -i -e 's/default-mysql-client/mysql-client/' \
-e 's/default-libmysqlclient-dev/libmysqlclient-dev/' ${DIST}/control -e 's/default-libmysqlclient-dev/libmysqlclient-dev/' ${DIST}/control
echo "kamailio source: build-depends-on-obsolete-package build-depends: libmysqlclient-dev => default-libmysqlclient-dev" >> \
${DIST}/source.lintian-overrides
echo "kamailio-mysql-modules: depends-on-obsolete-package depends: mysql-client => default-mysql-client" >> \
${DIST}/kamailio-mysql-modules.lintian-overrides
# no libssl-dev # no libssl-dev
sed -i -e '/libssl-dev/d' ${DIST}/control sed -i -e '/libssl-dev/d' ${DIST}/control

@ -26,6 +26,10 @@ sed -i -e 's/RADCLI/FREERADIUS/' ${DIST}/rules
# old mysql # old mysql
sed -i -e 's/default-mysql-client/mysql-client/' \ sed -i -e 's/default-mysql-client/mysql-client/' \
-e 's/default-libmysqlclient-dev/libmysqlclient-dev/' ${DIST}/control -e 's/default-libmysqlclient-dev/libmysqlclient-dev/' ${DIST}/control
echo "kamailio source: build-depends-on-obsolete-package build-depends: libmysqlclient-dev => default-libmysqlclient-dev" >> \
${DIST}/source.lintian-overrides
echo "kamailio-mysql-modules: depends-on-obsolete-package depends: mysql-client => default-mysql-client" >> \
${DIST}/kamailio-mysql-modules.lintian-overrides
# no libssl-dev # no libssl-dev
sed -i -e '/libssl-dev/d' ${DIST}/control sed -i -e '/libssl-dev/d' ${DIST}/control

@ -52,6 +52,10 @@ sed -i -e '/^EXTRA_EXCLUDED_MODULES=/s/$/ cnxcc/' ${DIST}/rules
# old mysql # old mysql
sed -i -e 's/default-mysql-client/mysql-client/' \ sed -i -e 's/default-mysql-client/mysql-client/' \
-e 's/default-libmysqlclient-dev/libmysqlclient-dev/' ${DIST}/control -e 's/default-libmysqlclient-dev/libmysqlclient-dev/' ${DIST}/control
echo "kamailio source: build-depends-on-obsolete-package build-depends: libmysqlclient-dev => default-libmysqlclient-dev" >> \
${DIST}/source.lintian-overrides
echo "kamailio-mysql-modules: depends-on-obsolete-package depends: mysql-client => default-mysql-client" >> \
${DIST}/kamailio-mysql-modules.lintian-overrides
# no libssl-dev # no libssl-dev
sed -i -e '/libssl-dev/d' ${DIST}/control sed -i -e '/libssl-dev/d' ${DIST}/control

@ -14,6 +14,10 @@ sed -i 's/libxmlrpc-c3-dev/libxmlrpc-core-c3-dev/' ${DIST}/control
# old mysql # old mysql
sed -i -e 's/default-mysql-client/mysql-client/' \ sed -i -e 's/default-mysql-client/mysql-client/' \
-e 's/default-libmysqlclient-dev/libmysqlclient-dev/' ${DIST}/control -e 's/default-libmysqlclient-dev/libmysqlclient-dev/' ${DIST}/control
echo "kamailio source: build-depends-on-obsolete-package build-depends: libmysqlclient-dev => default-libmysqlclient-dev" >> \
${DIST}/source.lintian-overrides
echo "kamailio-mysql-modules: depends-on-obsolete-package depends: mysql-client => default-mysql-client" >> \
${DIST}/kamailio-mysql-modules.lintian-overrides
# no libssl-dev # no libssl-dev
sed -i -e '/libssl-dev/d' ${DIST}/control sed -i -e '/libssl-dev/d' ${DIST}/control

@ -1,3 +1,9 @@
kamailio (4.4.7) unstable; urgency=medium
* version set to 4.4.7
-- Victor Seva <vseva@debian.org> Mon, 26 Feb 2018 11:11:19 +0100
kamailio (4.4.6) unstable; urgency=medium kamailio (4.4.6) unstable; urgency=medium
* version set to 4.4.6 * version set to 4.4.6

@ -2,56 +2,58 @@ Source: kamailio
Section: net Section: net
Priority: optional Priority: optional
Maintainer: Debian VoIP Team <pkg-voip-maintainers@lists.alioth.debian.org> Maintainer: Debian VoIP Team <pkg-voip-maintainers@lists.alioth.debian.org>
Uploaders: Victor Seva <linuxmaniac@torreviejawireless.org>, Uploaders:
Tzafrir Cohen <tzafrir@debian.org> Victor Seva <linuxmaniac@torreviejawireless.org>,
Build-Depends: bison, Tzafrir Cohen <tzafrir@debian.org>,
debhelper (>= 9), Build-Depends:
dh-systemd (>= 1.5), bison,
docbook-xml, debhelper (>= 9),
dpkg-dev (>= 1.16.1.1), default-libmysqlclient-dev,
erlang-dev, dh-systemd (>= 1.5),
flex, docbook-xml,
gcj-jdk, dpkg-dev (>= 1.16.1.1),
libconfuse-dev, erlang-dev,
libcurl4-openssl-dev, flex,
libdb-dev (>= 4.6.19), gcj-jdk,
libev-dev, libconfuse-dev,
libevent-dev, libcurl4-openssl-dev,
libexpat1-dev, libdb-dev (>= 4.6.19),
libgeoip-dev (>= 1.4.5), libev-dev,
libhiredis-dev (>= 0.10.0), libevent-dev,
libjansson-dev, libexpat1-dev,
libjson-c-dev, libgeoip-dev (>= 1.4.5),
libldap2-dev, libhiredis-dev (>= 0.10.0),
liblua5.1-0-dev, libjansson-dev,
libmemcached-dev, libjson-c-dev,
libmono-2.0-dev, libldap2-dev,
default-libmysqlclient-dev, liblua5.1-0-dev,
libncurses5-dev, libmemcached-dev,
libpcre3-dev, libmono-2.0-dev,
libperl-dev, libncurses5-dev,
libpq-dev, libpcre3-dev,
libpurple-dev, libperl-dev,
librabbitmq-dev, libpq-dev,
libradcli-dev, libpurple-dev,
libreadline-dev, librabbitmq-dev,
libsasl2-dev, libradcli-dev,
libsctp-dev, libreadline-dev,
libsnmp-dev, libsasl2-dev,
libsqlite3-dev, libsctp-dev,
libunistring-dev, libsnmp-dev,
libval-dev, libsqlite3-dev,
libxml2-dev, libssl-dev,
libxmlrpc-c3-dev, libunistring-dev,
libssl-dev, libval-dev,
openssl, libxml2-dev,
pkg-config, libxmlrpc-c3-dev,
python, openssl,
python-dev, pkg-config,
unixodbc-dev, python,
uuid-dev, python-dev,
xsltproc, unixodbc-dev,
zlib1g-dev uuid-dev,
xsltproc,
zlib1g-dev,
Standards-Version: 3.9.5 Standards-Version: 3.9.5
Homepage: http://www.kamailio.org/ Homepage: http://www.kamailio.org/
Vcs-git: git://anonscm.debian.org/pkg-voip/kamailio.git Vcs-git: git://anonscm.debian.org/pkg-voip/kamailio.git
@ -60,28 +62,32 @@ Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-voip/kamailio.git
Package: kamailio Package: kamailio
Architecture: linux-any Architecture: linux-any
Multi-Arch: foreign Multi-Arch: foreign
Pre-Depends: ${misc:Pre-Depends} Pre-Depends:
Depends: adduser, ${misc:Pre-Depends},
python, Depends:
${misc:Depends}, adduser,
${shlibs:Depends} lsb-base,
Suggests: kamailio-berkeley-modules, python,
kamailio-carrierroute-modules, ${misc:Depends},
kamailio-cpl-modules, ${shlibs:Depends},
kamailio-dbg, Suggests:
kamailio-ldap-modules, kamailio-berkeley-modules,
kamailio-lua-modules, kamailio-carrierroute-modules,
kamailio-mysql-modules, kamailio-cpl-modules,
kamailio-perl-modules, kamailio-dbg,
kamailio-postgres-modules, kamailio-ldap-modules,
kamailio-presence-modules, kamailio-lua-modules,
kamailio-python-modules, kamailio-mysql-modules,
kamailio-radius-modules, kamailio-perl-modules,
kamailio-snmpstats-modules, kamailio-postgres-modules,
kamailio-tls-modules, kamailio-presence-modules,
kamailio-unixodbc-modules, kamailio-python-modules,
kamailio-xml-modules, kamailio-radius-modules,
kamailio-xmpp-modules kamailio-snmpstats-modules,
kamailio-tls-modules,
kamailio-unixodbc-modules,
kamailio-xml-modules,
kamailio-xmpp-modules,
Description: very fast and configurable SIP proxy Description: very fast and configurable SIP proxy
Kamailio is a very fast and flexible SIP (RFC3261) Kamailio is a very fast and flexible SIP (RFC3261)
proxy server. Written entirely in C, Kamailio can handle thousands calls proxy server. Written entirely in C, Kamailio can handle thousands calls
@ -104,9 +110,11 @@ Priority: extra
Section: debug Section: debug
Architecture: linux-any Architecture: linux-any
Multi-Arch: same Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends} Pre-Depends:
Depends: kamailio (= ${binary:Version}), ${misc:Pre-Depends},
${misc:Depends} Depends:
kamailio (= ${binary:Version}),
${misc:Depends},
Description: very fast and configurable SIP proxy [debug symbols] Description: very fast and configurable SIP proxy [debug symbols]
Kamailio is a very fast and flexible SIP (RFC3261) Kamailio is a very fast and flexible SIP (RFC3261)
proxy server. Written entirely in C, Kamailio can handle thousands calls proxy server. Written entirely in C, Kamailio can handle thousands calls
@ -118,10 +126,12 @@ Description: very fast and configurable SIP proxy [debug symbols]
Package: kamailio-geoip-modules Package: kamailio-geoip-modules
Architecture: linux-any Architecture: linux-any
Multi-Arch: same Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends} Pre-Depends:
Depends: kamailio (= ${binary:Version}), ${misc:Pre-Depends},
${misc:Depends}, Depends:
${shlibs:Depends} kamailio (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: contains the geoip module Description: contains the geoip module
Kamailio is a very fast and flexible SIP (RFC3261) Kamailio is a very fast and flexible SIP (RFC3261)
proxy server. Written entirely in C, Kamailio can handle thousands calls proxy server. Written entirely in C, Kamailio can handle thousands calls
@ -133,11 +143,14 @@ Description: contains the geoip module
Package: kamailio-sqlite-modules Package: kamailio-sqlite-modules
Architecture: linux-any Architecture: linux-any
Multi-Arch: same Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends} Pre-Depends:
Depends: kamailio (= ${binary:Version}), ${misc:Pre-Depends},
${misc:Depends}, Depends:
${shlibs:Depends} kamailio (= ${binary:Version}),
Recommends: sqlite3 ${misc:Depends},
${shlibs:Depends},
Recommends:
sqlite3,
Description: SQLite database connectivity module for Kamailio Description: SQLite database connectivity module for Kamailio
Kamailio is a very fast and flexible SIP (RFC3261) Kamailio is a very fast and flexible SIP (RFC3261)
proxy server. Written entirely in C, Kamailio can handle thousands calls proxy server. Written entirely in C, Kamailio can handle thousands calls
@ -148,10 +161,12 @@ Description: SQLite database connectivity module for Kamailio
Package: kamailio-json-modules Package: kamailio-json-modules
Architecture: linux-any Architecture: linux-any
Multi-Arch: same Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends} Pre-Depends:
Depends: kamailio (= ${binary:Version}), ${misc:Pre-Depends},
${misc:Depends}, Depends:
${shlibs:Depends} kamailio (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: Json parser and jsonrpc modules for Kamailio Description: Json parser and jsonrpc modules for Kamailio
Kamailio is a very fast and flexible SIP (RFC3261) Kamailio is a very fast and flexible SIP (RFC3261)
proxy server. Written entirely in C, Kamailio can handle thousands calls proxy server. Written entirely in C, Kamailio can handle thousands calls
@ -163,11 +178,14 @@ Description: Json parser and jsonrpc modules for Kamailio
Package: kamailio-memcached-modules Package: kamailio-memcached-modules
Architecture: linux-any Architecture: linux-any
Multi-Arch: same Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends} Pre-Depends:
Depends: kamailio (= ${binary:Version}), ${misc:Pre-Depends},
${misc:Depends}, Depends:
${shlibs:Depends} kamailio (= ${binary:Version}),
Replaces: kamailio-memcached-module ${misc:Depends},
${shlibs:Depends},
Replaces:
kamailio-memcached-module,
Description: Provides the memcached module, an interface to the memcached server Description: Provides the memcached module, an interface to the memcached server
Kamailio is a very fast and flexible SIP (RFC3261) Kamailio is a very fast and flexible SIP (RFC3261)
proxy server. Written entirely in C, Kamailio can handle thousands calls proxy server. Written entirely in C, Kamailio can handle thousands calls
@ -179,10 +197,12 @@ Description: Provides the memcached module, an interface to the memcached server
Package: kamailio-lua-modules Package: kamailio-lua-modules
Architecture: linux-any Architecture: linux-any
Multi-Arch: same Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends} Pre-Depends:
Depends: kamailio (= ${binary:Version}), ${misc:Pre-Depends},
${misc:Depends}, Depends:
${shlibs:Depends} kamailio (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: contains the app_lua module Description: contains the app_lua module
Kamailio is a very fast and flexible SIP (RFC3261) Kamailio is a very fast and flexible SIP (RFC3261)
proxy server. Written entirely in C, Kamailio can handle thousands calls proxy server. Written entirely in C, Kamailio can handle thousands calls
@ -194,10 +214,12 @@ Description: contains the app_lua module
Package: kamailio-mono-modules Package: kamailio-mono-modules
Architecture: linux-any Architecture: linux-any
Multi-Arch: same Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends} Pre-Depends:
Depends: kamailio (= ${binary:Version}), ${misc:Pre-Depends},
${misc:Depends}, Depends:
${shlibs:Depends} kamailio (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: contains the app_mono module Description: contains the app_mono module
Kamailio is a very fast and flexible SIP (RFC3261) Kamailio is a very fast and flexible SIP (RFC3261)
proxy server. Written entirely in C, Kamailio can handle thousands calls proxy server. Written entirely in C, Kamailio can handle thousands calls
@ -209,11 +231,13 @@ Description: contains the app_mono module
Package: kamailio-python-modules Package: kamailio-python-modules
Architecture: linux-any Architecture: linux-any
Multi-Arch: same Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends} Pre-Depends:
Depends: kamailio (= ${binary:Version}), ${misc:Pre-Depends},
python-dev, Depends:
${misc:Depends}, kamailio (= ${binary:Version}),
${shlibs:Depends} python-dev,
${misc:Depends},
${shlibs:Depends},
Description: contains the app_python module Description: contains the app_python module
Kamailio is a very fast and flexible SIP (RFC3261) Kamailio is a very fast and flexible SIP (RFC3261)
proxy server. Written entirely in C, Kamailio can handle thousands calls proxy server. Written entirely in C, Kamailio can handle thousands calls
@ -225,10 +249,12 @@ Description: contains the app_python module
Package: kamailio-redis-modules Package: kamailio-redis-modules
Architecture: linux-any Architecture: linux-any
Multi-Arch: same Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends} Pre-Depends:
Depends: kamailio (= ${binary:Version}), ${misc:Pre-Depends},
${misc:Depends}, Depends:
${shlibs:Depends} kamailio (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: Redis database connectivity module for Kamailio Description: Redis database connectivity module for Kamailio
Kamailio is a very fast and flexible SIP (RFC3261) Kamailio is a very fast and flexible SIP (RFC3261)
proxy server. Written entirely in C, Kamailio can handle thousands calls proxy server. Written entirely in C, Kamailio can handle thousands calls
@ -239,11 +265,13 @@ Description: Redis database connectivity module for Kamailio
Package: kamailio-mysql-modules Package: kamailio-mysql-modules
Architecture: linux-any Architecture: linux-any
Multi-Arch: same Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends} Pre-Depends:
Depends: kamailio (= ${binary:Version}), ${misc:Pre-Depends},
default-mysql-client | virtual-mysql-client, Depends:
${misc:Depends}, default-mysql-client | virtual-mysql-client,
${shlibs:Depends} kamailio (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: MySQL database connectivity module for Kamailio Description: MySQL database connectivity module for Kamailio
Kamailio is a very fast and flexible SIP (RFC3261) Kamailio is a very fast and flexible SIP (RFC3261)
proxy server. Written entirely in C, Kamailio can handle thousands calls proxy server. Written entirely in C, Kamailio can handle thousands calls
@ -254,11 +282,13 @@ Description: MySQL database connectivity module for Kamailio
Package: kamailio-postgres-modules Package: kamailio-postgres-modules
Architecture: linux-any Architecture: linux-any
Multi-Arch: same Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends} Pre-Depends:
Depends: kamailio (= ${binary:Version}), ${misc:Pre-Depends},
postgresql-client, Depends:
${misc:Depends}, kamailio (= ${binary:Version}),
${shlibs:Depends} postgresql-client,
${misc:Depends},
${shlibs:Depends},
Description: PostgreSQL database connectivity module for Kamailio Description: PostgreSQL database connectivity module for Kamailio
Kamailio is a very fast and flexible SIP (RFC3261) Kamailio is a very fast and flexible SIP (RFC3261)
proxy server. Written entirely in C, Kamailio can handle thousands calls proxy server. Written entirely in C, Kamailio can handle thousands calls
@ -269,10 +299,12 @@ Description: PostgreSQL database connectivity module for Kamailio
Package: kamailio-cpl-modules Package: kamailio-cpl-modules
Architecture: linux-any Architecture: linux-any
Multi-Arch: same Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends} Pre-Depends:
Depends: kamailio (= ${binary:Version}), ${misc:Pre-Depends},
${misc:Depends}, Depends:
${shlibs:Depends} kamailio (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: CPL module (CPL interpreter engine) for Kamailio Description: CPL module (CPL interpreter engine) for Kamailio
Kamailio is a very fast and flexible SIP (RFC3261) Kamailio is a very fast and flexible SIP (RFC3261)
proxy server. Written entirely in C, Kamailio can handle thousands calls proxy server. Written entirely in C, Kamailio can handle thousands calls
@ -284,10 +316,12 @@ Description: CPL module (CPL interpreter engine) for Kamailio
Package: kamailio-radius-modules Package: kamailio-radius-modules
Architecture: linux-any Architecture: linux-any
Multi-Arch: same Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends} Pre-Depends:
Depends: kamailio (= ${binary:Version}), ${misc:Pre-Depends},
${misc:Depends}, Depends:
${shlibs:Depends} kamailio (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: RADIUS modules for Kamailio Description: RADIUS modules for Kamailio
Kamailio is a very fast and flexible SIP (RFC3261) Kamailio is a very fast and flexible SIP (RFC3261)
proxy server. Written entirely in C, Kamailio can handle thousands calls proxy server. Written entirely in C, Kamailio can handle thousands calls
@ -300,10 +334,12 @@ Description: RADIUS modules for Kamailio
Package: kamailio-unixodbc-modules Package: kamailio-unixodbc-modules
Architecture: linux-any Architecture: linux-any
Multi-Arch: same Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends} Pre-Depends:
Depends: kamailio (= ${binary:Version}), ${misc:Pre-Depends},
${misc:Depends}, Depends:
${shlibs:Depends} kamailio (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: unixODBC database connectivity module for Kamailio Description: unixODBC database connectivity module for Kamailio
Kamailio is a very fast and flexible SIP (RFC3261) Kamailio is a very fast and flexible SIP (RFC3261)
proxy server. Written entirely in C, Kamailio can handle thousands calls proxy server. Written entirely in C, Kamailio can handle thousands calls
@ -314,10 +350,12 @@ Description: unixODBC database connectivity module for Kamailio
Package: kamailio-presence-modules Package: kamailio-presence-modules
Architecture: linux-any Architecture: linux-any
Multi-Arch: same Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends} Pre-Depends:
Depends: kamailio (= ${binary:Version}), ${misc:Pre-Depends},
${misc:Depends}, Depends:
${shlibs:Depends} kamailio (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: SIMPLE presence modules for Kamailio Description: SIMPLE presence modules for Kamailio
Kamailio is a very fast and flexible SIP (RFC3261) Kamailio is a very fast and flexible SIP (RFC3261)
proxy server. Written entirely in C, Kamailio can handle thousands calls proxy server. Written entirely in C, Kamailio can handle thousands calls
@ -330,10 +368,12 @@ Description: SIMPLE presence modules for Kamailio
Package: kamailio-perl-modules Package: kamailio-perl-modules
Architecture: linux-any Architecture: linux-any
Multi-Arch: same Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends} Pre-Depends:
Depends: kamailio (= ${binary:Version}), ${misc:Pre-Depends},
${misc:Depends}, Depends:
${shlibs:Depends} kamailio (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: Perl extensions and database driver for Kamailio Description: Perl extensions and database driver for Kamailio
Kamailio is a very fast and flexible SIP (RFC3261) Kamailio is a very fast and flexible SIP (RFC3261)
proxy server. Written entirely in C, Kamailio can handle thousands calls proxy server. Written entirely in C, Kamailio can handle thousands calls
@ -345,11 +385,13 @@ Description: Perl extensions and database driver for Kamailio
Package: kamailio-snmpstats-modules Package: kamailio-snmpstats-modules
Architecture: linux-any Architecture: linux-any
Multi-Arch: same Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends} Pre-Depends:
Depends: kamailio (= ${binary:Version}), ${misc:Pre-Depends},
snmpd, Depends:
${misc:Depends}, kamailio (= ${binary:Version}),
${shlibs:Depends} snmpd,
${misc:Depends},
${shlibs:Depends},
Description: SNMP AgentX subagent module for Kamailio Description: SNMP AgentX subagent module for Kamailio
Kamailio is a very fast and flexible SIP (RFC3261) Kamailio is a very fast and flexible SIP (RFC3261)
proxy server. Written entirely in C, Kamailio can handle thousands calls proxy server. Written entirely in C, Kamailio can handle thousands calls
@ -361,10 +403,12 @@ Description: SNMP AgentX subagent module for Kamailio
Package: kamailio-purple-modules Package: kamailio-purple-modules
Architecture: linux-any Architecture: linux-any
Multi-Arch: same Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends} Pre-Depends:
Depends: kamailio (= ${binary:Version}), ${misc:Pre-Depends},
${misc:Depends}, Depends:
${shlibs:Depends} kamailio (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: Provides the purple module, a multi-protocol IM gateway Description: Provides the purple module, a multi-protocol IM gateway
Kamailio is a very fast and flexible SIP (RFC3261) Kamailio is a very fast and flexible SIP (RFC3261)
proxy server. Written entirely in C, Kamailio can handle thousands calls proxy server. Written entirely in C, Kamailio can handle thousands calls
@ -376,10 +420,12 @@ Description: Provides the purple module, a multi-protocol IM gateway
Package: kamailio-xmpp-modules Package: kamailio-xmpp-modules
Architecture: linux-any Architecture: linux-any
Multi-Arch: same Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends} Pre-Depends:
Depends: kamailio (= ${binary:Version}), ${misc:Pre-Depends},
${misc:Depends}, Depends:
${shlibs:Depends} kamailio (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: XMPP gateway module for Kamailio Description: XMPP gateway module for Kamailio
Kamailio is a very fast and flexible SIP (RFC3261) Kamailio is a very fast and flexible SIP (RFC3261)
proxy server. Written entirely in C, Kamailio can handle thousands calls proxy server. Written entirely in C, Kamailio can handle thousands calls
@ -390,13 +436,17 @@ Description: XMPP gateway module for Kamailio
Package: kamailio-xml-modules Package: kamailio-xml-modules
Architecture: linux-any Architecture: linux-any
Multi-Arch: same Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends} Pre-Depends:
Depends: kamailio (= ${binary:Version}), ${misc:Pre-Depends},
${misc:Depends}, Depends:
${shlibs:Depends} kamailio (= ${binary:Version}),
Replaces: kamailio-xml-module, ${misc:Depends},
kamailio-xmlrpc-module ${shlibs:Depends},
Provides: kamailio-xmlrpc-modules Replaces:
kamailio-xml-module,
kamailio-xmlrpc-module,
Provides:
kamailio-xmlrpc-modules,
Description: XML based extensions for Kamailio's Management Interface Description: XML based extensions for Kamailio's Management Interface
Kamailio is a very fast and flexible SIP (RFC3261) Kamailio is a very fast and flexible SIP (RFC3261)
proxy server. Written entirely in C, Kamailio can handle thousands calls proxy server. Written entirely in C, Kamailio can handle thousands calls
@ -410,10 +460,12 @@ Description: XML based extensions for Kamailio's Management Interface
Package: kamailio-carrierroute-modules Package: kamailio-carrierroute-modules
Architecture: linux-any Architecture: linux-any
Multi-Arch: same Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends} Pre-Depends:
Depends: kamailio (= ${binary:Version}), ${misc:Pre-Depends},
${misc:Depends}, Depends:
${shlibs:Depends} kamailio (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: carrierroute module for Kamailio Description: carrierroute module for Kamailio
Kamailio is a very fast and flexible SIP (RFC3261) Kamailio is a very fast and flexible SIP (RFC3261)
proxy server. Written entirely in C, Kamailio can handle thousands calls proxy server. Written entirely in C, Kamailio can handle thousands calls
@ -425,11 +477,13 @@ Description: carrierroute module for Kamailio
Package: kamailio-berkeley-modules Package: kamailio-berkeley-modules
Architecture: linux-any Architecture: linux-any
Multi-Arch: same Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends} Pre-Depends:
Depends: db5.1-util, ${misc:Pre-Depends},
kamailio (= ${binary:Version}), Depends:
${misc:Depends}, db-util (>= 4.6.19),
${shlibs:Depends} kamailio (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: Berkeley database module for Kamailio Description: Berkeley database module for Kamailio
Kamailio is a very fast and flexible SIP (RFC3261) Kamailio is a very fast and flexible SIP (RFC3261)
proxy server. Written entirely in C, Kamailio can handle thousands calls proxy server. Written entirely in C, Kamailio can handle thousands calls
@ -442,9 +496,11 @@ Description: Berkeley database module for Kamailio
Package: kamailio-berkeley-bin Package: kamailio-berkeley-bin
Architecture: linux-any Architecture: linux-any
Multi-Arch: foreign Multi-Arch: foreign
Pre-Depends: ${misc:Pre-Depends} Pre-Depends:
Depends: ${misc:Depends}, ${misc:Pre-Depends},
${shlibs:Depends} Depends:
${misc:Depends},
${shlibs:Depends},
Description: Berkeley database module for Kamailio - helper program Description: Berkeley database module for Kamailio - helper program
Kamailio is a very fast and flexible SIP (RFC3261) Kamailio is a very fast and flexible SIP (RFC3261)
proxy server. Written entirely in C, Kamailio can handle thousands calls proxy server. Written entirely in C, Kamailio can handle thousands calls
@ -457,10 +513,12 @@ Description: Berkeley database module for Kamailio - helper program
Package: kamailio-ldap-modules Package: kamailio-ldap-modules
Architecture: linux-any Architecture: linux-any
Multi-Arch: same Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends} Pre-Depends:
Depends: kamailio (= ${binary:Version}), ${misc:Pre-Depends},
${misc:Depends}, Depends:
${shlibs:Depends} kamailio (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: LDAP modules for Kamailio Description: LDAP modules for Kamailio
Kamailio is a very fast and flexible SIP (RFC3261) Kamailio is a very fast and flexible SIP (RFC3261)
proxy server. Written entirely in C, Kamailio can handle thousands calls proxy server. Written entirely in C, Kamailio can handle thousands calls
@ -473,10 +531,12 @@ Description: LDAP modules for Kamailio
Package: kamailio-ims-modules Package: kamailio-ims-modules
Architecture: linux-any Architecture: linux-any
Multi-Arch: same Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends} Pre-Depends:
Depends: kamailio (= ${binary:Version}), ${misc:Pre-Depends},
${misc:Depends}, Depends:
${shlibs:Depends} kamailio (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: IMS module for Kamailio Description: IMS module for Kamailio
Kamailio is a very fast and flexible SIP (RFC3261) Kamailio is a very fast and flexible SIP (RFC3261)
proxy server. Written entirely in C, Kamailio can handle thousands calls proxy server. Written entirely in C, Kamailio can handle thousands calls
@ -488,10 +548,12 @@ Description: IMS module for Kamailio
Package: kamailio-utils-modules Package: kamailio-utils-modules
Architecture: linux-any Architecture: linux-any
Multi-Arch: same Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends} Pre-Depends:
Depends: kamailio (= ${binary:Version}), ${misc:Pre-Depends},
${misc:Depends}, Depends:
${shlibs:Depends} kamailio (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: Provides a set utility functions for Kamailio Description: Provides a set utility functions for Kamailio
Kamailio is a very fast and flexible SIP (RFC3261) Kamailio is a very fast and flexible SIP (RFC3261)
proxy server. Written entirely in C, Kamailio can handle thousands calls proxy server. Written entirely in C, Kamailio can handle thousands calls
@ -505,10 +567,12 @@ Description: Provides a set utility functions for Kamailio
Package: kamailio-sctp-modules Package: kamailio-sctp-modules
Architecture: linux-any Architecture: linux-any
Multi-Arch: same Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends} Pre-Depends:
Depends: kamailio (= ${binary:Version}), ${misc:Pre-Depends},
${misc:Depends}, Depends:
${shlibs:Depends} kamailio (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: sctp module for Kamailio Description: sctp module for Kamailio
Kamailio is a very fast and flexible SIP (RFC3261) Kamailio is a very fast and flexible SIP (RFC3261)
proxy server. Written entirely in C, Kamailio can handle thousands calls proxy server. Written entirely in C, Kamailio can handle thousands calls
@ -519,11 +583,13 @@ Description: sctp module for Kamailio
Package: kamailio-java-modules Package: kamailio-java-modules
Architecture: linux-any Architecture: linux-any
Multi-Arch: same Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends} Pre-Depends:
Depends: gcj-jre, ${misc:Pre-Depends},
kamailio (= ${binary:Version}), Depends:
${misc:Depends}, gcj-jre,
${shlibs:Depends} kamailio (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: contains the app_java module Description: contains the app_java module
Kamailio is a very fast and flexible SIP (RFC3261) Kamailio is a very fast and flexible SIP (RFC3261)
proxy server. Written entirely in C, Kamailio can handle thousands calls proxy server. Written entirely in C, Kamailio can handle thousands calls
@ -535,10 +601,12 @@ Description: contains the app_java module
Package: kamailio-tls-modules Package: kamailio-tls-modules
Architecture: linux-any Architecture: linux-any
Multi-Arch: same Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends} Pre-Depends:
Depends: kamailio (= ${binary:Version}), ${misc:Pre-Depends},
${misc:Depends}, Depends:
${shlibs:Depends} kamailio (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: contains the TLS kamailio transport module Description: contains the TLS kamailio transport module
This has been split out of the main kamailio package, so that kamailio will This has been split out of the main kamailio package, so that kamailio will
not depend on openssl. This module will enable you to use the TLS transport. not depend on openssl. This module will enable you to use the TLS transport.
@ -546,10 +614,12 @@ Description: contains the TLS kamailio transport module
Package: kamailio-outbound-modules Package: kamailio-outbound-modules
Architecture: linux-any Architecture: linux-any
Multi-Arch: same Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends} Pre-Depends:
Depends: kamailio (= ${binary:Version}), ${misc:Pre-Depends},
${misc:Depends}, Depends:
${shlibs:Depends} kamailio (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: Outbound module for Kamailio Description: Outbound module for Kamailio
Kamailio is a very fast and flexible SIP (RFC3261) Kamailio is a very fast and flexible SIP (RFC3261)
proxy server. Written entirely in C, Kamailio can handle thousands calls proxy server. Written entirely in C, Kamailio can handle thousands calls
@ -560,10 +630,12 @@ Description: Outbound module for Kamailio
Package: kamailio-websocket-modules Package: kamailio-websocket-modules
Architecture: linux-any Architecture: linux-any
Multi-Arch: same Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends} Pre-Depends:
Depends: kamailio (= ${binary:Version}), ${misc:Pre-Depends},
${misc:Depends}, Depends:
${shlibs:Depends} kamailio (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: Websocket module for kamailio Description: Websocket module for kamailio
Kamailio is a very fast and flexible SIP (RFC3261) Kamailio is a very fast and flexible SIP (RFC3261)
proxy server. Written entirely in C, Kamailio can handle thousands calls proxy server. Written entirely in C, Kamailio can handle thousands calls
@ -574,10 +646,12 @@ Description: Websocket module for kamailio
Package: kamailio-dnssec-modules Package: kamailio-dnssec-modules
Architecture: linux-any Architecture: linux-any
Multi-Arch: same Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends} Pre-Depends:
Depends: kamailio (= ${binary:Version}), ${misc:Pre-Depends},
${misc:Depends}, Depends:
${shlibs:Depends} kamailio (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: contains the dnssec module Description: contains the dnssec module
Kamailio is a very fast and flexible SIP (RFC3261) Kamailio is a very fast and flexible SIP (RFC3261)
proxy server. Written entirely in C, Kamailio can handle thousands calls proxy server. Written entirely in C, Kamailio can handle thousands calls
@ -588,10 +662,12 @@ Description: contains the dnssec module
Package: kamailio-autheph-modules Package: kamailio-autheph-modules
Architecture: linux-any Architecture: linux-any
Multi-Arch: same Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends} Pre-Depends:
Depends: kamailio (= ${binary:Version}), ${misc:Pre-Depends},
${misc:Depends}, Depends:
${shlibs:Depends} kamailio (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: authentication using ephemeral credentials module for Kamailio Description: authentication using ephemeral credentials module for Kamailio
Kamailio is a very fast and flexible SIP (RFC3261) Kamailio is a very fast and flexible SIP (RFC3261)
proxy server. Written entirely in C, Kamailio can handle thousands calls proxy server. Written entirely in C, Kamailio can handle thousands calls
@ -602,10 +678,12 @@ Description: authentication using ephemeral credentials module for Kamailio
Package: kamailio-kazoo-modules Package: kamailio-kazoo-modules
Architecture: linux-any Architecture: linux-any
Multi-Arch: same Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends} Pre-Depends:
Depends: kamailio (= ${binary:Version}), ${misc:Pre-Depends},
${misc:Depends}, Depends:
${shlibs:Depends} kamailio (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: kazoo modules for Kamailio Description: kazoo modules for Kamailio
Kamailio is a very fast and flexible SIP (RFC3261) Kamailio is a very fast and flexible SIP (RFC3261)
proxy server. Written entirely in C, Kamailio can handle thousands calls proxy server. Written entirely in C, Kamailio can handle thousands calls
@ -616,10 +694,12 @@ Description: kazoo modules for Kamailio
Package: kamailio-cnxcc-modules Package: kamailio-cnxcc-modules
Architecture: linux-any Architecture: linux-any
Multi-Arch: same Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends} Pre-Depends:
Depends: kamailio (= ${binary:Version}), ${misc:Pre-Depends},
${misc:Depends}, Depends:
${shlibs:Depends} kamailio (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: cnxcc modules for Kamailio Description: cnxcc modules for Kamailio
Kamailio is a very fast and flexible SIP (RFC3261) Kamailio is a very fast and flexible SIP (RFC3261)
proxy server. Written entirely in C, Kamailio can handle thousands calls proxy server. Written entirely in C, Kamailio can handle thousands calls
@ -630,10 +710,12 @@ Description: cnxcc modules for Kamailio
Package: kamailio-erlang-modules Package: kamailio-erlang-modules
Architecture: linux-any Architecture: linux-any
Multi-Arch: same Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends} Pre-Depends:
Depends: kamailio (= ${binary:Version}), ${misc:Pre-Depends},
${misc:Depends}, Depends:
${shlibs:Depends} kamailio (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: erlang modules for Kamailio Description: erlang modules for Kamailio
Kamailio is a very fast and flexible SIP (RFC3261) Kamailio is a very fast and flexible SIP (RFC3261)
proxy server. Written entirely in C, Kamailio can handle thousands calls proxy server. Written entirely in C, Kamailio can handle thousands calls
@ -645,37 +727,41 @@ Description: erlang modules for Kamailio
Package: kamailio-extra-modules Package: kamailio-extra-modules
Architecture: linux-any Architecture: linux-any
Multi-Arch: same Multi-Arch: same
Pre-Depends: ${misc:Pre-Depends} Pre-Depends:
Depends: kamailio (= ${binary:Version}), ${misc:Pre-Depends},
${misc:Depends}, Depends:
${shlibs:Depends} kamailio (= ${binary:Version}),
${misc:Depends},
${shlibs:Depends},
Description: extra modules for Kamailio Description: extra modules for Kamailio
Kamailio is a very fast and flexible SIP (RFC3261) Kamailio is a very fast and flexible SIP (RFC3261)
proxy server. Written entirely in C, Kamailio can handle thousands calls proxy server. Written entirely in C, Kamailio can handle thousands calls
per second even on low-budget hardware. per second even on low-budget hardware.
. .
This package provides: gzcompress uuid ev jansson janssonrpc-c This package provides: gzcompress uuid evapi jansson janssonrpc-c http_async_client
Package: kamailio-nth Package: kamailio-nth
Architecture: any Architecture: any
Pre-Depends: ${misc:Pre-Depends} Pre-Depends:
Depends: binutils, ${misc:Pre-Depends},
bison, Depends:
bvi, binutils,
flex, bison,
gcc, bvi,
gdb, flex,
iftop, gcc,
lsof, gdb,
mc, iftop,
most, less | most,
ngrep, lsof,
psmisc, mc,
screen, ngrep,
sipsak, psmisc,
tcpdump, screen,
vim, sipsak,
${misc:Depends} tcpdump,
vim,
${misc:Depends},
Description: Kamailio - package for "nice to have" installation Description: Kamailio - package for "nice to have" installation
This is a metapackage for easy installation various useful tools that may be This is a metapackage for easy installation various useful tools that may be
handy on server with Kamailio installed. handy on server with Kamailio installed.

@ -41,7 +41,7 @@ PACKAGE_GROUPS=mysql postgres berkeley unixodbc radius presence \
erlang erlang
# module groups to be packaged onto kamailio-extra-modules # module groups to be packaged onto kamailio-extra-modules
EXTRA_GROUPS=gzcompress uuid ev jansson EXTRA_GROUPS=gzcompress uuid ev jansson http_async
# name of libdir in the path for libraries (e.g., lib for 32b, lib64 for 64b) # name of libdir in the path for libraries (e.g., lib for 32b, lib64 for 64b)
export LIBDIR ?= lib/$(DEB_HOST_MULTIARCH) export LIBDIR ?= lib/$(DEB_HOST_MULTIARCH)

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save