Commit graph

29477 commits

Author SHA1 Message Date
Jenkins2
452e6315bb Merge "format: Reintroduce smoother flags" 2017-06-06 08:59:37 -05:00
Joshua Colp
1a24543124 Merge "Confbridge: Add "sfu" video mode to bridge profile options." 2017-06-06 07:05:13 -05:00
Jenkins2
bb2f6234da Merge "Add primitive SFU support to bridge_softmix." 2017-06-06 06:57:24 -05:00
Joshua Colp
97abf6d475 Merge "res_srtp: Add support for libsrtp2" 2017-06-06 05:01:17 -05:00
Joshua Colp
0d0b1730af Merge "pbx_builtin: Properly handle hangup during Background" 2017-06-05 08:07:39 -05:00
George Joseph
b3590c9602 Merge "app_confbridge: Race between removing and playing name recording while leaving" 2017-06-01 14:43:21 -05:00
Jenkins2
1dc1af4aa5 Merge "stasis_recording: Correct ast_asprintf error checking" 2017-06-01 11:06:16 -05:00
Joshua Colp
8d70c081a4 Merge "format_mp3: Re-work menuselect/build issues" 2017-06-01 10:40:51 -05:00
Jenkins2
48d047ad5a Merge "res_pjsip: New endpoint option "refer_blind_progress"" 2017-06-01 10:05:53 -05:00
Jenkins2
77f7c1b98f Merge "Sqlite3: make busy_timeout configurable." 2017-06-01 09:31:24 -05:00
Jenkins2
f166074524 Merge "test_json: Fix test names with reserved words" 2017-05-31 14:05:59 -05:00
Sean Bright
001f4ddda4 pbx_builtin: Properly handle hangup during Background
Before this patch, when a user hung up during a Background, we would
stuff 0xff into a char and attempt a dialplan lookup of it. This caused
problems for some realtime engines which interpreted the value as the
beginning of an invalid UTF-8 sequence.

ASTERISK-19291 #close
Reported by: Andrew Nowrot

Change-Id: I8ca6da93252d61c76ebdb46a4aa65e73ca985358
2017-05-31 12:25:54 -05:00
Joshua Colp
f6eeaaafd5 channel / app_meetme: Fix parentheses.
ASTERISK-27025

Change-Id: Id736b0aa4ec6b6b0f04663d64fa8d151f81fdbed
2017-05-31 09:00:09 -05:00
Sean Bright
9dce4a947b stasis_recording: Correct ast_asprintf error checking
ASTERISK-27021 #close
Reported by: Tim Morgan

Change-Id: I0ac061f040093e806c3b1f4e2340864f3ce4dd75
2017-05-30 16:09:50 -05:00
Sean Bright
5c27fe2187 format: Reintroduce smoother flags
In review 4843 (ASTERISK-24858), we added a hack that forced a smoother
creation when sending signed linear so that the byte order was adjusted
during transmission. This was needed because smoother flags were lost
during the new format work that was done in Asterisk 13.

Rather than rolling that same hack into res_rtp_multicast, re-introduce
smoother flags so that formats can dictate their own options.

Change-Id: I77b835fba0e539c6ce50014a984766f63cab2c16
2017-05-30 15:10:20 -05:00
Mark Michelson
39d14834f8 Confbridge: Add "sfu" video mode to bridge profile options.
A previous commit added plumbing to bridge_softmix to allow for an SFU
experience with Asterisk. This commit adds an option to app_confbridge
that allows for a confbridge to actually make use of the SFU video mode.

SFU mode is implemented in a "set it and forget it" kind of way. That
is, when the bridge is created, if SFU mode is enabled, then the video
mode gets set to SFU and cannot be changed. Future improvements may
allow for a hybrid experience (e.g. forward multiple video streams,
specifically those of the most recent talkers), but for this addition,
no such capability is present.

Change-Id: I87bbcb63dec6dbbb42488f894871b86f112b2020
2017-05-30 10:24:20 -05:00
Mark Michelson
2da869408a Add primitive SFU support to bridge_softmix.
This sets up the "plumbing" in bridge_softmix to
be able to accommodate Asterisk asking as an SFU
(selective forwarding unit) for conferences.

The way this works is that whenever a channel enters or leaves a
conference, all participants in the bridge get sent a stream topology
change request. The topologies consist of the channels' original
topology, along with video destination streams corresponding to each
participants' source video streams. So for instance, if Alice, Bob, and
Carol are in the conference, and each supplies one video stream, then
the topologies for each would look like so:

Alice:
Audio,
Source video(Alice),
Destination Video(Bob),
Destination video (Carol)

Bob:
Audio,
Source video(Bob)
Destination Video(Alice),
Destination video (Carol)

Carol:
Audio,
Source video(Carol)
Destination Video(Alice),
Destination video (Bob)

This way, video that arrives from a source video stream can then be
copied out to the destination video streams on the other participants'
channels.

Once the bridge gets told that a topology on a channel has changed, the
bridge constructs a map in order to get the video frames routed to the
proper destination streams. This is done using the bridge channel's
stream_map.

This change is bare-bones with regards to SFU support. Some key features
are missing at this point:

* Stream limits. This commit makes no effort to limit the number of
  streams on a specific channel. This means that if there were 50 video
  callers in a conference, bridge_softmix will happily send out topology
  change requests to every channel in the bridge, requesting 50+
  streams.

* Configuration. The plumbing has been added to bridge_softmix, but
  there has been nothing added as of yet to app_confbridge to enable SFU
  video mode.

* Testing. Some functions included here have unit tests.
  However, the functionality as a whole has only been verified by
  hand-tracing the code.

* Selectivenss. For a "selective" forwarding unit, this does not
  currently have any means of being selective.

* Features. Presumably, someone might wish to only receive video from
  specific sources. There are no external-facing functions at the moment
  that allow for users to select who they receive video from.

* Efficiency. The current scheme treats all video streams as being
  unidirectional. We could be re-using a source video stream as a
  desetnation, too. But to simplify things on this first round, I did it
  this way.

Change-Id: I7c44a829cc63acf8b596a337b2dc3c13898a6c4d
2017-05-30 10:24:01 -05:00
Sean Bright
045d7b8cb7 format_mp3: Re-work menuselect/build issues
Rather than removing format_mp3 from ALL_C_MODS (which caused format_mp3
to not show up in menuselect), use .PHONY targets when the necessary
source files are not present.

ASTERISK-23951
Reported by: Tzafrir Cohen

Change-Id: I0a7512c51acc9e86043671795020b0de725bd9e8
2017-05-30 10:57:03 -04:00
George Joseph
80206cdc65 test_json: Fix test names with reserved words
Some of the test names were actually reserved words (true, false,
int, null, string, bool).  When the jenkins test results analyzer
does its thing it tries to create a map using the test names as
keys and fails because they're reserved words.

Added "type_" to those test names.

Change-Id: I90d809f46969c78a1c605b736ff0635196a2cf1b
2017-05-30 09:49:09 -05:00
Jenkins2
cf60a0c5bd Merge "format_mp3: Don't try to build format_mp3 if we don't have sources" 2017-05-30 06:03:26 -05:00
Joshua Colp
9c4f63263c manager: Clear the flag on the other channel.
During the channel flag audit an incorrect change was
done. The flag should be cleared on the second channel.

ASTERISK-26469

Change-Id: I770c5a389550a2fb5a6ade942fccbb2e1d9199c8
2017-05-26 11:43:12 -05:00
Sean Bright
1f136fe885 res_srtp: Add support for libsrtp2
ASTERISK-25294 #close
Reported by: Tzafrir Cohen

ASTERISK-26976 #close
Reported by: Alex

Change-Id: I789b1c3d1ed31365bbd9339fa58ef36f48833c40
2017-05-26 12:15:42 -04:00
Jenkins2
56b6a71548 Merge "asterisk: Audit locking of channel when manipulating flags." 2017-05-26 09:25:51 -05:00
George Joseph
6bb3cedb1b Merge "res_agi: Prevent crash when SET VARIABLE called without arguments" 2017-05-26 07:12:16 -05:00
George Joseph
366b10a500 Merge "res_agi: Allow configuration of audio format of EAGI pipe" 2017-05-25 19:01:57 -05:00
Jenkins2
915acf1e5d Merge "res_agi: Fix malformed AGI usage response" 2017-05-25 15:23:18 -05:00
Jenkins2
24318aac45 Merge "unittests: Add a unit test that causes a SEGV and..." 2017-05-25 14:44:35 -05:00
Sean Bright
59348aa182 format_mp3: Don't try to build format_mp3 if we don't have sources
ASTERISK-23951 #close
Reported by: Tzafrir Cohen

Change-Id: Iebf181d44bb735787fde4b5be863c4d7e2478a30
2017-05-25 11:15:04 -05:00
Martin Tomec
44c5a144ce Sqlite3: make busy_timeout configurable.
Enables runtime configuration of busy_timeout for sqlite databases.
Default timeout remains 1000ms.

ASTERISK-27014 #close

Change-Id: I8921a3aac3c335843be4cb17d2dd0a5c157a36da
2017-05-25 10:02:42 +02:00
Jenkins2
d6992daaef Merge "res_agi: Clarify 'RECORD FILE' documentation" 2017-05-24 18:09:33 -05:00
George Joseph
08edd54c1b unittests: Add a unit test that causes a SEGV and...
...that can only be run by explicitly calling it with
'test execute category /DO_NOT_RUN/ name RAISE_SEGV'

This allows us to more easily test CI and debugging tools that
should do certain things when asterisk coredumps.

To allow this a new member was added to the ast_test_info
structure named 'explicit_only'.  If set by a test, the test
will be skipped during a 'test execute all' or
'test execute category ...'.

Change-Id: Ia3a11856aae4887df9a02b6b081cc777b36eb6ed
2017-05-24 15:58:18 -05:00
Joshua Colp
2e7866ebb7 Merge "app_queue: Add QUEUE_RAISE_PENALTY feature" 2017-05-24 13:04:16 -05:00
Jenkins2
c247625012 Merge "chan_sip: Better ICE handling for RTCP-MUX" 2017-05-24 11:41:02 -05:00
Jenkins2
cd0e6a2324 Merge "res_rtp_asterisk: rtcp mux using the wrong srtp unprotecting algorithm" 2017-05-24 11:25:58 -05:00
Jenkins2
2200009099 Merge "res_format_attr_h26x: Trim blanks in fmtp attributes" 2017-05-24 11:02:24 -05:00
Sean Bright
d847fe6585 res_agi: Allow configuration of audio format of EAGI pipe
This change allows the format of the EAGI audio pipe to be changed by
setting the dialplan variable 'EAGI_AUDIO_FORMAT' to the name of one of
the loaded formats.

ASTERISK-26124 #close

Change-Id: I7a10fad401ad2a21c68c2e7246fa357d5cee5bbd
2017-05-23 16:51:19 -04:00
Sean Bright
e2e6baa8d8 res_agi: Clarify 'RECORD FILE' documentation
Documented the 'beep' option in both the parameters list and the command
description.

ASTERISK-23839 #close

Change-Id: I4970395c922dbdce3f7cf0f56d5b065ec9aa53ea
2017-05-23 13:35:26 -05:00
Sean Bright
3dcb3c88aa res_agi: Prevent crash when SET VARIABLE called without arguments
Explicitly check that the appropriate number of arguments were passed to
SET VARIABLE before attempting to reference them. Also initialize the
arguments array to zeroes before populating it.

ASTERISK-22432 #close

Change-Id: I5143607d80a2724f749c1674f3126b04ed32ea97
2017-05-23 13:08:44 -05:00
Sean Bright
e490aa3176 res_agi: Fix malformed AGI usage response
If the generated XML documentation for a command does not end with a \n,
the postamble of the usage message does not appear on its own line.

ASTERISK-25662 #close

Change-Id: If190f1e9e37fe215fed95897d78d4a6e142b0020
2017-05-23 12:37:28 -05:00
Sean Bright
8ae0227cf3 res_format_attr_h26x: Trim blanks in fmtp attributes
Some devices separate format attributes with a semicolon followed by a
space, so trim blanks before trying to match them.

ASTERISK-27008 #close

Change-Id: Ia44cb2e4fef5c73dc541a29da79cb0e19c22d9cc
2017-05-23 10:57:57 -05:00
Joshua Colp
faab058014 app_queue: Fix members showing as being in call when not.
A change was done which added an 'in_call' flag to queue
members that was set to true while talking to an agent.
Unfortunately in practice this does not accurately reflect
whether they are talking to an agent or not. If a Local
channel is involved and a transfer is performed then the
app_queue application would incorrectly think the agent
was still in a call with the caller. This was done to
fix a race condition between an agent becoming available
by device state and the checking of the last call information
for the wrapup time. There was a small window where the
last call information would be the previous value instead
of the new one.

This change goes about fixing the original issue in a
different way by considering the call completed if device
state is received which would make the agent available
and if they are currently in a call. If this occurs the
last call information is updated before the agent becomes
available ensuring that old information is not present
when checking if the member should be called. This also
improves the transfer situation by actually updating
and enforcing the wrapup time.

ASTERISK-26399
ASTERISK-26400
ASTERISK-26715
ASTERISK-26975

Change-Id: Ife1cb686e3173b3a6d368601adef9aff69d4beea
2017-05-23 09:24:22 -05:00
Joshua Colp
dece2eb892 Merge "res_pjsip_session : fixed wrong From Header number On Re-invite" 2017-05-23 09:17:13 -05:00
Robert Mordec
36e90952ec app_confbridge: Race between removing and playing name recording while leaving
When user leaves a conference, its channel calls async_play_sound_file()
in order to play the name announcement and then unlinks the sound file.
The async_play_sound_file() function adds a task to conference playback queue,
which then runs playback_common() function in a different thread.

It leads to a race condition when, in some cases, channel thread may unlink
the sound file before playback_common() had a chance to open it.

This patch creates a file deletion task, that is queued after playback.

ASTERISK-27012 #close

Change-Id: I412f7922d412004b80917d4e892546c15bd70dd3
2017-05-23 07:20:01 -05:00
Kevin Harwell
440ff38c08 res_rtp_asterisk: rtcp mux using the wrong srtp unprotecting algorithm
When using rtcp mux if an rtcp payload came in it would still use the srtp
unprotect algorithm instead of the srtp unprotect rtcp method. Since rtcp
data was being passed to the rtp unprotect method this would result in an
error.

This patch ensures that the correct unprotect method is chosen by making
sure the passed in rtcp flag is appropriately set when rtcp mux is enabled
and an rtcp payload is received.

ASTERISK-26979 #close

Change-Id: Ic5409f9d1a267f1d4785fc5aed867daaecca6241
2017-05-22 14:05:51 -05:00
Sean Bright
0f487978a9 chan_sip: Better ICE handling for RTCP-MUX
If we are offered or are offering RTCP-MUX, don't consider RTCP ICE
candidates. This confuses certain browsers (current Firefox for
example) and causes intial audio setup delays.

ASTERISK-26982 #close

Change-Id: Ifeaf47e83972fe8dbe58b7fb3d6d1823400cfb91
2017-05-22 09:01:57 -05:00
Steve Davies
be4beff3e4 app_queue: Add QUEUE_RAISE_PENALTY feature
Additional variable to work alongside QUEUE_MAX_PENALTY and QUEUE_MIN_PENALTY,
including an extra parameter in queuerules.conf. This value causes lower
Agent penalty values to "raise up" so that they can join higher penalty agents
and be treated equally after a period of time.

ASTERISK-26995 #close

Change-Id: If1c6421a983667a5ac4c359f6dac25b212b4c459
2017-05-22 09:20:02 -03:00
Joshua Colp
95c6b98acf Merge "app_queue: Fix duplicate queue_log entries for EXITEMPTY and ABANDON" 2017-05-22 05:37:32 -05:00
Joshua Colp
8a83b473f1 Merge "app_stream_echo: Added a multi-stream echo application" 2017-05-22 05:03:05 -05:00
Jenkins2
5fffb96736 Merge "core/conversions: Added string to unsigned integer and long conversions" 2017-05-22 04:59:49 -05:00
Jenkins2
b5570de7b4 Merge "res_hep_rtcp: Add support level to module info" 2017-05-19 18:19:01 -05:00