pkg: kamailio - provide -f $CFGFILE to init.d config check function

- reported by Grant Bagdasarian

(cherry picked from commit f7fe8b68ffb100fbaa27344e4bee7ba69c760584)
core: Improve tcp stats output

- Add connection ref count
- Add websocket protocols
(cherry picked from commit fb4dc4b7b866239a90a4d6441ed319664697edab)
modules/websocket: Fix pkg memory leaks

- Fix pkg memory leaks in error cases
- Fix incorrect memory allocation size for ws connections
- Fix typo in websocket stats
(cherry picked from commit d0f88e19577d9b914922f83049075b7786f3d8df)
modules/tls: Free TLS data for secure websocket connections
(cherry picked from commit 074f12c5a444188aa023797ac70e2d38d225cb18)
core: Fix connection leak with websockets

- Decrease connection ref count after using connection
(cherry picked from commit ffdae5987b99b9bfd39992d407a3a0a33aa772ab)
modules/websocket: Fix connection leaks

- Decrease the TCP connection reference count after each use
(cherry picked from commit 27474179bdeef0ddaba05389f510446a387d85e1)

Resolved conflicts due to new feeatures in master:

	modules/websocket/ws_conn.c
	modules/websocket/ws_handshake.c
core: fix TCP connection leak

- patch provided by Vitally Aleksandrov
(cherry picked from commit 6cfd13cbddd1869ffbc947fdecd77d18a3fcb886)
sca: fix race condition when two endpoints seize same index simultaneously

- return 480 Temporarily Unavailable to loser of race.
(cherry picked from commit 522d06e75bf3c549af007701332f7db53a1b5ab6)
sca: make sca_reply a generic reply function.

- take a pre-filled extra_headers parameter instead, add with add_lump_rpl.
(cherry picked from commit d6d71b0e217226fe43491a0e9ba75ec0a6649cd5)
sca: reject out-of-dialog attempts to seize privately held call.

- per spec, reject with 403 Forbidden.
(cherry picked from commit e565748048d7a6b6fda0a28959e092380c5bc26a)
sca: move SUBSCRIBE response handling to sca_subscription_reply

- create necessary headers, pass to newly generic sca_reply function.
(cherry picked from commit d528c27b6fa69530bfde4a6ce83c5d4dcc6499a5)
sca: fix regression dropping Expires header from SUBSCRIBE replies.

- extra_headers.len lacked Expires header length after snprintf.
(cherry picked from commit 3b557293a33f6f3003fdd62a45e02cf8736b534e)
sca: fix private hold handling

- private hold call-info was being ignored in hold reINVITEs, causing
  inaccurate "active" notifications to go to subscribers.
(cherry picked from commit 81b5473f5a191a5aa81295acf0d96a22160f7f31)
sca: reduce log level to DBG when replacing RURI when retrieving held call.
(cherry picked from commit a51bc822f70f4185b55455456dc147205cbbbdc7)
modules/sca: process BYE without Call-Info from shared line.

- Ciscos & Aastras don't seem include Call-Info header in BYE. Look up
  dialog by tags and release associated appearance-index.
(cherry picked from commit 287cccf2af17e5f2f8fe09c41025b4d27bb4fda9)
modules/sca: fix SCA_CALL_INFO_EMPTY macro

- test should be a logical OR, not AND.
(cherry picked from commit 3339e7a5bd205599fed63f82536626732b3f23d9)
modules/sca: ensure line-seize sub update uses index from request

- lazy removal of line-seize subscriptions that were not used for a
  call could lead to failure to release expired seized appearance.
  Client must have a lingering, expired line-seize subscription that
  hasn't yet been purged by the timer, and indices must not match.
  Fix ensures that the appearance-index from the new line-seize
  subscription overwrites the index left over from the expired one.
(cherry picked from commit 43cc6015e8604e309672da4d754b5022d1e256c9)
modules/sca: reduce verbosity of RPC sca.all_subscriptions output

- accommodate more subscriptions without hitting kamcmd buffer limits.
(cherry picked from commit a9e555e6e41271e015c47d29ba85276673d3b7b6)
modules/sca: clear appearance on t_reply with error after receiving 18x.

- Receiving a 18x provisional reply triggers line-seize subscription
  termination. Releasing the seized appearance while processing a t_reply
  with an error status *after* getting a 18x would fail because
  sca_subscription_terminate could not find a matching line-seize
  subscription. In that case, look up appearance by tags and release it.
(cherry picked from commit aa0c84475140dc44186c68e9c544367553c891c2)
modules/sca: add check for empty AoR in lock_shared_appearance calls.

- Sanity checking
(cherry picked from commit 8ce54ef9b33ef533b3f4474b2c68c9ae454db458)