Commit Graph

30296 Commits

Author SHA1 Message Date
Jenkins2
0c7cc3a16b Merge "res_pjsip: Add 'suppress_q850_reason_headers' option to endpoint" into 13 2018-07-09 05:00:53 -05:00
George Joseph
3470409dd6 res_pjsip: Add 'suppress_q850_reason_headers' option to endpoint
A new option 'suppress_q850_reason_headers' has been added to the
endpoint object. Some devices can't accept multiple Reason headers and
get confused when both 'SIP' and 'Q.850' Reason headers are received.
This option allows the 'Q.850' Reason header to be suppressed.
The default value is 'no'.

ASTERISK-27949
Reported-by: Ross Beer

Change-Id: I54cf37a827d77de2079256bb3de7e90fa5e1deb1
2018-07-06 06:57:37 -06:00
Jenkins2
b6a13f0fc2 Merge "res_pjsip_t38.c: Fix crash by ignoring 1xx messages." into 13 2018-07-05 10:48:37 -05:00
Jenkins2
43dc9c3d5f Merge "pjsip: Clarify certificate configuration for Websocket." into 13 2018-07-03 11:21:06 -05:00
Jenkins2
0d2a8b911c Merge "res_pjsip_pubsub: Hold module reference for publications." into 13 2018-07-03 08:33:49 -05:00
Joshua Colp
62859ad526 pjsip: Clarify certificate configuration for Websocket.
The Websocket transport uses the built-in HTTP server. As a result
the TLS configuration is done in http.conf and not in pjsip.conf.

This change adds a warning if this is configured in pjsip.conf and
also clarifies in the sample configuration file.

Change-Id: I187d994d328c3ed274b6754fd4c2a4955bdc6dd9
2018-07-03 09:57:13 -03:00
Richard Mudgett
140ce56f50 res_pjsip_t38.c: Fix crash by ignoring 1xx messages.
If we initiated a T.38 reINVITE, we would crash if we received any other
1xx response message except 100 if it were followed by a 200 response.

* Made ignore any 1xx response so we do not close out the T.38 negotiation
too early.  For good measure we'll now accept any 2xx response as
acceptance of the reINVITE T.38 offer.

NOTE: In v13 we don't actually crash but we should deal with the non-final
response messages and not switch to rejected and then to enabled when the
200 comes in.

ASTERISK-27944

Change-Id: I0ca88aae708d091db7335af73f41035a212adff4
2018-07-02 11:41:05 -05:00
Joshua Colp
5f3869608a res_pjsip_pubsub: Hold module reference for publications.
Incoming publications need to ensure that the module remains
loaded for the lifetime of them. This is now done by holding
a reference to the module while the publication exists. This
mirrors that of inbound subscriptions.

ASTERISK-27783

Change-Id: Ia98c95a15e11af25728d5fb3e56e12cda0cfc7c0
2018-07-02 11:39:24 -03:00
Jenkins2
4ed6ab2595 Merge "app_confbridge: Bridge and announcers not removed if conference ends quickly" into 13 2018-07-02 06:49:44 -05:00
Jenkins2
567e306f8e Merge "main/cdr.c: Alleviate CDR deadlock" into 13 2018-07-02 06:40:22 -05:00
Joshua Colp
82765b4409 Merge "AMI SendText action: Fix to use correct thread to send the text." into 13 2018-07-02 05:46:57 -05:00
Robert Mordec
447ec4e472 app_confbridge: Bridge and announcers not removed if conference ends quickly
If a conference is ended very quickly after it was created (i.e., the
first user immediately hangs up) then the conference bridge and announcer
channels are not removed.

When a conference is created, the push_announcer() function is added to
the playback queue task processor and the conference object reference is
bumped.  If a conference is ended while the push_announcer() function is
still going then the ao2_cleanup(conference) at the end of
push_announcer() will call the destructor function -
destroy_conference_bridge().

The destroy_conference_bridge() function will then add the
hangup_playback() task to the playback queue and will wait for it to end.
Since it is already a current task of the playback queue it will wait
forever.

This patch makes the conference thread call push_announcer() directly.
This way the conference object reference bump is not needed.  Since the
playback queue task processor is only used by the conference thread
itself, there is no danger of trying to play announcements before the
announcer is pushed to the bridge.

ASTERISK-27870 #close

Change-Id: I947a50fb121422d90fd1816d643a54d75185a477
2018-06-29 11:06:26 -05:00
Matthew Fredrickson
33f4716d13 main/cdr.c: Alleviate CDR deadlock
There is a rare case (do to the infrequent timing involved) where
CDR submission threads in batch mode can deadlock with a currently
running CDR batch process.  This patch should remove the need for
holding the lock in the scheduler and should clean a few code
paths up that inconsistently submitted new work to the CDR batch
processor.

ASTERISK-27909

Change-Id: I6333e865db7c593c102c2fd948cecdb96481974d
Reported-by: Denis Lebedev
2018-06-29 09:46:17 -06:00
Kirsty Tyerman
3203c3491a pbx_dundi: reordered unloading of module pbx_dundi
Destroy scheduler after peers are pruned to stop dundi crashing when
unloading module.

ASTERISK-26987
Reported-by: Kirsty Tyerman

Change-Id: Ic12e562cd90d8d813a9e97f302045091f59e3c05
2018-06-28 22:01:25 -06:00
Richard Mudgett
d0e4cbfc51 AMI SendText action: Fix to use correct thread to send the text.
The AMI action was directly sending the text to the channel driver.
However, this makes two threads attempt to handle media and runs afowl of
CHECK_BLOCKING.

* Queue a read action to make the channel's media handling thread actually
send the text message.  This changes the AMI actions success/fail response
to just mean the text was queued to be sent not that the text actually got
sent.  The channel driver may not even support sending text messages.

ASTERISK-27943

Change-Id: I9dce343d8fa634ba5a416a1326d8a6340f98c379
2018-06-28 13:15:46 -05:00
Jenkins2
6b6fa461d6 Merge "res_pjsip_session: Add ability to accept multiple sdp answers" into 13 2018-06-28 06:08:12 -05:00
Jenkins2
a5754e7904 Merge "res_pjsip_messaging: Allow application/* for in-dialog MESSAGEs" into 13 2018-06-28 06:02:37 -05:00
George Joseph
6087c1e575 res_pjsip_messaging: Allow application/* for in-dialog MESSAGEs
In addition to text/* content types, incoming_in_dialog_request now
accepts application/* content types.

Also fixed a length issue when copying the body text.  It was one
character short.

ASTERISK-27942

Change-Id: I4e54d8cc6158dc47eb8fdd6ba0108c6fd53f2818
2018-06-27 06:46:27 -06:00
Kevin Harwell
ef788f4d64 Merge "uuid: Enable UUID in Solaris 11." into 13 2018-06-26 11:08:38 -05:00
George Joseph
06966e91fe res_pjsip_session: Add ability to accept multiple sdp answers
pjproject by default currently will follow media forked during an INVITE
on outbound calls if the To tag is different on a subsequent response as
that on an earlier response.  We handle this correctly.  There have
been reported cases where the To tag is the same but we still need to
follow the media.  The pjproject patch in this commit adds the
capability to sip_inv and also adds the capability to control it at
runtime.  The original "different tag" behavior was always controllable
at runtime but we never did anything with it and left it to default to
TRUE.

So, along with the pjproject patch, this commit adds options to both the
system and endpoint objects to control the two behaviors, and a small
logic change to session_inv_on_media_update in res_pjsip_session to
control the behavior at the endpoint level.

The default behavior for "different tags" remains the same at TRUE and
the default for "same tag" is FALSE.

Change-Id: I64d071942b79adb2f0a4e13137389b19404fe3d6
ASTERISK-27936
Reported-by: Ross Beer
2018-06-26 06:57:18 -06:00
Jenkins2
4603e24609 Merge "VECTOR: Passing parameters with side effects to macros is dangerous." into 13 2018-06-25 11:20:46 -05:00
Alexander Traud
5e9230b528 uuid: Enable UUID in Solaris 11.
ASTERISK-27933
Reported by: bautsche

Change-Id: I9b8362824efbfb2a16981e46e85f7c8322908c49
2018-06-23 00:27:06 -06:00
Jenkins2
caeb7fbe17 Merge "res_http_post: Enable GMime in Solaris 11." into 13 2018-06-22 11:42:28 -05:00
Jenkins2
acf9178925 Merge "smsq: Remove an left-over special case for Solaris." into 13 2018-06-22 11:33:32 -05:00
Jenkins2
b057932138 Merge "BuildSystem: Enable ./configure in Solaris 11." into 13 2018-06-22 08:42:03 -05:00
Jenkins2
bcaf644875 Merge "BuildSystem: Enable autotools in Solaris 11." into 13 2018-06-22 08:31:54 -05:00
Joshua Colp
101cd0d18e Merge "chan_oss: Compile in Solaris 11." into 13 2018-06-22 07:56:23 -05:00
Joshua Colp
dca83e2aa2 Merge "utils: Avoid an unused variable in Solaris 11." into 13 2018-06-22 07:21:56 -05:00
Joshua Colp
400f683fc1 Merge "func_env: Compile in Solaris 11." into 13 2018-06-22 07:18:28 -05:00
Jenkins2
533ab01414 Merge "codecs/ilbc: Compile in Solaris 11." into 13 2018-06-22 06:38:39 -05:00
Richard Mudgett
cb9475eb3d VECTOR: Passing parameters with side effects to macros is dangerous.
* Fix several instances where we were bumping a ref in the parameter and
then unrefing the object if it failed.  The way the AST_VECTOR_APPEND()
and AST_VECTOR_REPLACE() macros are implemented means if it fails the new
value was never evaluated.

Change-Id: I2847872a455b11ea7e5b7ce697c0a455a1d0ac9a
2018-06-21 16:57:47 -05:00
Alexander Traud
6d201a5df4 smsq: Remove an left-over special case for Solaris.
Actually, this case was never needed because the check below does the same.

Change-Id: Ia2fca4ba6c58c644a8b7cb2d9db8539728c14ffb
2018-06-21 10:45:57 -06:00
Alexander Traud
c8966b8c29 res_http_post: Enable GMime in Solaris 11.
Change-Id: Ie434541f18f894c751d2e44bcb3efb3cac626019
2018-06-21 10:18:55 -06:00
George Joseph
498e775a4a Merge changes from topic 'ASTERISK-27625' into 13
* changes:
  channel.c: Make CHECK_BLOCKING() save thread LWP id for messages.
  channel.c: Fix usage of CHECK_BLOCKING()
  autoservice: Don't start channel autoservice if the thread is a user interface.
2018-06-21 10:26:42 -05:00
George Joseph
aedbf5ba58 Merge "ARI POST DTMF: Make not compete with channel's media thread." into 13 2018-06-21 10:26:08 -05:00
George Joseph
4228dc7b4f Merge "AMI PlayDTMF Action: Make not compete with channel's media thread." into 13 2018-06-21 10:22:45 -05:00
Alexander Traud
81f39649ea codecs/ilbc: Compile in Solaris 11.
The symbol FS is the sampling frequency. That symbol is not used in Asterisk at
all and was a copy-and-paste of the iLBC reference code from the IETF RFC.
However, in Solaris, that symbol is defined by another header already. To
compile in Solaris, that symbol has to go.

Change-Id: I91ddbe5be7c00069c3a25abd5f58d7b2f04c51b1
2018-06-21 04:18:35 -06:00
Alexander Traud
78855e13e8 chan_oss: Compile in Solaris 11.
M_READ existed already and was conflicting in name.

Change-Id: I02108e07ae7d2dc314fe1e6c706c17731095a3e4
2018-06-21 04:17:51 -06:00
Alexander Traud
0b3c090ada func_env: Compile in Solaris 11.
Change-Id: Idc9b36720f3d29c90a35a6a1ae79a7f9e1aaf50e
2018-06-21 04:17:03 -06:00
Alexander Traud
a0445c7a3e utils: Avoid an unused variable in Solaris 11.
With ./configure --enable-dev-mode[=noisy], the build fails because every
warning gets an error. Therefore, Asterisk has to be free of warnings and this
variable must go.

Change-Id: I63dd2bc4833b9bdb04602f83422d16caf289d46a
2018-06-21 04:16:23 -06:00
Alexander Traud
d3fe2aceab BuildSystem: Enable ./configure in Solaris 11.
ASTERISK-27931

Change-Id: If298ce7f03be227a3687b9c20d382c9c55a72404
2018-06-21 04:15:23 -06:00
Kevin Harwell
e7ffbbd40e Merge "Fix some doxygen and curly placement." into 13 2018-06-20 17:15:35 -05:00
Jenkins2
8cc080a95c Merge "Dialplan functions: Fix some channel autoservice misuse." into 13 2018-06-20 16:36:58 -05:00
Alexander Traud
7686e674bf BuildSystem: Enable autotools in Solaris 11.
Because this was the last operating system which required a special case, a
version appended to the autotools, the whole version stuff is removed by this
change. This simplifies the script ./bootstrap.sh. Hopefully, this gives even
broader platform compatibility.

ASTERISK-27929
ASTERISK-27926

Change-Id: Id4cf433a1a7fa861d0210e1a2e16ca592b49fd5a
2018-06-20 13:24:55 -06:00
Jenkins2
8c3edf3a69 Merge "menuselect/menuselect_curses: Resolves sprintf usage error" into 13 2018-06-20 10:33:47 -05:00
Richard Mudgett
f878de44af channel.c: Make CHECK_BLOCKING() save thread LWP id for messages.
* Removed an unnecessary call to ast_channel_blocker_set() in
__ast_read().

ASTERISK-27625

Change-Id: I342168b999984666fb869cd519fe779583a73834
2018-06-19 14:13:07 -05:00
Richard Mudgett
99f439dc01 ARI POST DTMF: Make not compete with channel's media thread.
There can be one and only one thread handling a channel's media at a time.
Otherwise, we don't know which thread is going to handle the media frames.

ASTERISK-27625

Change-Id: I4d6a2fe7386ea447ee199003bf8ad681cb30454e
2018-06-19 14:13:07 -05:00
Richard Mudgett
6a1626c265 AMI PlayDTMF Action: Make not compete with channel's media thread.
There can be one and only one thread handling a channel's media at a time.
Otherwise, we don't know which thread is going to handle the media frames.

ASTERISK-27625

Change-Id: Ia341f1a6f4d54f2022261abec9021fe5b2eb4905
2018-06-19 14:13:07 -05:00
Richard Mudgett
1abcc41fff channel.c: Fix usage of CHECK_BLOCKING()
The CHECK_BLOCKING() macro is used to indicate if a channel's handling
thread is about to do a blocking operation (poll, read, or write) of
media.  A few operations such as ast_queue_frame(), soft hangup, and
masquerades use the indication to wake up the blocked thread to reevaluate
what is going on.

ASTERISK-27625

Change-Id: I4dfc33e01e60627d962efa29d0a4244cf151a84d
2018-06-19 14:13:07 -05:00
Richard Mudgett
5d34ca5b33 autoservice: Don't start channel autoservice if the thread is a user interface.
Executing dialplan functions from either AMI or ARI by getting a variable
could place the channel into autoservice.  However, these user interface
threads do not handle the channel's media so we wind up with two threads
attempting to handle the media.

There can be one and only one thread handling a channel's media at a time.
Otherwise, we don't know which thread is going to handle the media frames.

ASTERISK-27625

Change-Id: If2dc94ce15ddabf923ed1e2a65ea0ef56e013e49
2018-06-19 14:13:07 -05:00