summaryrefslogtreecommitdiff
path: root/res/res_hep_rtcp.c
AgeCommit message (Collapse)Author
2017-11-20Loader: Remove unneeded load_pri declarations.Corey Farrell
Instead of specifying AST_MODFLAG_LOAD_ORDER with load_pri AST_MODPRI_DEFAULT just use AST_MODFLAG_DEFAULT. Change-Id: I0123258eafce324249433a69df15a85cc16e509f
2017-05-18res_hep_rtcp: Add support level to module infoSean Bright
Change-Id: I5661478f9cf12d431f730e42be79323b62831e92
2017-05-09res_hep_rtcp: Provide chan_sip Call-ID for RTCP messages.Joshua Colp
This change adds the required logic to allow the SIP Call-ID to be placed into the HEP RTCP traffic if the chan_sip module is used. In cases where the option is enabled but the channel is not either SIP or PJSIP then the code will fallback to the channel name as done previously. Based on the change on Nir's branch at: team/nirs/hep-chan-sip-support ASTERISK-26427 Change-Id: I09ffa5f6e2fdfd99ee999650ba4e0a7aad6dc40d
2017-04-12modules: change module LOAD_FAILUREs to LOAD_DECLINESGeorge Joseph
In all non-pbx modules, AST_MODULE_LOAD_FAILURE has been changed to AST_MODULE_LOAD_DECLINE. This prevents asterisk from exiting if a module can't be loaded. If the user wishes to retain the FAILURE behavior for a specific module, they can use the "require" or "preload-require" keyword in modules.conf. A new API was added to logger: ast_is_logger_initialized(). This allows asterisk.c/check_init() to print to the error log once the logger subsystem is ready instead of just to stdout. If something does fail before the logger is initialized, we now print to stderr instead of stdout. Change-Id: I5f4b50623d9b5a6cb7c5624a8c5c1274c13b2b25
2016-06-08res_hep_{pjsip|rtcp}: Decline module loads if res_hep had not loadedMatt Jordan
A crash can occur in res_hep_pjsip or res_hep_rtcp if res_hep has not loaded and does not have a configuration file. Previously when this occurred, checks were put in to see if the configuration was loaded successfully. While this is a good idea - and has been added to the offending function in res_hep - the reality is res_hep_pjsip and res_hep_rtcp have no business running if res_hep isn't also running. As such, this patch also adds a function to res_hep that returns whether or not it successfully loaded. Oddly enough, ast_module_check returns "everything is peachy" even if a module declined its load - so it cannot be solely relied on. res_hep_pjsip and res_hep_rtcp now also check this function to see if they should continue to load; if it fails, they decline their load as well. ASTERISK-26096 #close Change-Id: I007e535fcc2e51c2ca48534f48c5fc2ac38935ea
2016-05-13res_hep: Provide an option to pick the UUID typeMatt Jordan
At one point in time, it seemed like a good idea to use the Asterisk channel name as the HEP correlation UUID. In particular, it felt like this would be a useful identifier to tie PJSIP messages and RTCP messages together, along with whatever other data we may eventually send to Homer. This also had the benefit of keeping the correlation UUID channel technology agnostic. In practice, it isn't as useful as hoped, for two reasons: 1) The first INVITE request received doesn't have a channel. As a result, there is always an 'odd message out', leading it to be potentially uncorrelated in Homer. 2) Other systems sending capture packets (Kamailio) use the SIP Call-ID. This causes RTCP information to be uncorrelated to the SIP message traffic seen by those capture nodes. In order to support both (in case someone is trying to use res_hep_rtcp with a non-PJSIP channel), this patch adds a new option, uuid_type, with two valid values - 'call-id' and 'channel'. The uuid_type option is used by a module to determine the preferred UUID type. When available, that source of a correlation UUID is used; when not, the more readily available source is used. For res_hep_pjsip: - uuid_type = call-id: the module uses the SIP Call-ID header value - uuid_type = channel: the module uses the channel name if available, falling back to SIP Call-ID if not For res_hep_rtcp: - uuid_type = call-id: the module uses the SIP Call-ID header if the channel type is PJSIP and we have a channel, falling back to the Stasis event provided channel name if not - uuid_type = channel: the module uses the channel name ASTERISK-25352 #close Change-Id: Ide67e59a52d9c806e3cc0a797ea1a4b88a00122c
2015-05-22Stasis: Fix unsafe use of stasis_unsubscribe in modules.Corey Farrell
Many uses of stasis_unsubscribe in modules can be reached through unload. These have been switched to stasis_unsubscribe_and_join. Some subscription callbacks do nothing, for these I've created a noop callback function in stasis.c. This is used by some modules that monitor MWI topics in order to enable cache, since the callback does not become invalid after dlclose it is safe to use stasis_unsubscribe on these, even during module unload. ASTERISK-25121 #close Change-Id: Ifc2549fbd8eef7d703c222978e8f452e2972189c
2014-08-14res/res_hep_rtcp: Remove dependency on PJSIPMatthew Jordan
The res_hep_rtcp module was incorrectly including <pjsip.h>. This didn't need to be included, as the module does not using PJPROJECT any fashion. Unfortunately, because res_hep_rtcp did not include pjsip in its MODULEINFO as a dependency, this also meant that res_hep_rtcp will fail to compile on a system without PJPROJECT. This patch removes the include. Thanks to Damien Wedhorn for pointing this out in #asterisk-dev. ASTERISK-24236 #close Reported by: Damien Wedhorn, Matt Jordan Tested by: Damien Wedhorn ........ Merged revisions 421064 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@421065 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-11res_hep: Remove disabling of modulesMatthew Jordan
These modules were originally specified as being disabled, as they were introduced midstream in Asterisk 12. That makes it nicer for folks who are upgrading to a new release in the middle of Asterisk 12. That's not the case for Asterisk 13: it's a brand new release. There's no reason to have the modules disabled by default in that case. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@420742 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-31res_hep_rtcp: Add module that sends RTCP information to a Homer ServerMatthew Jordan
This patch adds a new module to Asterisk, res_hep_rtcp. The module subscribes to the RTCP topics in Stasis and receives RTCP information back from the message bus. It encodes into HEPv3 packets and sends the information to the res_hep module for transmission. Using this, someone with a Homer server can get live call quality monitoring for all RTP-based channels in their Asterisk 12+ systems. In addition, there were a few bugs in the RTP engine, res_rtp_asterisk, and chan_pjsip that were uncovered by the tests written for the Asterisk Test Suite. This patch fixes the following: 1) chan_pjsip failed to set its channel unique ids on its RTP instance on outbound calls. It now does this in the appropriate location, in the serialized call callback. 2) The rtp_engine was overflowing some values when packed into JSON. Specifically, some longs and unsigned ints can't be be packed into integer values, for obvious reasons. Since libjansson only supports integers, floats, strings, booleans, and objects, we print these values into strings. 3) res_rtp_asterisk had a few problems: (a) it would emit a source IP address of 0.0.0.0 if bound to that IP address. We now use ast_find_ourip to get a better IP address, and properly marshal the result into an ast_strdupa'd string. (b) Reports can be generated with no report bodies. In particular, this occurs when a sender is transmitting information to a receiver (who will send no RTP back to the sender). As such, the sender has no report body for what it received. We now properly handle this case, and the sender will emit SR reports with no body. Likewise, if we receive an RTCP packet with no report body, we will still generate the appropriate events. ASTERISK-24119 #close ........ Merged revisions 419823 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@419825 65c4cc65-6c06-0410-ace0-fbb531ad65f3