Commit Graph

29049 Commits

Author SHA1 Message Date
Corey Farrell
0f49e6ee2e Fix compiler warnings on Fedora 26 / GCC 7.
GCC 7 has added capability to produce warnings, this fixes most of those
warnings.  The specific warnings are disabled in a few places:

* app_voicemail.c: truncation of paths more than 4096 chars in many places.
* chan_mgcp.c: callid truncated to 80 chars.
* cdr.c: two userfields are combined to cdr copy, fix would break ABI.
* tcptls.c: ignore use of deprecated method SSLv3_client_method().

ASTERISK-27156 #close

Change-Id: I65f280e7d3cfad279d16f41823a4d6fddcbc4c88
2017-08-01 15:44:29 -06:00
George Joseph
0d58fefa30 bundled_pjproject: Improve SSL/TLS error handling
OpenSSL has 2 levels or error processing.  It's possible for the
top layer to return SSL_ERROR_SYSCALL but the lower layer return
no error, in which case processing should continue.  Only the top
layer was being examined though so connections were being torn
down when they didn't need to be.  This patch adds the examination
of the lower level codes, and if they return no errors, allows
processing to continue.

ASTERISK-27001
Reported-by: Ian Gilmour
patches:
	pjproject-2.6.patch submitted by Ian Gilmour (license 6889)

Updated-by: George Joseph and Sauw Ming (Teluu)

Merged to upstream pjproject on 7/27/2017 (commit 5631)

Change-Id: I23844ca0c68ef1ee550f14d46f6dae57d33b7bd2
2017-08-01 15:43:51 -06:00
Torrey Searle
423d01cf16 chan_pjsip: add a new function PJSIP_DTMF_MODE
This function is a replica of SIPDtmfMode, allowing the DTMF mode of a
PJSIP call to be modified on a per-call basis

ASTERISK-27085 #close

Change-Id: I20eef5da3e5d1d3e58b304416bc79683f87e7612
2017-08-01 15:43:51 -06:00
Sean Bright
c16000f201 res_rtp_asterisk: Fix mapping of pjsip's ICE roles to ours
Change-Id: Ia578ede1a55b21014581793992a429441903278b
2017-07-26 16:15:48 -05:00
Jenkins2
7f142fb804 Merge "res_stasis_device_state: Unsubscribe should remove old subscriptions" into 13 2017-07-26 07:09:31 -05:00
Jenkins2
25b691f1ed Merge "app_voicemail.c: Allow mailbox entry on authentication retry prompt." into 13 2017-07-26 06:43:21 -05:00
Joshua Colp
8314dd95aa Merge "core: Add VP9 passthrough support." into 13 2017-07-25 11:11:45 -05:00
Sergej Kasumovic
708cdc0b8e res_stasis_device_state: Unsubscribe should remove old subscriptions
Case scenario with Applications ARI:

* Once you subscribe to deviceState with Applications REST API, it will be
added into subscription pool.

* When you unsubscribe it will remove from the device_state_subscription
hash table but not from the subscription pool.

* When you subscribe again, it will add it to pool again.

* Now you will have two subscriptions and you will receive same event
twice.

This fix should now remove deviceState subscription from pool and it
should fix unsubscribe on deviceState.

ASTERISK-27130 #close

Change-Id: I718b70d770a086e39b4ddba4f69a3c616d4476c4
2017-07-25 14:55:41 +02:00
George Joseph
9035d77296 Merge "say.c: Fix file locations for second, seconds, minute, minutes files" into 13 2017-07-25 07:44:41 -05:00
Joshua Colp
24bb5a8908 core: Add VP9 passthrough support.
This change adds VP9 as a known codec and creates a cached
"vp9" media format for use.

Change-Id: I025a93ed05cf96153d66f36db1839109cc24c5cc
2017-07-24 18:46:28 +00:00
Matthew Fredrickson
07f8e45a90 format.h: Fix a few minor errors in comments.
A few minor problems were found in comments in format.h.  This patch fixes them.

Change-Id: I07f0bdb47b93359b361c4c3d8ecc87cd3199dd94
2017-07-24 09:28:47 -05:00
Rusty Newton
7e9aa74daa say.c: Fix file locations for second, seconds, minute, minutes files
The seconds and minutes files have always existed in the base language
directory of the Core package. So say.c has always been calling the wrong
location (under digits/) for those two files and in the case of second and
minute they didn't exist in the Core packages at all.

The 1.6 sounds release moves the second and minute files into Core from
Extra for the languages that already had them. A future release will include
the second and minute files for languages that didn't already have them.

This patch just changes all the target locations for second, seconds,
minute, and minutes that were under the digits subdir to be under the root of
sounds instead. Which is where the sounds will be for some languages after 1.6
sounds and for all languages after a future release.

ASTERISK-25810 #close

Change-Id: I05d9d4bee6a7237030530a46e7eb3df15f13f702
Reported-by: Nicolas Riendeau
2017-07-21 17:04:31 -05:00
Richard Mudgett
7ff9d8785d app_voicemail.c: Allow mailbox entry on authentication retry prompt.
The following testsuite voicemail tests were failing to re-enter the
mailbox after the first login attempt.

tests/apps/voicemail/authenticate_invalid_mailbox
tests/apps/voicemail/authenticate_invalid_password

The tests were noting the start of the vm-incorrect-mailbox prompt and
immediately sending the mailbox for the next login attempt.  Since the
invalid message playback had to complete before the digits were
recognized, the test passed for the wrong reason and added approximately
20 seconds to the test times.

* Allow the vm-incorrect-mailbox prompt to get interrupted by the mailbox
digits like the initial vm-login prompt so the tests are able to enter the
intended mailbox.

Change-Id: I1dc53fe917bfe03a4587b2c4cd24c94696a69df8
2017-07-21 16:05:58 -05:00
Rusty Newton
4f93f75e7e Sounds: Update Makefile for Extra sounds 1.5.1 release
Incrementing version for the Extra sounds release. 1.5.1 Extra sounds
removes two prompts that were moved into the Core packages in the 1.6 Core
sounds release.

ASTERISK-27142 #close

Change-Id: I82f017812b0ea9599e19dd4635afd55611f13ee7
2017-07-21 14:20:10 -05:00
Jenkins2
158be3b757 Merge "corosync: Fix corosync library name in configure.ac" into 13 2017-07-21 06:38:41 -05:00
Jenkins2
084bdc79ac Merge "pjsip: Increase maximum packet size." into 13 2017-07-20 10:47:09 -05:00
Sean Bright
cea4ce246d corosync: Fix corosync library name in configure.ac
Also add new corosync packages to install_prereq.

Reported by Travis Ryan in #asterisk-dev

Change-Id: Ib861c95ba630fed62dc54e56784ad8446ed9d2db
2017-07-20 11:39:51 -04:00
Jenkins2
eb60c902e8 Merge "app_playback.c: Use the timezonename parameter" into 13 2017-07-19 09:34:07 -05:00
Jenkins2
a5e73ad1f8 Merge "core: Add PARSE_TIMELEN support to ast_parse_arg and ACO." into 13 2017-07-19 09:11:27 -05:00
Benjamin Keith Ford
9a47dd7113 pjsip: Increase maximum packet size.
The maximum packet size for PJSIP has been increased to handle the
multiple streams being added for WebRTC.

Change-Id: I9ea1e8d02668c544acadcb1c6200e1cc1bd588b3
2017-07-18 17:00:25 -05:00
Holger Hans Peter Freyther
1c3e7df26e app_playback.c: Use the timezonename parameter
In say_date_generic the timezonename parameter is passed but never
used. Fix it by passing it to the ast_localtime function.

ASTERISK-27124

Change-Id: I6afa98f9163190043244b9f3ba91eb1874d1b586
2017-07-18 06:36:46 -05:00
Joshua Colp
f0558d58f0 Merge "res_rtp_asterisk: Use RTP component for ICE if RTCP-MUX is in use." into 13 2017-07-17 14:57:35 -05:00
Jenkins2
1108da4f95 Merge "app_confbridge: Make sure name recordings are always removed from the filesystem" into 13 2017-07-17 09:03:38 -05:00
Jenkins2
fa27fe9a32 Merge "chan_iax2: On reload make sure to check for existing MWI subscription" into 13 2017-07-17 08:32:54 -05:00
Jenkins2
f1c2ba156e Merge "res/res_stasis_snoop: generate silence when audiohook returns null" into 13 2017-07-17 08:03:40 -05:00
Joshua Colp
51761b759d res_rtp_asterisk: Use RTP component for ICE if RTCP-MUX is in use.
This change makes it so that if an RTCP packet is being sent
the RTP ICE component is used for sending if RTCP-MUX is in use.

ASTERISK-27133

Change-Id: I6200f611ede709602ee9b89501720c29545ed68b
2017-07-16 17:23:17 +00:00
Torrey Searle
a4c85309f0 res/res_stasis_snoop: generate silence when audiohook returns null
Currently when rtp is paused, no packets are written to the
recorded audio file, causing the silence to be skipped and recording
not properly time aligned.  The read handler as been adapted to
return a silence frame of the correct size.

ASTERISK-27128 #close

Change-Id: I2d7f60650457860b9c70907b14426756b058a844
2017-07-14 07:50:39 -05:00
Sergej Kasumovic
3858d99b73 app_confbridge: Make sure name recordings are always removed from the filesystem
This commit fixes two possible scenarios:

* When recording name and if during recording you hangup, file is never
removed. This is due to the fact file location is nulled.
* When recording name and if you hangup during thank-you prompt, file
is never removed.

ASTERISK-27123 #close

Change-Id: I39b7271408b4b54ce880c5111a886aa8f28c2625
2017-07-14 14:43:33 +02:00
Sergej Kasumovic
cdd6ca488a chan_iax2: On reload make sure to check for existing MWI subscription
On every reload of chan_iax2 module, MWI subscription was added, which
results in additional taskprocessors being accumulated over time.

This commit fixes it by making sure we check for existing subscription
first.

This was verified with 'core show taskprocessors' CLI command.

ASTERISK-27122 #close

Change-Id: Ie2ef528fd5ca01b933eeb88188cc10967899cfb9
2017-07-14 08:20:51 +02:00
Rusty Newton
9f66fb7901 Sounds: Update for core sounds 1.6 release
Added necessary lines to make the en_NZ language set selectable and to get
core sounds 1.6 pulled down.

ASTERISK-26807 #close
ASTERISK-25816 #close
ASTERISK-26274 #close

Change-Id: I84e4dd4696568cc1ba318d12ac4b075461d6eed4
2017-07-13 15:51:42 -05:00
Corey Farrell
df49ad2528 core: Add PARSE_TIMELEN support to ast_parse_arg and ACO.
This adds support for parsing timelen values from config files.  This
includes support for all flags which apply to PARSE_INT32.  Support for
this parser is added to ACO via the OPT_TIMELEN_T option type.

Fixes an issue where extra characters provided to ast_app_parse_timelen
were ignored, they now cause an error.

Testing is included.

ASTERISK-27117 #close

Change-Id: I6b333feca7e3f83b4ef5bf2636fc0fd613742554
2017-07-13 11:46:57 -04:00
Jenkins2
e29284b131 Merge "res/res_pjsip_t38 ensure t38 requests get rejected quickly" into 13 2017-07-13 10:11:40 -05:00
Sean Bright
6d0ff310c6 basic-pbx: Remove res_pjsip_multihomed from sample config
ASTERISK-27127 #close
Reported by: HZMI8gkCvPpom0tM

Change-Id: I2b0c54570d58156e37166ac536728af3b6c01789
2017-07-12 16:07:42 -04:00
Jenkins2
ec182b6d50 Merge "res_musiconhold: Add kill_escalation_delay, kill_method to class" into 13 2017-07-12 05:55:38 -05:00
Joshua Colp
3bf42a58c4 Merge "http.c: Reduce log spam" into 13 2017-07-12 04:25:20 -05:00
George Joseph
4e555437dc res_musiconhold: Add kill_escalation_delay, kill_method to class
By default, when res_musiconhold reloads or unloads, it sends a HUP
signal to custom applications (and all descendants), waits 100ms,
then sends a TERM signal, waits 100ms, then finally sends a KILL
signal.  An application which is interacting with an external
device and/or spawns children of its own may not be able to exit
cleanly in the default times, expecially if sent a KILL signal, or
if it's children are getting signals directly from
res_musiconhoild.

* To allow extra time, the 'kill_escalation_delay'
  class option can be used to set the number of milliseconds
  res_musiconhold waits before escalating kill signals, with the
  default being the current 100ms.

* To control to whom the signals are sent, the "kill_method" class
  option can be set to "process_group" (the default, existing
  behavior), which sends signals to the application and its
  descendants directly, or "process" which sends signals only to the
  application itself.

Change-Id: Iff70a1a9405685a9021a68416830c0db5158603b
2017-07-11 14:41:14 -06:00
Tzafrir Cohen
4f2f3bfebf Avoid setting maxfiles for a remote asterisk
Setting maxfiles (maximum number of open files) has no practical
effect on a remote asterisk (rasterisk, rasterisk -x).

It has an ill effect of printing an extra message, which
may be annoying in case of -x.

ASTERISK-27105 #close

Change-Id: Iaf9eb344e4b4b517df91b736b27ec55f6a6921a2
2017-07-11 12:51:40 -05:00
George Joseph
32b98ad956 http.c: Reduce log spam
Messages like "fwrite() failed: Connection reset by peer" are no
help whatsoever, especially since they can be caused simply by a
client disconnecting.

* Make those WARNINGs DEBUGs.
* Check the return of the headers fprintf.

Change-Id: I17bd5f3621514152a7b2b263c801324c5e96568b
2017-07-11 09:26:27 -05:00
Jenkins2
1498d66f69 Merge "res_pjsip: Fix crash with from_user containing invalid characters." into 13 2017-07-11 07:03:53 -05:00
Jenkins2
b5cd0f9ff3 Merge "json.c: Add backtrace log to find 'Invalid UTF-8 string' errors" into 13 2017-07-10 11:22:06 -05:00
Jenkins2
ccd1015bcb Merge "res_rtp_asterisk.c: Fix TURN deadlock by using ICE session group lock." into 13 2017-07-10 11:05:23 -05:00
Jenkins2
baa51a3bb5 Merge "bridge_native_rtp.c: Fix direct media video RTP instance ACL check." into 13 2017-07-10 10:51:02 -05:00
Benjamin Keith Ford
25e18bf514 res_pjsip: Fix crash with from_user containing invalid characters.
If the from_user field contains certain characters (like @, {, ^, etc.),
PJSIP will return a null value for the URI when attempting to parse it.
This causes a crash when trying to dial out through a trunk that contains
these invalid characters in its from_user field.

This change checks the configuration and ensures that an endpoint will
not be created if the from_user contains an invalid character. It also
adds a null check to the PJSIP URI parsing as a backup.

ASTERISK-27036 #close
Reported by: Maxim Vasilev

Change-Id: I0396fdb5080604e0bdf1277464d5c8a85db913d0
2017-07-10 09:46:24 -05:00
Richard Mudgett
8a803f75a0 json.c: Add backtrace log to find 'Invalid UTF-8 string' errors
Change-Id: I9020ff9f2b3749904317c0c173f47a1bbed6f929
2017-07-07 18:24:43 -05:00
Jenkins2
66eb4f34cf Merge "app_voicemail: Cleanup ODBC connection handling" into 13 2017-07-07 16:24:52 -05:00
Richard Mudgett
aa514f420b res_rtp_asterisk.c: Fix TURN deadlock by using ICE session group lock.
When a message is received on the TURN socket, the code processing the
message needs to call into the ICE/STUN session for further processing.
This code path locks the TURN group lock then the ICE/STUN group lock.  In
another thread an ICE/STUN timer can fire off to send a keep alive message
over the TURN socket.  In this code path, the ICE/STUN group lock is
obtained then the TURN group lock is obtained to send the packet.  A
classic deadlock case if the group locks are not the same.

* Made TURN get created using the ICE/STUN session's group lock.

NOTE: I was originally concerned that the ICE/STUN session can get
recreated by ice_reset_session() for an event like RTCP multiplexing
causing a change during SDP negotiation.  In this case the TURN group lock
would become different.  However, TURN is also recreated as part of the
ICE/STUN recreation in ice_create() when all known ICE candidates are
added to the new ICE session.  While the ICE/STUN and TURN sessions are
being recreated there is a period where the group locks could be
different.

ASTERISK-27023 #close
Patches:
    res_rtp_asterisk-turn-deadlock-fix.patch (license #6502)
        patch uploaded by Michael Walton (modified)

Change-Id: Ic870edb99ce4988a8c8eb6e678ca7f19da1432b9
2017-07-06 16:11:45 -05:00
Joshua Colp
5a894ff27e Merge "Fix alembic branches" into 13 2017-07-06 06:39:13 -05:00
George Joseph
379fe65831 Fix alembic branches
Change-Id: I04f607f084bda9b1b7f626e8e9735c37dc751187
2017-07-06 04:55:17 -06:00
Jenkins2
cad74cdd8f Merge "core: Fix segfault when invoking 'data get' CLI command" into 13 2017-07-05 18:29:28 -05:00
Jenkins2
dc1fc28a4a Merge "pjproject_bundled: Allow passing configure options to bundled" into 13 2017-07-05 17:39:56 -05:00