Commit Graph

29332 Commits

Author SHA1 Message Date
Jenkins2
da691efba8 Merge "format_mp3: Re-work menuselect/build issues" into 14 2017-06-01 10:24:55 -05:00
Joshua Colp
d3ee60522d Merge "app_confbridge: Race between removing and playing name recording while leaving" into 14 2017-06-01 10:01:53 -05:00
Jenkins2
665cfd99dc Merge "res_pjsip: New endpoint option "refer_blind_progress"" into 14 2017-06-01 09:52:54 -05:00
Jenkins2
e0fbf43f30 Merge "test_json: Fix test names with reserved words" into 14 2017-05-31 14:03:20 -05:00
Sean Bright
7bdaed63fd 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:46 -05:00
Joshua Colp
b86c8803fe channel / app_meetme: Fix parentheses.
ASTERISK-27025

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

Change-Id: I0ac061f040093e806c3b1f4e2340864f3ce4dd75
2017-05-30 16:09:42 -05:00
Sean Bright
ca2b3584b2 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:09:33 -05:00
Sean Bright
c01f105e35 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:55:09 -04:00
George Joseph
247b23c816 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:48:58 -05:00
Joshua Colp
e5cd02bcb4 Merge "format_mp3: Don't try to build format_mp3 if we don't have sources" into 14 2017-05-30 06:06:02 -05:00
Joshua Colp
61e4fc5f2d 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:02 -05:00
Sean Bright
009e2cdb2e 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:14:44 -04:00
Jenkins2
4e757a4ca0 Merge "asterisk: Audit locking of channel when manipulating flags." into 14 2017-05-26 09:54:26 -05:00
George Joseph
93fd4cf412 Merge "res_agi: Fix malformed AGI usage response" into 14 2017-05-26 08:22:38 -05:00
Jenkins2
7c5529bcd1 Merge "res_agi: Prevent crash when SET VARIABLE called without arguments" into 14 2017-05-25 20:36:39 -05:00
George Joseph
d5805abf51 Merge "res_agi: Allow configuration of audio format of EAGI pipe" into 14 2017-05-25 17:10:30 -05:00
Jenkins2
3bcb9ffa3f Merge "unittests: Add a unit test that causes a SEGV and..." into 14 2017-05-25 14:41:58 -05:00
Sean Bright
a7953f3089 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:14:56 -05:00
Jenkins2
cb5e8fc3dc Merge "res_agi: Clarify 'RECORD FILE' documentation" into 14 2017-05-24 18:09:31 -05:00
George Joseph
61b9b3fd11 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:06 -05:00
Joshua Colp
e300431077 Merge "res_format_attr_h26x: Trim blanks in fmtp attributes" into 14 2017-05-24 13:03:19 -05:00
Jenkins2
d35c1b3add Merge "app_queue: Fix members showing as being in call when not." into 14 2017-05-24 07:49:01 -05:00
Sean Bright
aaad4daf6d 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:49:00 -04:00
Sean Bright
9d93d4cbfa 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:19 -05:00
Sean Bright
143b758071 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:35 -05:00
Sean Bright
e08136b0dd 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:20 -05:00
Sean Bright
9b2eaa0b52 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:50 -05:00
Joshua Colp
a4689c0576 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:05 +00:00
Jenkins2
77dfb63f03 Merge "res_pjsip_session : fixed wrong From Header number On Re-invite" into 14 2017-05-23 09:06:32 -05:00
Jenkins2
491cbf8581 Merge "chan_sip: Better ICE handling for RTCP-MUX" into 14 2017-05-23 08:49:40 -05:00
Robert Mordec
5565b73a0f 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:19:34 -05:00
Kevin Harwell
9db41320b8 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:45 -05:00
Sean Bright
f487eb1c17 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:51 -05:00
Jenkins2
2684e9c2ea Merge "app_queue: Fix duplicate queue_log entries for EXITEMPTY and ABANDON" into 14 2017-05-22 04:59:35 -05:00
Yasin CANER
89826974ae res_pjsip_session : fixed wrong From Header number On Re-invite
ASTERISK-26964 #close

Change-Id: I55a9caa7dc90e6c4c219cb09b5c2ec08af84a302
2017-05-22 04:03:47 -05:00
Joshua Colp
d219ecf808 Merge "res_hep_rtcp: Add support level to module info" into 14 2017-05-19 18:19:56 -05:00
George Joseph
703d6a4b1b Merge "AST-2017-004: chan_skinny: Add EOF check in skinny_session" into 14 2017-05-19 14:57:25 -05:00
Jenkins2
17b23c4447 Merge "AST-2017-003: Handle zero-length body parts correctly." into 14 2017-05-19 14:19:02 -05:00
Mark Michelson
04c7bd61ce AST-2017-003: Handle zero-length body parts correctly.
ASTERISK-26939 #close

Change-Id: I7ea235ab39833a187db4e078f0788bd0af0a24fd
2017-05-19 11:16:47 -05:00
George Joseph
86333e8079 AST-2017-004: chan_skinny: Add EOF check in skinny_session
The while(1) loop in skinny_session wasn't checking for EOF so
a packet that was longer than a header but still truncated
would spin the while loop infinitely.  Not only does this
permanently tie up a thread and drive a core to 100% utilization,
the call of ast_log() in such a tight loop eats all available
process memory.

Added poll with timeout to top of read loop

ASTERISK-26940 #close
Reported-by: Sandro Gauci

Change-Id: I2ce65f3c5cb24b4943a9f75b64d545a1e2cd2898
2017-05-19 11:16:14 -05:00
Mark Michelson
83f6a6a2d6 AST-2017-002: Ensure transaction key buffer is large enough.
ASTERISK-26938 #close

Change-Id: I266490792fd8896a23be7cb92f316b7e69356413
2017-05-19 11:15:28 -05:00
Sean Bright
0a5265fe10 res_hep_rtcp: Add support level to module info
Change-Id: I5661478f9cf12d431f730e42be79323b62831e92
2017-05-18 16:36:14 -05:00
Ivan Poddubny
933c3f028d app_queue: Fix duplicate queue_log entries for EXITEMPTY and ABANDON
There are 2 places in app_queue.c that log EXITEMPTY event: one in
wait_our_turn, and another one in queue_exec in the loop trying to
call an agent after wait_our_turn.

In most cases it leads to logging EXITEMPTY twice.

ABANDON is also logged on two places, and in the rare case when an agent
and caller hang up simultaneously it's also possible to get duplicates
in queue_log.

This commit changes wait_our_turn to return -1 ("the caller should exit
the queue") instead of 0 ("the caller's turn has arrived") in case of
leaving when empty, so queue_exec skips the agent calling loop.

Also, leave_queue is now executed only once in this case, because 2nd
time is just a noop when the queue entry has already been removed.

Also, it sets qe->handled to -1 to indicate that the call was not
answered by an agent, but the necessary handling has already been done
in order to avoid logging an extra ABANDON entry.

ASTERISK-25665 #close
Reported by: Ove Aursand

Change-Id: I4578dd383bf2ac41589cf167865e8aaebcd4c11e
2017-05-17 14:04:31 -05:00
Jenkins2
17a7013221 Merge "res_pjsip_session.c: Process initial INVITE sooner. (key exists)" into 14 2017-05-17 11:39:22 -05:00
Rodrigo Ramírez Norambuena
fca75547e5 Fix spelling queues.conf.sample file
Change-Id: Ie1c2d83af66f27a449da09a68d987e0992627fee
2017-05-17 09:16:20 -05:00
Joshua Colp
ede77acaaf asterisk: Audit locking of channel when manipulating flags.
When manipulating flags on a channel the channel has to be
locked to guarantee that nothing else is also manipulating
the flags. This change introduces locking where necessary to
guarantee this. It also adds helper functions that manipulate
channel flags and lock to reduce repeated code.

ASTERISK-26789

Change-Id: I489280662dba0f4c50981bfc5b5a7073fef2db10
2017-05-16 09:26:40 -05:00
Richard Mudgett
d7461f22d9 res_pjsip_session.c: Process initial INVITE sooner. (key exists)
Retransmissions of an initial INVITE could be queued in the serializer
before we have processed the first INVITE message.  If the first INVITE
message doesn't get completely processed before the retransmissions are
seen then we could try to setup the same call from the retransmissions.  A
symptom of this is seeing a (key exists) message associated with an
INVITE.  An earlier change attempted to address this kind of problem by
calculating a distributor serializer to use for unassociated messages.
Part of that change also made incoming calls keep using that distributor
serializer.  (ASTERISK-26088) However, some leftover code was still
deferring the INVITE processing to the session's serializer even though we
were already in that serializer.  This not only is unnecessary but would
cause the same call resetup problem.

* Removed the code to defer processing the initial INVITE to the session's
serializer because we are already running in that serializer.

ASTERISK-26998 #close

Change-Id: I1e822d82dcc650e508bc2d40d545d5de4f3421f6
2017-05-15 15:14:40 -05:00
Vitezslav Novy
bf19c0e596 chan_sip: Change sip_get_codec() to return correct codec list
Return cahnnel nativeformats to fix bridge technology selection process.
Same approach as in pjsip module.

ASTERISK-26143
Reported-by: Henning Holtschneider

Change-Id: I64e863753954d6ad67a9e722df2ebc328705ad48
2017-05-12 04:32:35 -05:00
Joshua Colp
85127e8f8d Merge "res_hep_rtcp: Provide chan_sip Call-ID for RTCP messages." into 14 2017-05-11 17:43:01 -05:00