Commit Graph

28598 Commits

Author SHA1 Message Date
zuul
a58d359701 Merge "res_pjsip.c: Rework endpt_send_request() req_wrapper code." into 13 2016-11-14 12:44:41 -06:00
George Joseph
5e0c224043 cli: Fix ast_el_read_char to work with libedit >= 3.1
Libedit 3.1 is not build with unicode on as a default and so the
prototype for the el_gets callback changed from expecting a char buffer
to accepting a wchar buffer.  If ast_el_read_char isn't changed,
the cli reads garbage from teh terminal.

Added a configure test for (*el_rfunc_t)(EditLine *, wchar_t *) and
updated ast_el_read_char to use the HAVE_ define to detemrine whether
to use char or wchar.

ASTERISK-26592 #close

Change-Id: I9099b46f68e06d0202ff80e53022a2b68b08871a
2016-11-14 13:20:26 -05:00
Joshua Colp
ec17e96784 Merge "Fix closing rtp ports after call finished in chan_unistim." into 13 2016-11-14 08:05:38 -06:00
Joshua Colp
d5774005fe Merge "res_pjsip: Fix tdata leaks in off nominal paths." into 13 2016-11-14 06:15:44 -06:00
Igor Goncharovskiy
3faca1d4ff Fix closing rtp ports after call finished in chan_unistim.
Fix ASTERISK-26565 by adding ast_rtp_instance_stop before
rtp instance destroy for chan_unistim. Also several fixes
for displayed text translation.

Change-Id: If42a03eea09bd1633471406bdc829cf98bf6affc
2016-11-11 23:02:11 -05: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
412d43fa21 res_pjsip.c: Rework endpt_send_request() req_wrapper code.
* Don't hold the req_wrapper lock too long in endpt_send_request().  We
could block the PJSIP monitor thread if the timeout timer expires.
sip_get_tpselector_from_endpoint() does a sorcery access that could take
awhile accessing a database.  pjsip_endpt_send_request() might take awhile
if selecting a transport.

* Shorten the time that the req_wrapper lock is held in the callback
functions.

* Simplify endpt_send_request() req_wrapper->timeout code.

* Removed some redundant req_wrapper->timeout_timer->id assignments.

Change-Id: I3195e3a8e0207bb8e7f49060ad2742cf21a6e4c9
2016-11-10 16:17:33 -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
George Joseph
ee73af1d88 Update for 13.12.2 13.12.2 2016-11-10 14:34:55 -05: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
Kevin Harwell
a3614d75f6 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-07 12:27:17 -05: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