Commit Graph

28908 Commits

Author SHA1 Message Date
Jenkins2
f0400ed858 Merge "channel: ast_write frame wrongly freed after call to audiohooks" into 13 2017-06-07 07:58:41 -05:00
Sean Bright
c093bf8072 res_rtp_multicast: Use consistent timestamps when possible
When a frame destined for a MulticastRTP channel does not have timing
information (such as when an 'originate' is done), we generate the RTP
timestamps ourselves without regard to the number of samples we are
about to send.

Instead, use the same method as res_rtp_asterisk and 'predict' a
timestamp given the number of samples. If the difference between the
timestamp that we generate and the one we predict is within a specific
threshold, use the predicted timestamp so that we end up with timestamps
that are consistent with the number of samples we are actually sending.

Change-Id: I2bf0db3541b1573043330421cbb114ff0f22ec1f
2017-06-06 11:54:07 -04:00
Jenkins2
95b2b542f6 Merge "format: Reintroduce smoother flags" into 13 2017-06-06 08:49:35 -05:00
Joshua Colp
3d7e9375fb Merge "res_srtp: Add support for libsrtp2" into 13 2017-06-06 05:00:57 -05:00
Kevin Harwell
adfb28882b channel: ast_write frame wrongly freed after call to audiohooks
ASTERISK-26419 introduced a bug when calling ast_audiohook_write_list in
ast_write. It would free the frame given to ast_write if the frame returned
by ast_audiohook_write_list was different than the given one. The frame
give to ast_write should never be freed within that function. It is the
caller's resposibility to free the frame after writing (or when it its done
with it). By freeing it within ast_write this of course led to some memory
corruption problems.

This patch makes it so the frame given to ast_write is no longer freed within
the function. The frame returned by ast_audiohook_write_list is now subsequently
used in ast_write and is freed later. It is freed either after translate if the
frame returned by translate is different, or near the end of ast_write prior
to function exit.

ASTERISK-26973 #close

Change-Id: I463d4ac3b736ced95de986ee74a489c7c7ab103b
2017-06-05 10:45:25 -05:00
Jenkins2
cee5b78be8 Merge "pbx_builtin: Properly handle hangup during Background" into 13 2017-06-05 07:35:23 -05:00
Jenkins2
174a9b5d99 Merge "stasis_recording: Correct ast_asprintf error checking" into 13 2017-06-01 10:47:53 -05:00
Jenkins2
1e086cf018 Merge "format_mp3: Re-work menuselect/build issues" into 13 2017-06-01 10:16:20 -05:00
Jenkins2
3e8eea0325 Merge "res_pjsip: New endpoint option "refer_blind_progress"" into 13 2017-06-01 09:48:48 -05:00
Jenkins2
a76b473c49 Merge "app_confbridge: Race between removing and playing name recording while leaving" into 13 2017-06-01 09:17:44 -05:00
Joshua Colp
b276810aa1 Merge "sip.conf.sample: Clarify where DTLS settings are permitted" into 13 2017-06-01 08:32:57 -05:00
Jenkins2
3f336ca053 Merge "test_json: Fix test names with reserved words" into 13 2017-05-31 13:59:39 -05:00
Sean Bright
283cc59af7 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 13:22:12 -04:00
Joshua Colp
dc05183f4b channel / app_meetme: Fix parentheses.
ASTERISK-27025

Change-Id: Id736b0aa4ec6b6b0f04663d64fa8d151f81fdbed
2017-05-31 13:59:04 +00:00
Sean Bright
cf6cf59646 stasis_recording: Correct ast_asprintf error checking
ASTERISK-27021 #close
Reported by: Tim Morgan

Change-Id: I0ac061f040093e806c3b1f4e2340864f3ce4dd75
2017-05-30 17:07:56 -04:00
Sean Bright
70e5887906 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:08:05 -05:00
Sean Bright
97b003f5e2 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:51:00 -04:00
George Joseph
c10341646d 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 08:43:49 -06:00
Joshua Colp
1e65857e6f Merge "format_mp3: Don't try to build format_mp3 if we don't have sources" into 13 2017-05-30 05:53:33 -05:00
Joshua Colp
b07b216235 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 16:41:59 +00:00
Sean Bright
5e9cd1f20d 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:06:34 -04:00
Jenkins2
d4ccd3a6c0 Merge "asterisk: Audit locking of channel when manipulating flags." into 13 2017-05-26 09:12:11 -05:00
Jenkins2
5715360ba5 Merge "res_agi: Fix malformed AGI usage response" into 13 2017-05-26 08:00:49 -05:00
George Joseph
a8f8c5d857 Merge "res_agi: Allow configuration of audio format of EAGI pipe" into 13 2017-05-25 19:01:19 -05:00
George Joseph
a2d15b93f1 Merge "unittests: Add a unit test that causes a SEGV and..." into 13 2017-05-25 15:06:15 -05:00
Jenkins2
558199e5dd Merge "res_agi: Prevent crash when SET VARIABLE called without arguments" into 13 2017-05-25 14:44:11 -05:00
Sean Bright
72213c98e3 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 12:13:48 -04:00
Jenkins2
a3684b74e6 Merge "res_agi: Clarify 'RECORD FILE' documentation" into 13 2017-05-24 17:58:57 -05:00
George Joseph
65898c3af8 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 14:56:14 -06:00
Joshua Colp
1bddf1efc3 Merge "chan_sip: Better ICE handling for RTCP-MUX" into 13 2017-05-24 11:41:30 -05:00
Jenkins2
a69905af69 Merge "res_rtp_asterisk: rtcp mux using the wrong srtp unprotecting algorithm" into 13 2017-05-24 11:12:11 -05:00
Jenkins2
4dfcccdb70 Merge "res_format_attr_h26x: Trim blanks in fmtp attributes" into 13 2017-05-24 09:39:40 -05:00
Jenkins2
bc4ef72394 Merge "app_queue: Fix members showing as being in call when not." into 13 2017-05-24 08:38:37 -05:00
Sean Bright
90237dca11 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:46:47 -04:00
Sean Bright
3eb7fbba72 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 14:33:16 -04:00
Sean Bright
f306e451f6 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 14:06:22 -04:00
Sean Bright
a007e438c3 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 13:35:25 -04:00
Sean Bright
971a401ce9 sip.conf.sample: Clarify where DTLS settings are permitted
ASTERISK-25101 #close

Change-Id: I09a97793e5577b4422d0ae883fadb3f0d86725cc
2017-05-23 13:00:55 -04:00
Sean Bright
700ef6861a 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 11:57:18 -04:00
Joshua Colp
6bfcb1acc7 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 14:23:49 +00:00
Jenkins2
d0a1239f55 Merge "res_pjsip_session : fixed wrong From Header number On Re-invite" into 13 2017-05-23 09:07:20 -05:00
Robert Mordec
f1b32de2c5 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 14:16:11 +02:00
Kevin Harwell
e91efef2bb 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 13:51:40 -05:00
Sean Bright
4479038073 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 10:00:33 -04:00
Jenkins2
7af41de364 Merge "app_queue: Fix duplicate queue_log entries for EXITEMPTY and ABANDON" into 13 2017-05-22 04:52:35 -05:00
Yasin CANER
36628cc9c4 res_pjsip_session : fixed wrong From Header number On Re-invite
ASTERISK-26964 #close

Change-Id: I55a9caa7dc90e6c4c219cb09b5c2ec08af84a302
2017-05-22 04:03:56 -05:00
Jenkins2
ff6d179864 Merge "res_hep_rtcp: Add support level to module info" into 13 2017-05-19 18:10:33 -05:00
Jenkins2
7919b7287f Merge "AST-2017-004: chan_skinny: Add EOF check in skinny_session" into 13 2017-05-19 14:55:04 -05:00
Jenkins2
6aa11c4b31 Merge "AST-2017-003: Handle zero-length body parts correctly." into 13 2017-05-19 14:23:32 -05:00
Mark Michelson
919ccdb9ac AST-2017-002: Ensure transaction key buffer is large enough.
ASTERISK-26938 #close

Change-Id: I266490792fd8896a23be7cb92f316b7e69356413
2017-05-19 11:08:52 -05:00