summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-01-25T.140: Fix format ref and memory leaks.Richard Mudgett
* channel.c:ast_sendtext(): Fix T.140 SendText memory leak. * format_compatibility.c: T.140 RED and T.140 were swapped. * res_rtp_asterisk.c:rtp_red_init(): Fix ast_format_t140_red ref leak. * res_rtp_asterisk.c:rtp_red_init(): Fix data race after starting periodic scheduled red_write(). * res_rtp_asterisk.c: Some other minor misc tweaks. Change-Id: Ifa27a2e0f8a966b1cf628607c86fc4374b0b88cb
2017-01-25Merge "stasis_bridge.c: Fix off-nominal stasis control ref leak."zuul
2017-01-25Merge "res_pjsip_endpoint_identifier_ip: Ensure error defaults to 0."George Joseph
2017-01-25Merge "chan_oss.c: Fix format ref leak in oss_read()."George Joseph
2017-01-24Merge "pjproject_bundled: Fix setting max log level"George Joseph
2017-01-24Merge "res_pjsip_pubsub.c: Implement "pjsip show subscriptions" commands."George Joseph
2017-01-24res_pjsip_endpoint_identifier_ip: Ensure error defaults to 0.Joshua Colp
When configuring a match using a netmask the error variable was not defaulting to 0. For some people this would cause the code to think an error occurred when adding the match when in reality it added perfectly fine. ASTERISK-26693 Change-Id: I850c250813742bddde65c84e739093c9e01dfe56
2017-01-24astobj2.c: Add excessive ref count trap.Richard Mudgett
Change-Id: I32e6a589cf9009450e4ff7cb85c07c9d9ef7fe4a
2017-01-24main/app.c: Memory corruption from early format destruction.Richard Mudgett
* make_silence() created a malloced silence slin frame without adding a slin format ref. When the frame is destroyed it will unref the slin format that never had a ref added. Memory corruption is expected to follow. * Simplified and fixed counting the number of samples in a frame list for make_silence(). * Eliminated an unnecessary RAII_VAR associated with the make_silence() frame. Change-Id: I47de3f9b92635b7f8b4d72309444d6c0aee6f747
2017-01-24frame.c: Fix off-nominal format ref leaks.Richard Mudgett
* ast_frisolate() could leak frame format refs on allocation failures. * Similified code in ast_frisolate() and code used by ast_frisolate(). Change-Id: I79566d4d36b3d7801bf0c8294fcd3e9a86a2ed6d
2017-01-24stasis_bridge.c: Fix off-nominal stasis control ref leak.Richard Mudgett
Change-Id: Ib17218343a6596832060180e19386da9df150ac8
2017-01-24res_musiconhold.c: Fix format ref leak when parsing MOH config class.Richard Mudgett
Change-Id: Ica8e8e2ce7604c2c61ec55bef07dc675361d2ea5
2017-01-24chan_oss.c: Fix format ref leak in oss_read().Richard Mudgett
Change-Id: I0a5d56c7dcf327d60f86a4c25a23571733709fd0
2017-01-24Add notes about embedded ast_frame structs holding a format ref.Richard Mudgett
mod_format.h: Note ast_filestream.fr holds a format ref. translate.h: Note ast_trans_pvt.f holds a format ref. Change-Id: I86bda354d725207b41e08920355d7c31b2d7f749
2017-01-24Merge "Free endpoint ACLs when destroying PJSIP endpoints."Joshua Colp
2017-01-24PJPROJECT logging: Fix detection of max supported log level.Richard Mudgett
The mechanism used for detecting the maximum log level compiled into the linked pjproject did not work. The API call simply stores the requested level into an integer and does no range checking. Asterisk was assuming that there was range checking and limited the new value to the allowable range. To get the actual maximum log level compiled into the linked pjproject we need to get and save off the initial set log level from pjproject. This is the maximum log level supported. * Get and save off the initial log level setting before altering it to the desired level on startup. This has to be done by a macro rather than calling a core function to avoid incorrectly linking pjproject. * Split the initial log level warning messages to warn if the linked pjproject cannot support the requested startup level and if it is too low to get the pjproject buildopts for "pjproject show buildopts". * Adjust the CLI "pjproject set log level" to check the saved max log level and to generate normal output messages instead of a warning message. ASTERISK-26743 #close Change-Id: I40aa76653e2a1dece66c3f8734594b4f0471cfb4
2017-01-24Merge "res_pjsip_endpoint_identifier_ip: Read settings before resolving."George Joseph
2017-01-23res_pjsip_pubsub.c: Implement "pjsip show subscriptions" commands.Richard Mudgett
ASTERISK-23828 #close Change-Id: Ifb8a3b61f447aedc58a8e6b36a810f7566018567
2017-01-23Free endpoint ACLs when destroying PJSIP endpoints.Mark Michelson
If endpoint ACLs were specified, they were not being freed when endpoints were destroyed. On systems with realtime endpoints, this could add up quickly since each DB lookup would allocate the ACL without freeing it. ASTERISK-26731 #close Reported by Ustinov Artem Change-Id: Ie1f8bf5b7a0de628c975beba01e69c56893331ad
2017-01-23Merge "LISTFILTER: Remove outdated ERROR message."George Joseph
2017-01-23Merge "res_pjsip_pubsub.c: Fix incorrect message string wrapping."zuul
2017-01-23ari: Implement 'debug all' and request/response loggingGeorge Joseph
The 'ari set debug' command has been enhanced to accept 'all' as an application name. This allows dumping of all apps even if an app hasn't registered yet. To accomplish this, a new global_debug global variable was added to res/stasis/app.c and new APIs were added to set and query the value. 'ari set debug' now displays requests and responses as well as events. This required refactoring the existing debug code. * The implementation for 'ari set debug' was moved from stasis/cli.{c,h} to ari/cli.{c,h}, and stasis/cli.{c,h} were deleted. * In order to print the body of incoming requests even if a request failed, the consumption of the body was moved from the ari stubs to ast_ari_callback in res_ari.c and the moustache templates were then regenerated. The body is now passed to ast_ari_invoke and then on to the handlers. This results in code savings since that template was inserted multiple times into all the stubs. An additional change was made to the ao2_str_container implementation to add partial key searching and a sort function. The existing cli code assumed it was already there when it wasn't so the tab completion was never working. Change-Id: Ief936f747ce47f1fb14035fbe61152cf766406bf (cherry picked from commit 1d890874f39a5a81b20da44358143ed9b54ab0fe)
2017-01-23test_voicemail_api: order of params to VERIFY macrosTzafrir Cohen
Fix order of parameters in calls to VM_API_INT_VERIFY and VM_API_STRING_VERIFY ASTERISK-26739 #close Change-Id: I30dc6b36893aadad6012be3f16f93aa5720870d6 Note: status: builds. Not tested any further.
2017-01-23Merge "res_pjsip_pubsub.c: Fix AMI event list counts."Joshua Colp
2017-01-23pjproject_bundled: Fix setting max log levelGeorge Joseph
An earlier attempt to prevent pjsua from spitting out an extra 6795 lines of debug output every time the testsuite called it was also turning off the ability for asterisk to output debug info when it needed to. This patch reverts the earlier fix and instead adds a pjproject patch that sets the startup log level to 1 for pjsua pjsystest and the pjsua python binding. This is an asterisk-only patch that does not affect pjproject functionality and will not be submitted upstream. Change-Id: I347a8b58b2626f2906ccfc1d339e907627a0c9e8
2017-01-23res_pjsip_endpoint_identifier_ip: Read settings before resolving.Joshua Colp
An option has been added, srv_lookups, which controls whether SRV lookups are performed on the provided match hosts or not. It was possible for this option to be applied after resolution had already happened. This change makes it so hosts are stored away, settings are read and applied, and then resolution is done. This ensures that no matter the ordering the srv_lookups option is in effect. ASTERISK-26735 Change-Id: I750378cb277be0140f8c5539450270afbfc43388
2017-01-23Merge "res_pjsip_pubsub.c: Eliminate trivial SCOPED_LOCK usage."zuul
2017-01-23media: Add experimental support for RTCP feedback.Lorenzo Miniero
This change adds experimental support for providing RTCP feedback information to codec modules so they can dynamically change themselves based on conditions. ASTERISK-26584 Change-Id: Ifd6aa77fb4a7ff546c6025900fc2baf332c31857
2017-01-23Merge "res_pjsip: alloca can never fail."Joshua Colp
2017-01-22LISTFILTER: Remove outdated ERROR message.Richard Mudgett
Feeding LISTFILTER an empty variable results in an invalid ERROR message. Earlier changes made the message useless because we can no longer tell if the variable is empty or does not exist. It is valid to try to remove a value from an empty list just as it is valid to try to remove a value that is not in a non-empty list. * Removed the outdated ERROR message. * Added more test cases to the LISTFILTER unit test. Change-Id: Ided9040e6359c44a335ef54e02ef5950a1863134
2017-01-22tests: use datadir for sound filesTzafrir Cohen
Some (voicemail-related) tests API symlinks beep.gsm and other files from ast_config_AST_VAR_DIR. It should use ast_config_AST_DATA_DIR. ASTERISK-26740 #close Change-Id: Id49c56fb9e16df64b1a2b829693ca7601252df89
2017-01-20Merge "abstract/fixed/adpative jitter buffer: disallow frame re-inserts"Joshua Colp
2017-01-20Merge "debug_utilities: Create ast_loggrabber"zuul
2017-01-20res_pjsip_pubsub.c: Fix AMI event list counts.Richard Mudgett
Fix the AMI PJSIPShowSubscriptionsInbound, PJSIPShowSubscriptionsOutbound, and PJSIPShowResourceLists actions event counts. The reported counts may not necessarily be accurate depending on what happens. The subscriptions count would be wrong if Asterisk ever has outbound subscriptions. The resource list count could be wrong if a list were added or removed during the AMI action being processed. Change-Id: I4344301827523fa174960a42c413fd19abe4aed5
2017-01-20res_pjsip_pubsub.c: Fix incorrect message string wrapping.Richard Mudgett
Change-Id: Id771e6fe56d89ce365ddcbb423f820af97211120
2017-01-20res_pjsip_pubsub.c: Eliminate trivial SCOPED_LOCK usage.Richard Mudgett
Change-Id: Ie0b69a830385452042fa19e7d267c6790ec6b6be
2017-01-20res_pjsip: alloca can never fail.Richard Mudgett
Change-Id: Ia2a6158e5fdf311bc2a1c0c43417978de504b1f1
2017-01-20debug_utilities: Create ast_loggrabberGeorge Joseph
ast_loggrabber gathers log files from customizable search patterns, optionally converts POSIX timestamps to a readable format and tarballs the results. Also a few tweaks were made to ast_coredumper. Change-Id: I8bfe1468ada24c1344ce4abab7b002a59a659495 (cherry picked from commit c70915287837704090d75f181525765de7a17221)
2017-01-20res_pjsip_outbound_authenticator_digest.c: Fix spacing in warning messages.Richard Mudgett
Change-Id: I573f0343c0c63a785cd4da60d57cc9f8b9ce7f49
2017-01-20app_queue: add RINGCANCELED log event on caller hang upMartin Tomec
QueueLog did not log ringnoanswer when the caller abandoned call before first timeout. It was impossible to get agent membername and ringing duration for this short calls. After some discusions it seems that the best way is to add new event RINGCANCELED, which is generated after caller hangup during ringing. ASTERISK-26665 Change-Id: Ic70f7b0f32fc95c9378e5bcf63865519014805d3
2017-01-17Merge "res_calendar: delete old calendars after reload"zuul
2017-01-17Merge "app_queue: Add QueueUpdate application."Joshua Colp
2017-01-17abstract/fixed/adpative jitter buffer: disallow frame re-insertsKevin Harwell
It was possible for a frame to be re-inserted into a jitter buffer after it had been removed from it. A case when this happened was if a frame was read out of the jitterbuffer, passed to the translation core, and then multiple frames were returned from said translation core. Upon multiple frames being returned the first is passed on, but sebsequently "chained" frames are put back into the read queue. Thus it was possible for a frame to go back into the jitter buffer where this would cause problems. This patch adds a flag to frames that are inserted into the channel's read queue after translation. The abstract jitter buffer code then checks for this flag and ignores any frames marked as such. Change-Id: I276c44edc9dcff61e606242f71274265c7779587
2017-01-17app_queue: Add QueueUpdate application.Sebastian Gutierrez
Add an application that allows tracking outbound calls using app_queue. ASTERISK-19862 Change-Id: Ia0ab64aed934c25b2a25022adcc7c0624224346e
2017-01-13taskprocessor.c: Change when high water warning logged.Richard Mudgett
The task processor queue reached X scheduled tasks message was originally intended to get logged only once per task processor to prevent spamming the log. This is no longer necessary since high and low water thresholds can better control when the message is logged. It is beneficial to generate the warning each time a task processor reaches the high water level because PJSIP stops processing new requests while any high water alert is active. Without this change you would have to enable at least debug level 3 logging to know about a repeated alert trigger. * Made generate the warning message whenever a task is pushed into the task processor that triggers the high water alert. * Appended 'again' to the warning for a repeated high water alert trigger. Change-Id: Iabf75a004f7edaf1e5e8c323099418e667cac999
2017-01-12Merge "res_rtp_asterisk: Fix bug in function CHANNEL(rtcp, all_rtt)"Joshua Colp
2017-01-12res_rtp_asterisk: Fix bug in function CHANNEL(rtcp, all_rtt)Aaron An
Function CHANNEL(rtcp,all_rtt) CHANNEL(rtcp,all_loss) CHANNEL(rtcp,all_jitter) always return 0.0 due to wrong define of macro "AST_RTP_SATA_SET" and "AST_RTP_STAT_STRCPY". It should compare "combined" with "stat" not "current_stat". ASTERISK-26710 #close Reported-by: Aaron An Tested-by: AaronAn Change-Id: Id4140fafbf92e2db689dac5b17d9caa009028a15
2017-01-11debug_utilities: Create the ast_coredumper utilityGeorge Joseph
This utility allows easy manipulation of asterisk coredumps. * Configurable search paths and patterns for existing coredumps * Can generate a consistent coredump from the running instance * Can dump the lock_infos table from a coredump * Dumps backtraces to separate files... - thread apply 1 bt full -> <coredump>.thread1.txt - thread apply all bt -> <coredump>.brief.txt - thread apply all bt full -> <coredump>.full.txt - lock_infos table -> <coredump>.locks.txt * Can tarball corefiles and optionally delete them after processing * Can tarball results files and optionally delete them after processing * Converts ':' in coredump and results file names '-' to facilitate uploading. Jira for instance, won't accept file names with colons in them. Tested on Fedora24+, Ubuntu14+, Debian6+, CentOS6+ and FreeBSD9+[1]. [1] For *BSDs, the "devel/gdb" package might have to be installed to get a recent gdb. The utility will check all instances of gdb it finds in $PATH and if one isn't found that can run python, it prints a friendly error. Change-Id: I935d37ab9db85ef923f32b05579897f0893d33cd (cherry picked from commit cb47b4556053cd50d9102eef913671ad0306062d)
2017-01-10Merge "app_queue: add new Service Level calculation"zuul
2017-01-09Merge "res_pjsip_endpoint_identifier_ip: Add support for SRV lookups."zuul