Commit Graph

30396 Commits

Author SHA1 Message Date
Richard Mudgett 8536a09b86 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:21:27 -06:00
Jenkins2 890ffcd672 Merge "res_rtp_asterisk: Correct default in sample configuration file." 2017-12-04 11:47:13 -06:00
Richard Mudgett ab63448fa6 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:45:01 -06:00
Jenkins2 b184972d65 Merge "README-SERIOUSLY.bestpractices.txt: Convert to markdown" 2017-12-04 10:27:54 -06:00
Jenkins2 93920f1f1f Merge "autoconf: Remove use of m4_ifblank." 2017-12-04 09:38:31 -06:00
Joshua Colp 93c2cd1383 Merge "config: Speed up config template lookup" 2017-12-04 08:51:11 -06:00
Alexander Traud e0354bbe82 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 15:33:16 +01:00
Joshua Colp ea1578ed7a Merge "config: Speed up ACO & sorcery initialization" 2017-12-04 07:41:28 -06:00
Joshua Colp 1182abb0ff Merge "res_http_post: Not all versions of gmime have GMIME_MAJOR_VERSION." 2017-12-04 07:40:06 -06:00
Sungtae Kim 0611fe581c 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 10:51:49 +01:00
Joshua Colp e2715d2cd4 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-03 18:54:04 -06:00
Corey Farrell 39939cecfa 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 16:59:31 -05:00
George Joseph 075faac2fd 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
(cherry picked from commit 8f5dff543e)
2017-12-01 13:29:52 -06:00
Sean Bright d9fdeae6a4 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 11:14:04 -06:00
Sean Bright 1ad0fbc80e 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 08:41:02 -06:00
Joshua Colp 892df22ccd 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 06:08:42 -06:00
Corey Farrell 35a7036a0d README-SERIOUSLY.bestpractices.txt: Convert to markdown
Follow-up to conversion of README.md.

Change-Id: I17ee7cf25bc027ece844efa2c1dfe613aff1e35b
2017-11-30 22:49:50 -05:00
Jenkins2 5de9754313 Merge "translate: Transcode siren14, speex32, silk24, and silk12 via slin16." 2017-11-30 10:16:17 -06:00
Jenkins2 85d83dd0ca Merge "autoconf: Use m4 conditionals where possible." 2017-11-30 09:22:27 -06:00
Jenkins2 4066f853b1 Merge "autoconf: Fix call to AC_CONFIG_AUX_DIR." 2017-11-30 08:42:24 -06:00
Jenkins2 f98dad52d2 Merge "CLI: Remove compatibility code." 2017-11-28 12:50:28 -06:00
Joshua Colp c7aa6e41c1 Merge "translate: Show sample rate for silk, speex, and slin in translation table." 2017-11-28 12:37:51 -06:00
Corey Farrell ce5cfc8ffb autoconf: Use m4 conditionals where possible.
Change-Id: I530c0a72f965437acef6a9a4fbfe5c487f078b65
2017-11-28 10:40:54 -05:00
Corey Farrell 87a57e8d46 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:36:41 -05:00
Joshua Colp 8bf1a5c46a Merge "res_ari: Fix inverted test giving wrong error message." 2017-11-27 17:24:24 -06:00
Jenkins2 a7227d6a19 Merge "res_rtp_asterisk.c: Fix rtp source address learning for broken clients" 2017-11-27 16:33:38 -06:00
Corey Farrell d12a2ab400 CLI: Remove compatibility code.
Previous commits maintained compatibility with older remote console
clients as well as maintaining all API's.

Remove the following compatibility code:
* ast_cli_generatornummatches.
* Remote command "_command nummatches".
* Sorting / duplicate removal by remote console.

Change-Id: I59e6ce94fa57ae564888442049695f7e46746437
2017-11-27 16:23:06 -06:00
Jenkins2 474d576bf9 Merge "features.conf.sample: Clarify ActivatedBy documentation wording." 2017-11-27 15:57:05 -06:00
Jenkins2 ae342a824f Merge "CLI: Finish conversion of completion handling to vectors." 2017-11-27 15:13:19 -06:00
George Joseph b4119a4c31 Merge "CLI: Refactor cli_complete." 2017-11-27 14:39:06 -06:00
Joshua Colp a06bca48e7 Merge "CLI: Rewrite ast_el_strtoarr to use vector's internally." 2017-11-27 14:17:20 -06:00
George Joseph 708189ce02 Merge "CLI: Create ast_cli_completion_add function." 2017-11-27 13:26:43 -06:00
Jenkins2 b69bfc637f Merge "CLI: Refactor ast_cli_display_match_list." 2017-11-27 13:23:52 -06:00
George Joseph 93dba6f396 Merge "CLI: Remove calls to ast_cli_generator." 2017-11-27 12:11:18 -06:00
Jenkins2 2e4a8f0036 Merge "add cmd connection creation on creation ooh323 call data structure" 2017-11-27 11:17:50 -06:00
George Joseph 710267013d Merge "pjsip: 183 without To tag does not negotiate media" 2017-11-27 10:52:02 -06:00
Joshua Colp 55b0072d09 Merge "Add defaultbranch to .gitreview." 2017-11-27 09:23:22 -06:00
Alexander Traud 58115e9c21 translate: Transcode siren14, speex32, silk24, and silk12 via slin16.
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-26 18:47:17 +01:00
Richard Mudgett 55c4d8e008 res_ari: Fix inverted test giving wrong error message.
The patch for ASTERISK_24560 inverted a test checking if the bridge name
is being updated to a different name.

* Fix the test to return "Changing bridge name is not implemented" when
someone attempts to change the bridge name.

ASTERISK-27445

Change-Id: I4b70bf08b0e02e016108b077ff75b345dec12fc9
2017-11-26 09:51:59 -06:00
Alexander Traud 74e7005a74 translate: Show sample rate for silk, speex, and slin in translation table.
ASTERISK-24662

Change-Id: I3822956984292c99c48bca8e97807e498ccc0e88
2017-11-25 11:09:08 +01:00
Richard Mudgett 02a9952709 features.conf.sample: Clarify ActivatedBy documentation wording.
Change-Id: Id2899331fe05d1909a862ea879742879d086bc64
2017-11-23 13:28:54 -06:00
Joshua Colp 16381e54e4 Merge "res_parking: Set load_pri more appropriately." 2017-11-23 12:06:32 -06:00
Joshua Colp 2a783b86d1 Merge "res_mwi_external_ami: Remove incorrect load priority." 2017-11-23 12:02:00 -06:00
Joshua Colp 509e713333 Merge "Loader: Remove unneeded load_pri declarations." 2017-11-23 11:15:19 -06:00
Joshua Colp 532f556347 Merge "README: Convert to README.md." 2017-11-23 10:30:11 -06:00
Joshua Colp 3b4bd94086 Merge "res_rtp_asterisk: ICE server-reflexive candidates (srflx) with Dual-Stack." 2017-11-23 09:49:46 -06:00
Joshua Colp 577d4e2aae Merge "chan_sip: ICE contained square brackets around IPv6 addresses." 2017-11-23 08:56:17 -06:00
Corey Farrell 4b1262c94b Add defaultbranch to .gitreview.
Although the default value of defaultbranch is master I'm adding it
anyways.  This way when new major branches are being created the value
can be updated instead of having to remember the name of the key.

Change-Id: I3db009217c5ae399fb84bee95076f4dbb7fa52d2
2017-11-22 20:04:07 -05:00
Alexander Anikin fcd9ba2b87 add cmd connection creation on creation ooh323 call data structure
ASTERISK-27353 #close

Reported by: Marco Giordani

Change-Id: I455096bd7da016b871afe09af86067c2c7c9f33f
2017-11-23 03:54:36 +03:00
Kevin Harwell db21f7f2e1 pjsip: 183 without To tag does not negotiate media
If a 183 with sdp response is receive without a To tag the sdp is not
negotiated. According to RFC 3261 section 12.1.2 while a To tag is required,
the client needs to still be able to handle the missing tag case for
backwards compatibility.

This patch, accepted by and applied to pjproject, makes it so if an incoming
180/183 with SDP comes in without a To tag it gets appropriately handled.

ASTERISK-27442 #close

Change-Id: Ic9d6b01e05e8f4874eebbd7adfe05d932025d203
2017-11-22 11:00:19 -06:00