summaryrefslogtreecommitdiff
path: root/main
AgeCommit message (Collapse)Author
2017-12-07Merge "translate: Skip matrix_rebuild during shutdown." into 13Jenkins2
2017-12-07Merge "CLI: Fix remote console completion." into 13Jenkins2
2017-12-07Merge "sounds_index: Avoid repeatedly reindexing." into 13Jenkins2
2017-12-07Merge "media_index: Improve startup." into 13Jenkins2
2017-12-07CLI: Fix remote console completion.Corey Farrell
Duplicate checking was done incorrectly when parsing completion options from a remote console causing all options to be ignored as duplicates. Once fixed I had to separate processing of the best match to ensure it was not identified as a duplicate when it is the only match. ASTERISK-27465 Change-Id: Ibbdb29f88211742071836c9b3f4d2aa1221cd0f9
2017-12-07translate: Skip matrix_rebuild during shutdown.Corey Farrell
Change-Id: I1e5eef4029cba56e33d786c5a5ade8091e531a1e
2017-12-07sounds_index: Avoid repeatedly reindexing.Corey Farrell
The sounds index is rebuilt each time a format is registered or unregistered. This causes the index to be repeatedly rebuilt during startup and shutdown. This patch significantly reduces the work done by delaying sound index initialization until after modules are loaded. This way a reindex only occurs if a format module is loaded after startup. We also skip reindexing when format modules are unloaded during shutdown. Change-Id: I585fd6ee04200612ab1490dc804f76805f89cf0a
2017-12-06media_index: Improve startup.Corey Farrell
This eliminates some wasteful operations in media_index startup. * Replace statically set string-fields with char[0]. * Eliminate pointless RAII_VAR's. * alloc_variant: Avoid pointless ao2_find on new info->variant. * Stop trying find_variant before alloc_variant. * process_media_file: replace ast_str with ast_asprintf. This avoids reallocation of file_id_str. Overall sounds_index.c is about 27% of Asterisk startup time when using sample configs. This patch reduces it to 20%. This is a half-fix. The real problem is that the media_index is regenerated repeatedly - 68 times in my test. Change-Id: Ia50b752f8efb356f852b05c4be495a6631af8652
2017-12-06bridge_basic.c: Update transfer diagnostic messages addendum.Richard Mudgett
* Added start DTMF transfer verbose messages. * Made associated transfer messages use a similar message format. * Adjusted message verbose level as requested by initial reporter. ASTERISK-27449 Change-Id: I2045714586414b3c5ef1f3cc56c1c4af4b31f551
2017-12-05bridge_basic.c: Update transfer diagnostic messages.Niklas Larsson
* Add the channel name to diagnostic messages so you will know which channel failed to transfer. * Promoted some debug messages to verbose 4 messages. ASTERISK-27449 #close Change-Id: Idac66b7628c99379cc9269158377fd87dc97a880
2017-12-04Merge "config: Speed up config template lookup" into 13Jenkins2
2017-12-01config: Speed up config template lookupSean Bright
ast_category_get() has an (undocumented) implementation detail where it tries to match the category name first by an explicit pointer comparison and if that fails falls back to a normal match. When initially building an ast_config during ast_config_load, this pointer comparison can never succeed, but we will end up iterating all categories twice. As the number of categories using a template increases, this dual looping becomes quite expensive. So we pass a flag to category_get_sep() indicating if a pointer match is even possible before trying to do so, saving us a full pass over the list of current categories. In my tests, loading a file with 3 template categories and 12000 additional categories that use those 3 templates (this file configures 4000 PJSIP endpoints with AOR & Auth) takes 1.2 seconds. After this change, that drops to 22ms. Change-Id: I59b95f288e11eb6bb34f31ce4cc772136b275e4a
2017-12-01config: Speed up ACO & sorcery initializationSean Bright
When starting Asterisk in the foreground, there is a perceptible delay when loading modules that use the ACO and sorcery config frameworks. For example, a lightly configured res_pjsip took 853ms to load on my VM. I tracked down the slowness to the XPath queries used to associate the relevant documentation with the config options. One improvement was adding a call to xmlXPathOrderDocElems after loading an XML document. From the libxml2 docs: Call this routine to speed up XPath computation on static documents. The second change was to remove recursive descent and wildcard operators from the XPath queries. After these changes, res_pjsip takes 85ms to load on my VM and there is no longer a perceptible delay when starting Asterisk in the foreground. Change-Id: I45d457f1580e26bf5a2b0dab16e8e9ae46dcbd82
2017-11-30Merge "translate: Transcode siren14, speex32, silk24, and silk12 via ↵Jenkins2
slin16." into 13
2017-11-28Merge "translate: Show sample rate for silk, speex, and slin in translation ↵Jenkins2
table." into 13
2017-11-27Merge "CLI: Finish conversion of completion handling to vectors." into 13Joshua Colp
2017-11-27Merge "CLI: Refactor cli_complete." into 13Jenkins2
2017-11-27Merge "CLI: Rewrite ast_el_strtoarr to use vector's internally." into 13Jenkins2
2017-11-27Merge "CLI: Refactor ast_cli_display_match_list." into 13George Joseph
2017-11-27Merge "CLI: Create ast_cli_completion_add function." into 13Jenkins2
2017-11-27Merge "CLI: Remove calls to ast_cli_generator." into 13George Joseph
2017-11-26translate: Transcode siren14, speex32, silk24, and silk12 via slin16.Alexander Traud
When a format has no pre-recorded sound files, Asterisk has to transcode between formats. For this, Asterisk has a fixed translation table. If the pre-recorded sound files are not available in the same sample rate, Asterisk has not only to transcode but also to resample. Asterisk has pre-recorded files for SLN (8000 kHz) and SLN16 (16000 kHz). However before this change, Asterisk did not take the sample rate into account, because the translation paths to SLN and SLN16 got the same score/weight in the table. Consequently, you might have got narrow-band audio with siren14, speex32, silk24, and silk12 although those are (ultra) wide-band audio codecs. With this change, the distance in sample-rates is taken into account. Now on the Command-Line interface (CLI) 'core show channels', you should see: (slin@16000)->(slin@32000)->(speex@32000). ASTERISK-23735 Reported by: Richard Kenner Change-Id: I9448295c1978be26f8633b6066395e7bbbe2e213
2017-11-25translate: Show sample rate for silk, speex, and slin in translation table.Alexander Traud
ASTERISK-24662 Change-Id: I3822956984292c99c48bca8e97807e498ccc0e88
2017-11-21Merge "aoc: Remove silly usage of RAII_VAR." into 13Joshua Colp
2017-11-21Merge "abstract_jb: Remove silly usage of RAII_VAR." into 13Joshua Colp
2017-11-21Merge "app: Remove silly usage of RAII_VAR." into 13Joshua Colp
2017-11-21CLI: Finish conversion of completion handling to vectors.Corey Farrell
Change-Id: Ib81318f4ee52a5e73b003316e13fe9be1dd897a1
2017-11-21CLI: Refactor cli_complete.Corey Farrell
* Stop using "_COMMAND NUMMATCHES" on remote consoles. Using this command had doubled the amount of work needed from the Asterisk daemon for each completion request. * Fix code formatting. * Remove static buffer used to send the command, use the same buffer that will receive the results. * Move sort from ast_cli_display_match_list. Change-Id: Ie2211b519a3d4bec45bf46e0095bdd01d384cb69
2017-11-21CLI: Rewrite ast_el_strtoarr to use vector's internally.Corey Farrell
This rewrites ast_el_strtoarr to use vector's internally, but still return the original NULL terminated array of strings. Change-Id: Ibfe776cbe14f750effa9ca360930acaccc02e957
2017-11-21CLI: Refactor ast_cli_display_match_list.Corey Farrell
* Stop estimating line count, just print until we run out of matches. * Stop freeing entries, the caller does that anyways. * Stop calculating / returning numoutput, it was ignored. Change-Id: I7f92afa8bea92241a95227587367424c8c32a5cb
2017-11-21CLI: Create ast_cli_completion_add function.Corey Farrell
Some completion generators are very inefficent due to the way CLI requests matches one at a time. ast_cli_completion_add can be called multiple times during one invokation of a CLI generator to add all results without having to reinitialize the search state for each match. Change-Id: I73d26d270bbbe1e3e6390799cfc1b639e39cceec
2017-11-21CLI: Remove calls to ast_cli_generator.Corey Farrell
The ability to add to localized storage cannot be supported by ast_cli_generator. The only calls to ast_cli_generator should be by functions that need to proxy the CLI generator, for example 'cli check permissions' or 'core show help'. * ast_cli_generatornummatches now retrieves the vector of matches and reports the number of elements (not including 'best' match). * test_substitution retrieves and iterates the vector. Change-Id: I8cd6b93905363cf7a33a2d2b0e2a8f8446d9f248
2017-11-21Merge "ccss: Remove silly usage of RAII_VAR." into 13Joshua Colp
2017-11-21Merge "cli: Remove silly usage of RAII_VAR." into 13Joshua Colp
2017-11-21Merge "loader: Fix comments in struct ast_module." into 13Joshua Colp
2017-11-21Merge "CLI: Create ast_cli_completion_vector." into 13Joshua Colp
2017-11-21Merge "Build: Fix issues building without SSL." into 13Joshua Colp
2017-11-20loader: Fix comments in struct ast_module.Corey Farrell
Make the comments follow doxygen format, move comments to the line before each field they describe. Change-Id: Ic445468398b5e88f13910f7c2f70bd15aad33a27
2017-11-20Merge changes from topic 'alloc-check-acl' into 13Joshua Colp
* changes: acl: Fix allocation related issues. acl: Update logger message to match 15+.
2017-11-20cli: Remove silly usage of RAII_VAR.Corey Farrell
Change-Id: I81aacfee7cd26e4fc5eef07bca582700c2975bd7
2017-11-20Merge "bridge_basic: Ignore answer from transfer target when they've timed ↵Joshua Colp
out." into 13
2017-11-20ccss: Remove silly usage of RAII_VAR.Corey Farrell
Change-Id: I5ce40035e0a940e4e56f6322c1dcd47fbd509b98
2017-11-20app: Remove silly usage of RAII_VAR.Corey Farrell
Change-Id: Ideb594f7aae134974fb78d5477ba0853b97b8625
2017-11-20aoc: Remove silly usage of RAII_VAR.Corey Farrell
Change-Id: I07907f833b81aeb0128bc9442a2abb52679c7511
2017-11-20abstract_jb: Remove silly usage of RAII_VAR.Corey Farrell
Change-Id: I9d56175369363d1dc735504cf78a3a5577069f49
2017-11-19Build: Fix issues building without SSL.Corey Farrell
* Fix conditional in libasteriskssl. * Use variables produced by configure to link the SSL and uuid libraries into libasteriskpj.so instead of hard-coding them. ASTERISK-27431 Change-Id: I3977931fd3ef8c4e4376349ccddb354eb839b58d
2017-11-17acl: Fix allocation related issues.Corey Farrell
Add checks for allocation errors, cleanup and report failure when they occur. * ast_duplicate_acl_list: Replace log warnings with errors, add missing line-feed. * ast_append_acl: Add missing line-feed to logger message. * ast_append_ha: Avoid ast_strdupa in loop by moving debug message to separate function. * ast_ha_join: Use two separate calls to ast_str_append to avoid using ast_strdupa in a loop. Change-Id: Ia19eaaeb0b139ff7ce7b971c7550e85c8b78ab76
2017-11-17acl: Update logger message to match 15+.Corey Farrell
This patch causes a logger message to be the same as it is in 15+. This will allow a follow-up patch to be cherry-picked to all 3 branches. Change-Id: Ic0665a3d49987e4eb6df28dcd9e90b1c3ca191e0
2017-11-17CLI: Create ast_cli_completion_vector.Corey Farrell
This is a rewrite of ast_cli_completion_matches using a vector to build the list. The original function calls the vector version, NULL terminates the vector and extracts the elements array. One change in behavior the results are now sorted and deduplicated. This will solve bugs where some duplicate checking was done before the list was sorted. Change-Id: Iede20c5b4d965fa5ec71fda136ce9425eeb69519
2017-11-17bridge_basic: Ignore answer from transfer target when they've timed out.Joshua Colp
This is a fun one. Given the following attended transfer scenario: 1. Transfer target is called 2. Transferer hangs up 3. Transfer target call attempt reaches timeout 4. Transfer target is told to hang up 5. Transfer target answers before channel is hung up 6. Transferer recall target is called A crash would occur. This is because the transfer target call attempt, despite being told to hang up, would raise a recall target answer before the recall target had been answered. As it had not answered there would be no recall target channel and it would implode. This change makes it so that if the transfer target has been hung up we don't tell the attended transfer code that it has answered. We also clear out the stimulus that the recall target has been answered after telling the transfer target to hang up, in case it was able to raise the information before we told it to hangup. ASTERISK-27361 Change-Id: Ifb8b255a9c4d2c5c1b8ad77bf54f659ed286df99