The pcre2 API was changed from
pcre2_substring_list_free(PCRE2_SPTR *)
to
pcre2_substring_list_free(PCRE2_UCHAR **)
in 10.43. The difference is a `const` qualifier. Work around this.
Closes#1869
Change-Id: Ib3dd3003352f6c3155bb47d69ecb7a1b02f4647a
(cherry picked from commit 4ebebe08d8)
Obsolete str_init(), rename STR_INIT() to just STR(), and replace all
instances of str_init() with STR().
no-op
Change-Id: I981529063ad2ea26089add467f7a84b638dbf423
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
In the file implementations follow the rules:
1. Firstly goes the correlated header file, then one empty row.
2. Secondly go system headers, so in angle-brackets, then one empty row.
3. Thirdly, go custom header files, so in double quotes,
then one empty row.
4. If there is "xt_RTPENGINE.h", it's mentioned next, but separately,
then one empty row.
5. If there are pre-processor definitions, they are added.
6. And eventually at least one empty row before the code.
In some situations it's allowed to step aside from the rules,
when inclusions are dependent on each other, so on the sequence,
and also possibly on some inline objects definitions, but if possible
to follow the rules, it's being done.
Change-Id: Ie512a970e230fe202398656d1942e8874bb14cd9
UDP packets sent in response to a UDP request should have the same
source address as the request's destination address.
This can be achieved with sockets bound to a specific address, but in
the case of ANY-bound sockets, we can use the PKTINFO mechanism to do
this.
Extend control_ng_process() to accept an extra socket address
corresponding to the local address to use. Extend the signature of the
callback function (to do the actual sending) accordingly.
Extend socket_sendiov() to be able to set the PKTINFO cmsg when sending
a packet.
Add socket_sendto_from() as a convenience wrapper.
Extend control_udp_incoming() to pass the address from
udp_buf->local_addr back to socket_sendiov().
Change-Id: Idd019fdcfd796098e7807427e6686d4b05de35d1
All functions that create listener objects take a read-only endpoint, so
make them as const.
Remove the extra TOS argument to make all signatures the same.
Change-Id: I722c7665b192476d90dbf0ece200d0bfd34cb9eb
We have long switched to having a single primary global poller, so
there's no point in passing the poller pointer around and storing it in
associated objects. Remove all remnants of non-global pollers.
Change-Id: I5a3fd217d5de51e839e2b04fec7e23643ee83631
This is useful for functions which are used both from a timer and from
other callers. These functions would reset the logging context at their
end to free the reference held by the logging context, which would
wrongly reset the logging context when the same function was called from
a different code path. Using a stack with push/pop semantics makes it
safe to use these functions from any code path.
Additionally introduce an explicit reset function that clears the entire
stack regardless of context. This reset function is called at the end of
every work iteration in every worker thread, just in case not everything
was popped from the stack.
Change-Id: I0e2c142b95806b26473c65a882737e39d161d24d
Handling of dual stack v4/v6 was previously done by the individual
listener objects for INADDR_ANY listening addresses. If listening on
INADDR_ANY was requested, then each listener would create two instances,
one for IPv4 and one for IPv6. This works fine for INADDR_ANY but fails
for listening on host names that resolve to multiple addresses, such as
`localhost`.
Solve this by relieving the listener objects from handling this and
instead handle it in the code setting up the listeners. If a host name
resolves to multiple addresses, then set up multiple listeners (up to
two supported currently). This allows us to listen on `localhost` by
default and have both 127.0.0.1 and ::1 active. INADDR_ANY is handled
specially by also setting up :: in that case.
Change-Id: I2a1e1d7090d7d23863c7a9bb1e89b85ad2ea44f4
This brings master up to date with branch `rfuchs/socket-rework` at
commit `b1bcc096b7`. The branches have diverged too much for a proper
merge, so this is a manual (squashed) merge.
The old master before this merge can be found in branch
`old-master-before-socket-rework` (commit `82199216b2`).
This is a complete rewrite of all socket handling routines. The most
important functional change is that sockets aren't indiscriminately
bound to INADDR_ANY (or rather in6addr_any), but instead are always
bound to their respective local interface address and with the correct
address family.
Side effects of this are that in multi-homed environments, multiple
sockets must be opened (one per interface address and family) which must
be taken into account when considering RLIMIT_NOFILE values. As a
benefit, this change allows rtpengine to utilize the full UDP port space
per interface address, instead of just one port space per machine.
The socket abstraction also makes it possible to support RTP over TCP in
the future.
Change-Id: If6cf4f42136229490186d2d2482fb4fc140c2b53
Creates a preliminary log tag with the call-id whenever possible.
Changes log level of underlying NG messages to DEBUG.
Does a pretty-printed dump of NG responses.
Closes#73
Hinzufügen der Adresse des SIP-Proxy, der die session erstellt hat
(sowohl für command line interface als auch CDR) Nur UDP control
zunächst.
Author: Frederic-Philippe Metz <Frederic.Metz@1und1.de>
Introduce generic "objects" with reference counting primitives and automatic
resource deallocation when no refs are left ("garbage collection"). Overhaul
poller framework to make extensive use of these objects to allow for future
thread-concurrent operation.
No locking added anywhere yet except in poller. Poller is still not 100%
thread safe, but close.
Valgrind reports no errors or memleaks.