Commit Graph

28287 Commits

Author SHA1 Message Date
Joshua Colp
d5774005fe Merge "res_pjsip: Fix tdata leaks in off nominal paths." into 13 2016-11-14 06:15:44 -06:00
Joshua Colp
10e64a5fb8 Merge "res_pjsip_sdp_rtp: Reject offer of required SRTP without res_srtp." into 13 2016-11-11 15:17:55 -06:00
zuul
cf08676c00 Merge "build: Fix default values for some SANITIZER options" into 13 2016-11-10 22:09:02 -06:00
Richard Mudgett
2e7fc56d3c res_pjsip: Fix tdata leaks in off nominal paths.
Change-Id: Ie83e06e88c2d60157775263b07e40b61718ac97b
2016-11-10 16:14:55 -06:00
Richard Mudgett
da68b185b3 res_pjsip_registrar_expire.c: Remove extra linefeed in debug message.
Change-Id: I1f9adb911f23376503396ec8867e8005b755eb94
2016-11-10 14:23:46 -06:00
Joshua Colp
b70eb07c53 res_pjsip_sdp_rtp: Reject offer of required SRTP without res_srtp.
When optimistic SRTP was on it was possible for us to still
set up a call without an audio stream if an offer was received
with required SRTP.

This change makes it so this scenario will now fail with a 488
response.

ASTERISK-26575

Change-Id: I7d14187037681f48879bd20319ac79d0877318f3
2016-11-10 16:57:49 +00:00
Joshua Colp
71dc333565 app_queue: Add mention of 'ABANDON' variable to CHANGES.
ASTERISK-26558

Change-Id: I1127010181e79c8ac291f72f036cb8e430dc7f7e
2016-11-10 14:33:41 +00:00
George Joseph
ccc8a37584 Merge "Revert "autoservice: Use frame deferral API"" into 13 2016-11-10 07:42:37 -06:00
George Joseph
07e7ac5119 Merge "Revert "Add API for channel frame deferral."" into 13 2016-11-10 07:42:36 -06:00
George Joseph
06045fc29e Merge "Revert "AGI: Only defer frames when in an interception routine."" into 13 2016-11-10 07:42:36 -06:00
George Joseph
9e13c3e2a1 Merge "Revert "channel: Use frame deferral API for safe sleep."" into 13 2016-11-10 07:42:35 -06:00
George Joseph
6b5a7ced13 Revert "Add API for channel frame deferral."
This reverts commit 9231a56cf3.
Multiple testsuite failures were detected after the fact.

Change-Id: I3bac8d7c3ddb69a4ddf6c5d6de0ffa5ff7ff3af7
2016-11-10 08:41:55 -05:00
George Joseph
6be5d8de0d Revert "AGI: Only defer frames when in an interception routine."
This reverts commit 5c10091f3d.
Multiple testsuite failures were detected after the fact.

Change-Id: I397a841acc17ae230c512449cd6bed89d2ef3b73
2016-11-10 08:41:43 -05:00
George Joseph
1df434e2b4 Revert "autoservice: Use frame deferral API"
This reverts commit 2e3a354575.
Multiple testsuite failures were detected after the fact.

Change-Id: Ia45fa4633fae74dca345b24bb6722737c63035de
2016-11-10 08:41:25 -05:00
George Joseph
58c88cfbaa Revert "channel: Use frame deferral API for safe sleep."
This reverts commit 44f7e25239.
Multiple testsuite failures were detected after the fact.

Change-Id: I56299087da22128a95f0c8f3955f740890d7ca65
2016-11-10 08:40:59 -05:00
Joshua Colp
44fd077739 Merge "app_queue: new variable set when abandoned" into 13 2016-11-10 06:52:41 -06:00
George Joseph
a562fbe618 build: Fix default values for some SANITIZER options
2 of the sanitizers didn't have default values so in systems that
don't support sanitizers menuselect would spit out warnings.  They
were harmless but confusing.  They've now been set to "0".

Change-Id: I08dc495e3b83f1feac3160b421f538c375fc5d58
2016-11-09 17:18:00 -07:00
George Joseph
dfcb2b6c24 Merge "res_pjsip_session: Do not call session supplements when it's too late." into 13 2016-11-09 13:23:59 -06:00
Sebastian Gutierrez
7fd5031c1c app_queue: new variable set when abandoned
sets the variable ABANDONED to TRUE if the call was not answered.

ASTERISK-26558

Change-Id: I4729af9bff4eba436d8a776afd3374065d0036d3
2016-11-08 21:42:24 -03:00
Mark Michelson
e043d1a55c res_pjsip_session: Do not call session supplements when it's too late.
res_pjsip_sesssion was hooking into transaction and invite state
changes. One of the reasons for doing so was due to the
PJSIP_EVENT_TX_MSG event. The idea was that we were hooking into the
message sending process, and so we should call session supplements to
alter the outgoing message.

In reality, this event was meant to indicate that the message either
a) had already been sent, or
b) required a DNS lookup and would be sent when the DNS query
completed.

In case (a), this meant we were altering an already-sent
request/response for no reason. In case (b), this potentially meant we
could be trying to alter a request/response at the same time that the
DNS resolution completed. In this case, it meant we might be stomping on
memory being used by the thread actually sending the message. This
caused potential crashes and memory corruption.

This patch removes the calls to session supplements from the case where
the PJSIP_EVENT_TX_MSG event occurs. In all of these cases, trying to
alter the message at this point is too late, and it can cause nothing
but harm to try to do it. Because there were no longer any calls to the
handle_outgoing() function, it has been removed.

Change-Id: Ibcc223fb1c3a237927f38754e0429e80ee301e92
2016-11-08 10:48:32 -06:00
Mark Michelson
44f7e25239 channel: Use frame deferral API for safe sleep.
This is another case where manual frame deferral can be replaced with
centralized routines instead.

Change-Id: I42cdf205f8f29a7977e599751a57efbaac07c30e
2016-11-08 07:15:31 -07:00
Mark Michelson
2e3a354575 autoservice: Use frame deferral API
Rather than use manual frame deferral, just let the channel API do it
for us.

ASTERISK-26343

Change-Id: I688386f36e765dbc07be863943a43f26bd5eac49
2016-11-08 07:15:22 -07:00
Mark Michelson
5c10091f3d AGI: Only defer frames when in an interception routine.
AGI recently was modified to defer important frames. This was because
when AGI was used in a connected line interception routine, the
resulting connected line frame would end up getting discarded by the
AGI.

However, this caused bad behavior in other cases. Specifically, during a
transfer, if someone attempted to manually set the Caller ID on a
channel in an AGI, the deferred connected line frame would end up
overwriting what had been manually set in the AGI.

Since the initial issue was specific to interception routines, this
change removes the manual frame deferral from AGI and instead uses the
new frame deferral API in interception routines.

ASTERISK-26343 #close
Reported by Morton Tryfoss

Change-Id: Iab7d39436d0ee99bfe32ad55ef91e9bd88db4208
2016-11-08 07:14:20 -07:00
zuul
3870e8d76d Merge "automon: restore mixing of the both channels after recording stops" into 13 2016-11-08 07:58:28 -06:00
zuul
7477c95749 Merge "Add API for channel frame deferral." into 13 2016-11-08 07:58:25 -06:00
Joshua Colp
093eadf46a Merge "chan_ooh323: reset rrq count on gk registration" into 13 2016-11-08 04:59:03 -06:00
Joshua Colp
0310845acd Merge "chan_ooh323: Fixes to work right with Cisco devices" into 13 2016-11-08 04:58:25 -06:00
Joshua Colp
77e56bc2e0 Merge "stasis_recording/stored: remove calls to deprecated readdir_r function." into 13 2016-11-08 04:57:47 -06:00
Joshua Colp
dc04c1725f Merge "res_stasis: Don't unsubscribe from a NULL bridge." into 13 2016-11-07 19:48:23 -06:00
Joshua Colp
58df0ccc0e Merge "res_http_websocket: Increase the buffer size for non-LOW_MEMORY systems" into 13 2016-11-07 19:32:05 -06:00
Joshua Colp
768bac97cc Merge "res_stasis: Set a video source mode on Stasis created bridges" into 13 2016-11-07 18:23:26 -06:00
Joshua Colp
87c884965c Merge "main/bridge: Add some verbose logging for video source changes" into 13 2016-11-07 16:53:27 -06:00
Joshua Colp
222cee2410 Merge "main/bridge_channel: Fix channel reference leak on video source" into 13 2016-11-07 16:31:45 -06:00
Joshua Colp
814d8a99d1 Merge "bridges/bridge_softmix: Remove SSRC changes on join/leave; update video source" into 13 2016-11-07 14:23:35 -06:00
Mark Michelson
9231a56cf3 Add API for channel frame deferral.
There are several places in Asterisk that have duplicated logic
for deferring important frames until later.

This commit adds a couple of API calls to facilitate this automatically.

ast_channel_start_defer_frames(): Future reads of deferrable frames on
this channel will be deferred until later.

ast_channel_stop_defer_frames(): Any frames that have been deferred get
requeued onto the channel.

ASTERISK-26343

Change-Id: I3e1b87bc6796f222442fa6f7d1b6a4706fb33641
2016-11-07 12:25:59 -06:00
zuul
64e71fcf68 Merge "pjproject_bundled: Fix issue with libasteriskpj needing libresample" into 13 2016-11-07 10:18:59 -06:00
Alexander Anikin
a9ac1f5de4 chan_ooh323: Fixes to work right with Cisco devices
Changed output packets queue processing algo to one read-one write
instead of all read-all send

Remove h.245 tunneling parameter from ReleaseComplete packet

ASTERISK-24400 #close
Reported by: Dmitry Melekhov
Tested by: Dmitry Melekhov

Change-Id: I0b31933b062a21011dbac9a82b8bcfe345f406f6
2016-11-07 10:01:33 -05:00
Alexander Anikin
0ee249075a chan_ooh323: reset rrq count on gk registration
reset registration attempts count on success registration on gatekeeper

Change-Id: I5f47351852e0ca76c9ac78421659600e0f106336
2016-11-07 09:59:03 -05:00
zuul
f02647ebbd Merge "chan_ooh323: Fix infinite loop on read second part of H.225 packet" into 13 2016-11-07 07:50:38 -06:00
zuul
3a4baca35a Merge "rtp_engine: Allow more than 32 dynamic payload types." into 13 2016-11-07 06:38:25 -06:00
Michael Kuron
59c23e1768 automon: restore mixing of the both channels after recording stops
This is a regression over Asterisk 11, introduced by
2dc8a06006. Previously, recordings started via
the automon DTMF code would automatically be mixed together using sox because
app_monitor would be called with the m option. This commit restores this
behavior.

Change-Id: Ibaf58684285c3f1b6ca3714524e6d638ae3b3759
2016-11-06 10:48:32 +01:00
Matt Jordan
e79acaeb75 res_http_websocket: Increase the buffer size for non-LOW_MEMORY systems
Not surprisingly, using Respoke (and possibly other systems) it is
possible to blow past the 16k limit for a WebSocket packet size. This
patch bumps it up to 32k, which, at least for Respoke, is sufficient.
For now.

Because 32k is laughable on a LOW_MEMORY system (as is 16k, for that
matter), this patch adds a LOW_MEMORY directive that sets the buffer to
8k for systems who have asked for their reduced memory availability to
be considered.

Change-Id: Id235902537091b58608196844dc4b045e383cd2e
2016-11-04 15:49:50 -05:00
Matt Jordan
7a83196985 res_stasis: Set a video source mode on Stasis created bridges
When a bridge is created via ARI (through res_stasis), no video source
mode is set by default. As a result, any endpoint sending video media
won't ever see any video reflected back to it.

This patch defaults a bridge to a 'follow the talker' video mode.
Further work can be done to add routes that allow for the video mode to
be controlled through the /bridges resource.

Change-Id: I7e9d530a5d7a97a4524a9ee4e468e1a6b3443866
2016-11-04 15:49:32 -05:00
Matt Jordan
e7dc536b7a main/bridge_channel: Fix channel reference leak on video source
When a channel is made the video source, the bridge holds a reference to
it. Whenever the video source changes, that reference is released.
However, a ref leak does occur if the channel leaves the bridge (such as
being hung up) while it is the video source, as the bridge never
releases the ref in such a case.

This patch adds a line to the bridge_channel_internal_join routine such
that, when a channel finishes its time in the bridge, it notifies the
bridge via ast_bridge_remove_video_src that if it is a video source its
reference should be released.

ASTERISK-26555 #close

Change-Id: I3a2f5238a9d2fc49c591f0e65199d782ab0be76a
2016-11-04 15:49:18 -05:00
Matt Jordan
7c824b955d main/bridge: Add some verbose logging for video source changes
It's actually quite useful to see the source of a video stream change.
This doesn't happen terribly often, even with talk detection - but when
it does, it's nice to know which channel is now providing your video
stream.

As a verbose 5 level message, it shouldn't be terribly spammy or costly
to have, and is 'lower level' then most other verbose messages that the
bridge system emits.

ASTERISK-26555

Change-Id: Ia1c20ecafa9670171fd38bddcf3beccae47fb15c
2016-11-04 15:49:00 -05:00
Matt Jordan
fd6af2dee8 bridges/bridge_softmix: Remove SSRC changes on join/leave; update video source
WebRTC clients really, really want to know the SSRC of the media they're
getting. Changing the SSRC is generally not a good thing.

bridge_softmix, starting in Asterisk 12, started changing the SSRC of
parties as they joined or left the bridge. With most phones, this isn't
a problem: phones just play back the stream they're getting. With WebRTC
clients, however, the SSRC is tied to a media stream that may be
negotiated. When a new SSRC just shows up, the media can be dropped.

As it turns out, the SSRC change shouldn't even be necessary. From the
perspective of the client, it's still talking to Asterisk with the same
media stream: why indicate that the far party has suddenly changed to a
different source of media?

This patch opts to just remove the SSRC changes. With this patch, video
clients that join/leave a softmix bridge actually get the video stream
instead of freaking out.

ASTERISK-26555

Change-Id: I27fec098b32e7c8718b4b65f3fd5fa73527968bf
2016-11-04 15:48:31 -05:00
Kevin Harwell
bd4d7d8ad0 stasis_recording/stored: remove calls to deprecated readdir_r function.
The readdir_r function has been deprecated and should no longer be used. This
patch removes the readdir_r dependency (replaced it with readdir) and also moves
the directory search code to a more centralized spot (file.c)

Also removed a strict dependency on the dirent structure's d_type field as it
is not portable. The code now checks to see if the value is available. If so,
it tries to use it, but defaults back to using the stats function if necessary.

Lastly, for most implementations of readdir it *should* be thread-safe to make
concurrent calls to it as long as different directory streams are specified.
glibc falls into this category. However, since it is possible that there exist
some implementations that are not safe, locking has been added for those other
than glibc.

ASTERISK-26412
ASTERISK-26509 #close

Change-Id: Id8f54689b1e2873e82a09d0d0d2faf41964e80ba
2016-11-04 13:58:21 -05:00
Kevin Harwell
cb30963d22 Revert "chan_sip: Fix lastrtprx always updated"
This reverts commit 93332cb1d0.

Unfortunately, the aforementioned commit caused a regression (incoming calls
would eventually disconnect). Thus it is being removed.

ASTERISK-26523 #close
ASTERISK-25270

Change-Id: Ibf5586adc303073a8eac667a4cbfdb6be184a64d
2016-11-04 10:59:38 -05:00
Joshua Colp
3a1f9c5dab res_stasis: Don't unsubscribe from a NULL bridge.
A NULL bridge has special meaning in res_stasis for
unsubscribing. It means that a subscription to ALL
bridges should be removed. This should not be done
as part of the normal subscription management in
the res_stasis channel loop.

ASTERISK-26468

Change-Id: I6d5bea8246dd13a22ef86b736aefbf2a39c15af0
2016-11-03 21:08:58 +00:00
Alexander Anikin
eceab15f33 chan_ooh323: Fix infinite loop on read second part of H.225 packet
Fix logic on read second part of H.225 packet. There was infinite loop on
wrong connections due to read before poll.

Change-Id: I42b4bf75c46e4a5c5df5c5ca1f0bd74b8944e7ff
2016-11-03 13:48:21 -05:00