Richard Fuchs
f2527c47bd
MT#55283 add "control-pmtu" option
...
Change-Id: I4c7319f69dc5242bd6a35ab13a9aa72f394b5d5c
2 years ago
Richard Fuchs
1cb7e0e05a
MT#55283 split up gauge stats bookkeeping
...
Distinguish between two different types of "gauge" type metrics: Actual
gauges which (at least conceptually) have a single continuous value, and
metrics which are comprised of discretely sampled values, possibly from
multiple sources.
Real gauges with continuous values don't have mean/average/deviation
values directly associated with them, as calculating these requires
sampling or some other analysis.
Sampled metrics on the other hand do have these associated values.
Clarify which function does what and where each value comes from.
Change-Id: Iff5dd844b70ff70979b1b8c84dc7734d44b3da20
2 years ago
Richard Fuchs
87ea144935
MT#56469 add pause_recording method
...
Change-Id: Iaffb2120be0ad4b7241913aacd7e7e68c9e666d2
2 years ago
Richard Fuchs
59a16e747b
TT#14008 add log_info_pop_until()
...
To safeguard against non-refcounted objects being left over in a log
info piece (e.g. a string on the stack), add this new function to pop
pieces from the stack until the desired one is removed. This is needed
in case of a unpaired log_info_* without a matching log_info_pop.
closes #1511
Change-Id: I689de14d034df779521dfdf59f923fdbf7fabc9b
3 years ago
Richard Fuchs
17bda4b1e8
TT#156900 fix master/slave race condition with early closed ports
...
When ports are closed early (while the call is still running), we must
first update a slave rtpengine with this new information (that these
ports are now closed) before actually releasing the ports ourselves. Not
doing so leads to a race condition where the master instance re-uses a
port that was just closed before the slave instance knows about the port
being closed.
We implement this using a thread-local list to keep track of ports that
were released while processing a control message, and process this list
to actually close the ports only after Redis has been updated.
Additional calls to the function to close the ports are placed in
strategic locations to make sure this is triggered in every code path.
closes #1495
Change-Id: I803f4594f30ca315da0b84c6e76893f54ca3a7c9
3 years ago
Richard Fuchs
6d1dfab77a
TT#14008 convert logging context to stack
...
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
3 years ago
Richard Fuchs
cf34ecc24c
TT#156900 rename functions to avoid namespace conflict
...
Change-Id: I676e35319518b468ed72da2dd58db7ec3ca33ea1
3 years ago
Richard Fuchs
12f23b311c
TT#157801 shift handling of v4/v6 addresses
...
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
3 years ago
Richard Fuchs
e11407ab8d
TT#144701 support JSON in NG protocol
...
Change-Id: I5ffe551c2712d0dece3490cd5653c6817603642d
3 years ago
Richard Fuchs
b9eea8c579
TT#14008 fix 32-bit compiler warnings
...
Change-Id: Ibf2d631245e2ee67ee2023647ceac349e8c9b605
4 years ago
Richard Fuchs
3fa16c6ab1
TT#101150 generalise ng command stats into array/list
...
Change-Id: I43c7074237ae70d9bcb12b4946ce2c751d135bc8
4 years ago
Richard Fuchs
d4102280b2
TT#101150 obsolete struct request_time stats
...
Change-Id: Icf3e0648a0ba821bc66c6dd0e8f5ebc30576fb70
4 years ago
Richard Fuchs
2b60a678e2
TT#101150 use STATS_INC macro for req stats
...
Change-Id: I7d205e4f6b168ac1031737e80a3bb6d7f455dc25
4 years ago
Richard Fuchs
ad64f4fa00
TT#101150 introduce proper struct for "counter" style stats
...
Change-Id: Ifd06c54b25126426fe21723b8fb7a21d9bd03cba
4 years ago
Richard Fuchs
30d91ecc63
TT#101150 add test script for stats output
...
Change-Id: I13cc172b082e78c3d52032bd72e0a2f5158c71ed
4 years ago
Richard Fuchs
1fd62d6857
TT#91151 populate "created from" for published calls
...
Change-Id: I01eacb87dc645615337b10814666c0d108ba9ac9
4 years ago
Richard Fuchs
f04332915b
TT#91151 add publish/subscribe commands
...
Change-Id: I1842b89efea7fa3af0bd4d045e49da31285cd0e1
4 years ago
Richard Fuchs
413798e43f
TT#132251 implement media silencing
...
Change-Id: I0902bd72e2733b96ff75bcf52856a58c51a750f6
4 years ago
Richard Fuchs
faee34f1a0
TT#14008 fix rand_hex_string usage
...
rand_hex_string() writes a terminated null byte, therefore the buffer
must be larger by one byte.
Change-Id: Ieca67754d67fd7e5f1c94b07ffc8d0de428f552a
4 years ago
Richard Fuchs
292ba2e72b
TT#111150 convert refcounting functions to macros
...
Convert ssrc_ctx_put() and ssrc_ctx_hold() to macros to aide in
debugging reference leaks. Having them as inline functions hides the
actual location of the refcount changes.
Obsolete ssrc_ctx_get() as returning values from macros is awkward and
it was only used in two locations.
Also fix a function invocation mishap: obj_get_o() should be used
instead of __obj_get() as the latter is an internal macro.
Change-Id: Icc0d63f04b3816632fd120c1c749cafabbbfa331
4 years ago
Damir Nedžibović
2fc54462de
TT#14008 Squashed commit of the following:
...
closes #1180
commit 023f6cbc9e0b595d1d02116d38d39358fbb9ee49
Merge: ae82034d
86e287d1
Author: Richard Fuchs <rfuchs@sipwise.com>
Date: Mon Feb 1 11:16:04 2021 -0500
Merge branch 'control_ng_tcp' of https://github.com/enreached/rtpengine into enreached-control_ng_tcp
Change-Id: I628dcfd30e901dbee97b00bee0b6bba0cb29826f
commit 86e287d117
Author: Damir Nedžibović <damir.nedzibovic@enreach.com>
Date: Mon Feb 1 16:38:53 2021 +0100
Update the readme file.
commit 35f5d9e151
Author: Damir Nedžibović <damir.nedzibovic@enreach.com>
Date: Mon Feb 1 16:20:09 2021 +0100
Update docs.
commit 336deb4c67
Author: Damir Nedžibović <damir.nedzibovic@enreach.com>
Date: Mon Feb 1 14:28:07 2021 +0100
Replace hex values with chars.
commit 37c86a8fa0
Merge: 17a10b96
5cd53ef1
Author: Damir Nedžibović <damir.nedzibovic@enreach.com>
Date: Mon Feb 1 13:51:06 2021 +0100
Merge branch 'control_ng_tcp' of github.com:enreached/rtpengine into control_ng_tcp
commit 17a10b96ad
Author: Damir Nedžibović <damir.nedzibovic@enreach.com>
Date: Thu Jan 28 18:09:10 2021 +0100
Add missing include.
commit adfddefae3
Author: Damir Nedžibović <damir.nedzibovic@enreach.com>
Date: Thu Jan 28 18:05:44 2021 +0100
Implementation of control-ng via TCP.
commit 5cd53ef1c9
Merge: 1bd3a8fc
b28ab075
Author: Damir Nedžibović <damir.nedzibovic@enreach.com>
Date: Mon Feb 1 13:49:50 2021 +0100
Merge branch 'control_ng_tcp' of github.com:enreached/rtpengine into control_ng_tcp
commit 1bd3a8fc6d
Author: Richard Fuchs <rfuchs@sipwise.com>
Date: Fri Jan 29 10:20:02 2021 -0500
TT#14008 fix AEAD kernel API for < 4.2
Untested whether it actually works
closes #1176
Change-Id: If6398632ac62525a673b844cfb4ce842a8aa0346
commit 71a222d7a8
Author: Richard Fuchs <rfuchs@sipwise.com>
Date: Fri Jan 29 13:07:25 2021 -0500
TT#14008 improve log output for stray packets
Change-Id: Ic4b03928b279aade761de3ba1646b5c27318e6a3
commit b28ab07532
Merge: 813a4f1c
6e4373af
Author: Damir Nedžibović <damir.nedzibovic@enreach.com>
Date: Fri Jan 29 09:21:31 2021 +0100
Merge branch 'control_ng_tcp' of github.com:enreached/rtpengine into control_ng_tcp
commit 813a4f1caa
Author: Damir Nedžibović <damir.nedzibovic@enreach.com>
Date: Thu Jan 28 18:09:10 2021 +0100
Add missing include.
commit 0c87a19c55
Author: Damir Nedžibović <damir.nedzibovic@enreach.com>
Date: Thu Jan 28 18:05:44 2021 +0100
Implementation of control-ng via TCP.
commit 6e4373affb
Merge: fbf74bfe
7799f23a
Author: Damir Nedžibović <damir.nedzibovic@enreach.com>
Date: Fri Jan 29 09:19:46 2021 +0100
Merge branch 'control_ng_tcp' of github.com:enreached/rtpengine into control_ng_tcp
commit fbf74bfe2d
Author: Richard Fuchs <rfuchs@sipwise.com>
Date: Wed Jan 27 10:18:14 2021 -0500
TT#14008 fix possible segfault
closes #1172
Change-Id: I94bb52c290c2032073e54528283660f03e694033
commit 1a5bcc0905
Author: Richard Fuchs <rfuchs@sipwise.com>
Date: Thu Jan 28 14:49:43 2021 -0500
TT#109251 fix redis restore segfault
Change-Id: I501a47b065e7b8ff28a3ac157c0ce567f228557f
commit b38b49fd60
Author: Richard Fuchs <rfuchs@sipwise.com>
Date: Thu Jan 28 13:44:44 2021 -0500
TT#102450 added tests for Ia9fa96cf
Change-Id: Ic9728e12a012335c30c5640ac0b5c88e39ad24ed
commit f33877bfe3
Author: Richard Fuchs <rfuchs@sipwise.com>
Date: Thu Jan 28 13:43:46 2021 -0500
TT#102450 fix some timestamping issues
Make sure G.722 rate multiplies is applied in the right places
Don't trust encoders to return proper timestamps, but instead track them
explicitly based on frame duration
Change-Id: Ia9fa96cf662da97159fa170c3a3f37516889e1bd
commit 39a25b954d
Author: Richard Fuchs <rfuchs@sipwise.com>
Date: Thu Jan 28 14:07:53 2021 -0500
TT#106101 mem leak fix for 554034eb7e
Change-Id: I9c410211580d8513a203a29f898970a78175d08b
commit 11d11aed90
Author: Richard Fuchs <rfuchs@sipwise.com>
Date: Thu Jan 28 13:41:28 2021 -0500
TT#14008 clean up some tests
Looks like packet order can be an issue in some cases
Change-Id: Ib8fb8c553c9d0f2919b24dda1e15e5a23832c619
commit 7799f23aa5
Merge: ba7ee9d6
e191e16c
Author: Damir Nedžibović <damir.nedzibovic@enreach.com>
Date: Fri Jan 29 09:18:24 2021 +0100
Merge branch 'master' of https://github.com/sipwise/rtpengine into control_ng_tcp
commit ba7ee9d6b1
Merge: f805d881
ffe187f1
Author: Damir Nedžibović <damir.nedzibovic@enreach.com>
Date: Thu Jan 28 18:15:58 2021 +0100
Merge branch 'control_ng_tcp' of github.com:enreached/rtpengine into control_ng_tcp
commit f805d881fa
Author: Damir Nedžibović <damir.nedzibovic@enreach.com>
Date: Thu Jan 28 18:09:10 2021 +0100
Add missing include.
commit c548a3ca4b
Author: Damir Nedžibović <damir.nedzibovic@enreach.com>
Date: Thu Jan 28 18:05:44 2021 +0100
Implementation of control-ng via TCP.
commit ffe187f116
Author: Damir Nedžibović <damir.nedzibovic@bad-team.net>
Date: Thu Jan 28 18:05:44 2021 +0100
Implementation of control-ng via TCP.
Change-Id: I2acf208fcff1fa9aa790c31f1097ad9b4b7c3238
4 years ago
Richard Fuchs
554034eb7e
TT#106101 also turn UDP/WS receive buffer into refcounted object
...
Change-Id: I81fa68b07af3a87e26d031a5722dcd103a1e620e
4 years ago
Richard Fuchs
28e0620c80
TT#106101 turn bencode buffer into shared refcounted object
...
Change-Id: I6d8e443d8b0fc7e9afe0a6f6b3cde3d1a85e42de
4 years ago
Richard Fuchs
30733ec5cd
TT#97301 support granular log levels
...
Change-Id: Ife458bd2449f61113a3e6db1708821570d92dc23
4 years ago
Richard Fuchs
5d895fb7be
TT#82405 add Prometheus stats exporter
...
Change-Id: Ic55b42a707e430a61c0422c65827ed2145511586
4 years ago
Richard Fuchs
e662b596f8
TT#91150 abstractise NG protocol handling
...
Change-Id: If00eede6803d9618c32dccbdcf82f5e41b64b2bf
5 years ago
Richard Fuchs
32d43fed4d
TT#91150 move to a global NG cookie cache
...
Change-Id: I8aa5275ffb4d53bb959acd6a8329e5a31f099000
5 years ago
Richard Fuchs
1589c29e28
TT#28300 add cleanup of poller related data
...
Change-Id: I64a38869ce3120d066fc818e3c76941a1c8186b7
5 years ago
Richard Fuchs
cdcf80c2c1
TT#82401 add statistics NG command
...
closes #992
Change-Id: I73284b8da6bc64c6e801f47cf6e00e52235b65ba
5 years ago
Richard Fuchs
b14f3b2b1c
TT#64259 support injecting DTMF tones and events
...
Change-Id: I07aa7690146db5b41be479a67aaafbd66aec4033
6 years ago
Richard Fuchs
26b725d024
TT#45617 add new options to support log markers for sensitive data
...
Change-Id: I2ffa4da4be3a05f043e7991612bbb37d8102d91a
6 years ago
Richard Fuchs
d279789e23
silence warnings when compiling with -DNDEBUG
...
Change-Id: I46d16f6c083d281622ce71644bcf8d224e0b36b7
6 years ago
Richard Fuchs
7f5e16d3da
TT#50652 add stop_media call
...
Change-Id: I1b18a41d4b97ccbb83499873e50a797f846a8602
6 years ago
Richard Fuchs
83965bdb1f
TT#50652 infrastructure to support reading/playing of media files
...
Change-Id: I8212f5c74bcb9557d41f80ef3a1595f53bafde8a
6 years ago
Richard Fuchs
3b28460507
TT#52651 Squashed commit of the following:
...
commit 2029144368
Author: Richard Fuchs <rfuchs@sipwise.com>
Date: Thu Feb 21 13:12:50 2019 -0500
TT#52651 switch TCP to TLS
Change-Id: Iab6b05d3b5c88553cbd6f531f3189084d9e71995
commit b28e718ee4
Author: Richard Fuchs <rfuchs@sipwise.com>
Date: Fri Feb 22 09:20:54 2019 -0500
TT#52651 generalise streambuf interface
Change-Id: I7d5ab8ffe13e52d4dbb1901531cc13fcc173d60d
commit cb2dbd2a92
Author: Richard Fuchs <rfuchs@sipwise.com>
Date: Tue Feb 19 09:32:56 2019 -0500
TT#52651 add start/stop forwarding commands and party selection logic
Change-Id: I8ef7e288d3a3e485bd2fa14e1a2407a0c8d94bac
commit 442c48f627
Author: Richard Fuchs <rfuchs@sipwise.com>
Date: Thu Feb 14 15:43:23 2019 -0500
TT#52651 produce output for TCP forwarding feature
Change-Id: I18543921577faf655679829684f5af46c0af5054
commit 2ef8028eb2
Author: Richard Fuchs <rfuchs@sipwise.com>
Date: Thu Feb 14 10:18:21 2019 -0500
TT#52651 make recording to output files optional
Change-Id: I12c288b965641352658ce3b499c2ee90593e1322
commit 10a58cd7a0
Author: Richard Fuchs <rfuchs@sipwise.com>
Date: Wed Feb 13 16:02:16 2019 -0500
TT#52651 strip streambuf into lib and include in recording daemon
Change-Id: I1f6638961e9e767063e0b4e6b5d55d88799366d3
commit 9d3bb5bffc
Author: Richard Fuchs <rfuchs@sipwise.com>
Date: Wed Feb 13 15:40:12 2019 -0500
TT#52651 extract/move unrelated old legacy decoder struct members
Change-Id: Iffd79b43180c30a9e128a460f7ba85ba49dedeaf
commit 1bc38e4201
Author: Richard Fuchs <rfuchs@sipwise.com>
Date: Tue Feb 12 16:43:42 2019 -0500
TT#52651 config options for forwarding option
Change-Id: Ieaa2ee0e55a0c531158174bc6a534738a64dbee6
commit 06d61cd3dd
Author: Richard Fuchs <rfuchs@sipwise.com>
Date: Tue Feb 12 16:29:52 2019 -0500
TT#52651 move socket.[ch] into lib/
includes necessary re-shuffling of additional code pieces
Change-Id: I74b314ab5936ac8a0eeaff94e084617b59b28d79
Change-Id: I025e8ec86b90ede79565542dff57ec1559d04200
6 years ago
Richard Fuchs
98de5697e6
TT#48650 use constant string hashing for string lookups
...
To avoid repeated strcmp()s and make use of switch()'s optimised binary
lookup, we employ a second build step that preprocesses certain .c files
and uses gperf to substitute pseudomacros with their respective constant
hash value.
Change-Id: Id89c4728a0fc7aa911691d4dd1ba8e7b3916a983
6 years ago
Richard Fuchs
04a83027a0
TT#43557 implement media blocking
...
Change-Id: I336cf7203c1236b3e596310690a89ce1c3fd8bf4
7 years ago
Richard Fuchs
e67b9c40da
TT#43556 support blocking of DTMF event packets
...
Change-Id: I7ef43ddb254b1583c2dc69b44a13b978eff15510
7 years ago
Huseyin Dikme
30ba1cd2a6
control command logs have been updated
7 years ago
Richard Fuchs
14ffd8feb0
TT#36303 support bandwidth usage resource limit
...
Also fixes logic for other resource limits
Change-Id: I263e097da5b5671826e0d92a28fb3a5c6f3ac193
7 years ago
Richard Fuchs
345836e90a
TT#35413 implement a CPU limit and a load limit
...
Change-Id: Ia0c605d17866c232353917f2980637fa7823dce4
7 years ago
Richard Fuchs
efcad1c628
TT#35413 add support for the 'load limit' ng protocol extension
...
Change-Id: I3f3897794050e0807f3cddb8044b3aa37b703d9c
7 years ago
Claudiu Boriga
ff2a278ad7
Make 'rtpengine-ctl' configurable via rtpengine-ctl
7 years ago
Claudiu Boriga
f7ece0452b
Merge remote-tracking branch 'sipwise/master' into add-requests-ps-stats
7 years ago
Claudiu Boriga
8cc4b7874e
Add statistics for requests per second
7 years ago
Richard Fuchs
b8dbd997e9
TT#30403 consolidate NG flags processing functions
...
Change-Id: Id200b0f064b72d8e60a6a744f764a8bb63655014
7 years ago
Richard Fuchs
75056a8dd1
eliminate the callmaster struct
...
Change-Id: I9151dbe8f47b3bb9ab67d6fea2fc3783bdc558da
7 years ago
Richard Fuchs
741140341f
move "totalstats" out of callmaster into global scope
...
Change-Id: Ia5b95e788c1d486a86b6f916dcff5b88022f5897
7 years ago
Richard Fuchs
790e596c58
move cngs out of callmaster into global scope
...
Change-Id: I138ca8756dfc576451bc7c3fca1db89d6616fb1e
7 years ago
Richard Fuchs
c17f4fe53d
avoid side effects in assert()
...
closes #434
Change-Id: I6aad7ccb556453650d80cf588ae80daf98d3369d
7 years ago