Use ngbuf's free function to destroy the JSON parser instead of the
callback for the bencode_buffer object.
Change-Id: I7eccf7284f55b34ef1a4800017ea1a4519f42bbc
To support asynchronous pollers which may hold references on underlying
sockets, let the poller close the socket after it has released its
references. This prevents cases of file descriptor re-use while an
underlying socket is still open.
Add reset_socket() to be used in place of close_socket() which does the
same thing except the actual closing of the socket.
Add poller_del_item_callback() for cases where more action than just
closing the file descriptor is needed.
Change-Id: Iefda1487ecb89263729120ecb964436dd79b2a0e
Support is desired for Kamailio/Rtpengine traffic via UDP.
Adding homer-disable-rtcp-stats and homer-enable-ng config params to
separately control sending to Homer each traffic type. By default rtcp
is `on` when homer parameter is configured. NG is by default disabled.
closes#1802
Change-Id: Ib68fb133cffc5d8945f9b6bf60bab3e80fab9630
Add support of rtpp_flags parsing for the daemon.
From now on, it's possible to parse option flags
on the daemon side instead of the kamailio module.
It's identical to what the module does, but the
difference is:
- module sends general call identification such as:
call-id, From/To tags, viabranch using bencode
- meanwhile all generic/non-generic option flags
are added to the `rtpp_flags` bencode member as str
- parsing of that is done as usually using the
`call_ng_main_flags()` / `call_ng_flags_flags()`
and additionally using new parser `parse_rtpp_flags()`
New file implementation and header introduced:
- control_ng_flags_parser.c
- control_ng_flags_parser.h
Otherwise no functional changes, and the parsing itself
remains working following the same algorithm.
Change-Id: I59e47fa1947e2aeaa0bbf3930a0f21d9a6d669ad
The poller-per-thread feature was broken with a division by zero. Take
the opportunity to rework it and eliminate the poller_map object. Use a
simple array of pollers for media sockets, plus one global poller for
control sockets. In the regular case only one poller is created and
everything points to that poller. In the poller-per-thread case, one
poller per thread is created, plus one poller (also with its own single
thread) for control connections. All control sockets use the single
control poller, while all media sockets get assigned one poller from the
pool in a round-robin fashion.
closes#1801
Change-Id: Iae91a3e10b7206455c6df33b1a472254c700ce21
For convenience we provide extra HTTP and WS endpoints that accept a
cookie-less NG or JSON message string. Not all commands are sensitive to
retransmits and this makes it easier to query call status etc.
Change-Id: Iffbc4ef9a5fdf916a374dfdd4042c61b437d18c9
Create a separate function that actually processes a message packet
without dealing with the cookie
Change-Id: I163a48ff3d508ae95617eaa76403bf2cf702cff8
Graphite isn't able to deal with spaces in the metric names delivered to
it. Introduce special version of the command strings with spaces
replaced by underscores.
closes#1780
Change-Id: Ie8bcec5ca4f2d427e92901f6fa76b985df6e459e