Commit Graph

29554 Commits

Author SHA1 Message Date
Sean Bright
c3bc44fa1b pjsip_configuration: Add correct file header
Change-Id: I25348c386a222bb704aff07f54375108a6402906
2017-12-08 15:58:54 -05:00
Jenkins2
54a86779a3 Merge "translate: Skip matrix_rebuild during shutdown." into 13 2017-12-07 14:37:53 -06:00
Jenkins2
ac7501b15c Merge "CLI: Fix remote console completion." into 13 2017-12-07 14:19:53 -06:00
Jenkins2
9bf73ae1b3 Merge "sounds_index: Avoid repeatedly reindexing." into 13 2017-12-07 12:43:44 -06:00
Jenkins2
58addb1e38 Merge "media_index: Improve startup." into 13 2017-12-07 11:54:59 -06:00
Corey Farrell
5a0dcd9275 CLI: Fix remote console completion.
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-07 11:26:50 -06:00
Corey Farrell
2691ee68ce translate: Skip matrix_rebuild during shutdown.
Change-Id: I1e5eef4029cba56e33d786c5a5ade8091e531a1e
2017-12-07 09:52:04 -06:00
Corey Farrell
db6602f6f7 sounds_index: Avoid repeatedly reindexing.
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-07 00:39:02 -05:00
Corey Farrell
289549d659 media_index: Improve startup.
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-06 23:35:53 -06:00
Richard Mudgett
93859f9aca bridge_basic.c: Update transfer diagnostic messages addendum.
* 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-06 07:38:39 -06:00
Jenkins2
8e6aedbdcd Merge "bridge_basic.c: Update transfer diagnostic messages." into 13 2017-12-06 06:44:38 -06:00
Jenkins2
0ff3694979 Merge "Add new object for VoicemailUserEntry" into 13 2017-12-05 19:29:52 -06:00
Joshua Colp
c4fe9ff002 Merge "res_rtp_asterisk.c: Increase strictrtp learning timeout time." into 13 2017-12-05 18:46:28 -06:00
Joshua Colp
466f9035f5 Merge "pjproject: Clean up disabling of WebRTC support." into 13 2017-12-05 18:21:00 -06:00
Niklas Larsson
aacdbdcfd2 bridge_basic.c: Update transfer diagnostic messages.
* 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-05 15:35:17 -06:00
Richard Mudgett
594faa192d security-events: Fix SuccessfulAuth using_password declaration.
The SuccessfulAuth using_password field was declared as a pointer to a
uint32_t when the field was later read as a uint32_t value.  This resulted
in unnecessary casts and a non-portable field value reinterpret in
main/security_events.c:add_json_object().  i.e., It would work on a 32 bit
architecture but not on a 64 bit big endian architecture.

Change-Id: Ia08bc797613a62f07e5473425f9ccd8d77c80935
2017-12-04 17:19:23 -06:00
Sungtae Kim
e7201c93cc Add new object for VoicemailUserEntry
Currently, when the app_voicemail sending VoicemailUserEntry AMI event, there's
no OldMessageCount info for default.
To check the OldMessageCount info, it required IMAP_STORAGE define, but this is
not correct.
Added OldMessageCount item as a default.

ASTERISK-27456

Change-Id: I5c71521c2d1daf8b7b161e31c34d28cca6aea4c7
2017-12-04 12:24:22 -06:00
Joshua Colp
c80595a852 Merge "res_rtp_asterisk: Correct default in sample configuration file." into 13 2017-12-04 11:42:26 -06:00
Richard Mudgett
9330eacc50 res_rtp_asterisk.c: Increase strictrtp learning timeout time.
More complicated direct media reinvite negotiations can result in longer
delays before direct media flows.  The strictrtp learning timeout time
was too short.  One log showed that the first RTP packet came in just
after three seconds.

* Increase the strictrtp learning timeout time from 1.5 to 5 seconds.

ASTERISK-27453

Change-Id: Ic5e711164cbb91b4d1c1e40c83697755640f138c
2017-12-04 10:40:39 -06:00
Jenkins2
43ffae44c7 Merge "README-SERIOUSLY.bestpractices.txt: Convert to markdown" into 13 2017-12-04 10:21:37 -06:00
Jenkins2
c0d1f447ba Merge "autoconf: Remove use of m4_ifblank." into 13 2017-12-04 09:02:27 -06:00
Jenkins2
7e4bd0cf69 Merge "config: Speed up config template lookup" into 13 2017-12-04 08:52:45 -06:00
Alexander Traud
e819cf7826 res_rtp_asterisk: Correct default in sample configuration file.
With Asterisk 12 (commit 866d968), the default of "icesupport" changed to
- "yes" in the module "res_rtp_asterisk" and
- "no" in the module "chan_sip".
The latter was reflected in the sample configuration file for "sip.conf". The
former did not make it into "rtp.conf.sample".

ASTERISK-20643

Change-Id: I2a2e0a900455d0767a99ea576e30adc6d7608a36
2017-12-04 08:34:25 -06:00
Jenkins2
9e9dccd293 Merge "config: Speed up ACO & sorcery initialization" into 13 2017-12-04 08:01:11 -06:00
Jenkins2
59bb2c1920 Merge "res_http_post: Not all versions of gmime have GMIME_MAJOR_VERSION." into 13 2017-12-04 07:02:25 -06:00
Joshua Colp
41c14fd807 pjproject: Clean up disabling of WebRTC support.
The definition in config_site.h and the argument to the
configure script are not necessary to disable WebRTC
support. The correct argument, --disable-libwebrtc, is
already passed.

ASTERISK-26980

Change-Id: I27da2c894f87914956a72710222e17462d8a44bc
2017-12-04 00:52:42 +00:00
Corey Farrell
f5cfd87c4a autoconf: Remove use of m4_ifblank.
The m4_ifblank macro is not available on CentOS 6, reverse conditionals
to allow use of m4_ifval instead.  ./bootstrap.sh was run but this patch
does not result in any difference to the generated configure script.

Change-Id: I280785deb872ed8d3339d99cce63a2b54d5f1438
2017-12-02 15:59:55 -06:00
Corey Farrell
ef25628b10 README-SERIOUSLY.bestpractices.txt: Convert to markdown
Follow-up to conversion of README.md.

Change-Id: I17ee7cf25bc027ece844efa2c1dfe613aff1e35b
2017-12-01 17:18:57 -05:00
George Joseph
0cdd31ee10 AST-2017-013: chan_skinny: Call pthread_detach when sess threads end
chan_skinny creates a new thread for each new session.  In trying
to be a good cleanup citizen, the threads are joinable and the
unload_module function does a pthread_cancel() and a pthread_join()
on any sessions that are active at that time.  This has an
unintended side effect though. Since you can call pthread_join on a
thread that's already terminated, pthreads keeps the thread's
storage around until you explicitly call pthread_join (or
pthread_detach()).   Since only the module_unload function was
calling pthread_join, and even then only on the ones active at the
tme, the storage for every thread/session ever created sticks
around until asterisk exits.

* A thread can detach itself so the session_destroy() function
  now calls pthread_detach() just before it frees the session
  memory allocation.  The module_unload function still takes care
  of the ones that are still active should the module be unloaded.

ASTERISK-27452
Reported by: Juan Sacco

Change-Id: I9af7268eba14bf76960566f891320f97b974e6dd
2017-12-01 12:00:24 -07:00
Sean Bright
6635ddc819 config: Speed up config template lookup
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-01 12:13:33 -05:00
Sean Bright
077ceacd48 config: Speed up ACO & sorcery initialization
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-12-01 09:29:43 -05:00
Joshua Colp
dac70daf1b res_http_post: Not all versions of gmime have GMIME_MAJOR_VERSION.
This change makes the presence of the GMIME_MAJOR_VERSION
definition optional, as not all versions of gmime actually
define it.

ASTERISK-27454

Change-Id: I01d99590045971ed6787899147170a5954077238
2017-12-01 08:07:52 -04:00
Jenkins2
0f4152307a Merge "translate: Transcode siren14, speex32, silk24, and silk12 via slin16." into 13 2017-11-30 09:30:55 -06:00
Joshua Colp
8e979ce41b Merge "autoconf: Use m4 conditionals where possible." into 13 2017-11-30 09:02:48 -06:00
Jenkins2
838b0a41e0 Merge "autoconf: Fix call to AC_CONFIG_AUX_DIR." into 13 2017-11-30 08:32:08 -06:00
Jenkins2
749c544dbb Merge "translate: Show sample rate for silk, speex, and slin in translation table." into 13 2017-11-28 12:13:06 -06:00
Corey Farrell
6274e58a25 autoconf: Use m4 conditionals where possible.
Change-Id: I530c0a72f965437acef6a9a4fbfe5c487f078b65
2017-11-28 10:41:31 -05:00
Corey Farrell
635fe8ec87 autoconf: Fix call to AC_CONFIG_AUX_DIR.
The `pwd` parameter to AC_CONFIG_AUX_DIR is unnecessary, the default
value is $srcdir.

Additionally remove the AC_REVISION call.  It only added a comment and
is pointless without SVN tag replacements.

Change-Id: I99299a3217f095bddcb2edefb3b9af0ab147bc29
2017-11-28 10:40:25 -05:00
Joshua Colp
85ffedabd1 Merge "res_ari: Fix inverted test giving wrong error message." into 13 2017-11-27 16:55:57 -06:00
Joshua Colp
759468c45f Merge "CLI: Finish conversion of completion handling to vectors." into 13 2017-11-27 16:17:04 -06:00
Jenkins2
2edbaa1588 Merge "res_rtp_asterisk.c: Fix rtp source address learning for broken clients" into 13 2017-11-27 16:14:49 -06:00
Jenkins2
c9a531d03b Merge "features.conf.sample: Clarify ActivatedBy documentation wording." into 13 2017-11-27 15:27:07 -06:00
Jenkins2
c3a25ff753 Merge "CLI: Refactor cli_complete." into 13 2017-11-27 13:53:11 -06:00
Jenkins2
efb165a8a8 Merge "CLI: Rewrite ast_el_strtoarr to use vector's internally." into 13 2017-11-27 13:22:57 -06:00
George Joseph
f1f88c40f6 Merge "CLI: Refactor ast_cli_display_match_list." into 13 2017-11-27 12:29:03 -06:00
Jenkins2
2e3f878423 Merge "CLI: Create ast_cli_completion_add function." into 13 2017-11-27 12:10:11 -06:00
George Joseph
635583dabd Merge "CLI: Remove calls to ast_cli_generator." into 13 2017-11-27 11:32:06 -06:00
George Joseph
9cbcd89587 Merge "add cmd connection creation on creation ooh323 call data structure" into 13 2017-11-27 10:51:49 -06:00
Joshua Colp
32bd372f3a Merge "pjsip: 183 without To tag does not negotiate media" into 13 2017-11-27 09:39:52 -06:00
Joshua Colp
13f3588150 Merge "Add defaultbranch to .gitreview." into 13 2017-11-27 09:03:03 -06:00