Commit graph

31572 commits

Author SHA1 Message Date
George Joseph
65b002ab8f CI: Remove duplicate checkout
Change-Id: If5f925b4c4ed7000b153f3ed8386ce2140c886f8
2018-07-11 14:55:55 -06:00
George Joseph
ba8f8a2813 CI: Update cleanup steps and permissions
Change-Id: I7ca92935979d94845af8e1caf4468cbd6209b7de
2018-07-11 14:09:19 -06:00
George Joseph
ad36c4ba9b CI: Fix log artifact paths
Change-Id: I55136de8f4d9c3b56bd4d054306a187bb04a4b7d
2018-07-11 13:54:04 -06:00
George Joseph
4842af6364 CI: Remove CleanBeforeCheckout option for testsuite
Change-Id: I510231c9087f7be5272b8ef3f3223eadaaffb754
2018-07-11 13:45:01 -06:00
George Joseph
3dfc37c60a CI: Move gates into source repo
Change-Id: If028ede5f3b127fa274c63ce166bc04ad7c1e5db
2018-07-11 13:00:38 -06:00
George Joseph
b302ee6bd5 CI: Initial commit for moving CI into source repo
Create tests/CI directory and add files used by Jenkins to
build and test Asterisk.

With this commit, Jenkins will run the Asterisk Unit Tests using
the Jenkinsfile at tests/CI/unittests.jenkinsfile.  Bash scripts
to do the actual building and testing are also in the same directory.
Output is placed in tests/CI/output so that directory has been
added to .gitignore.

Change-Id: I9448065465e6de2b878634510ace8fd1ef378608
2018-07-11 05:19:48 -06:00
Joshua Elson
f7137e1230 res_parking: Add dialplan function for lot channel
This commit adds a new function to res_parking.

This function, PARK_GET_CHANNEL allows the retrieval
of the channel name of the channel occupying the parking slot.

ASTERISK-22825 #close

Change-Id: Idba6ae55b8a53f734238cb3d995cedb95c0e7b74
2018-07-10 11:03:01 -05:00
Joshua Colp
6d0529cd7f Merge "res_pjsip_t38.c: Be smarter about how we respond when T.38 is disabled." 2018-07-10 07:21:45 -05:00
Jenkins2
f095800638 Merge "res_pjsip_pubsub: segfault in function publish_expire" 2018-07-10 06:49:44 -05:00
Jenkins2
c15b2ed26a Merge "chan_ooh323: IPTOS_MINCOST is not defined on Solaris." 2018-07-10 06:25:51 -05:00
Joshua Colp
68c0c081f9 Merge "res_pjsip/pjsip_transport_management.c: Fix deadlock with transport keep alive." 2018-07-09 07:14:51 -05:00
Jenkins2
e023feb609 Merge "test.c: Make output jUnit compatible" 2018-07-09 06:33:58 -05:00
Jenkins2
0111629554 Merge "res_pjsip_session: sdp group:BUNDLE attribute being truncated" 2018-07-09 05:51:14 -05:00
Joshua Colp
ad20736626 Merge "res_pjsip_t38: Decline T.38 stream on failure case." 2018-07-09 05:32:58 -05:00
Alexander Traud
10de9fcbf1 chan_ooh323: IPTOS_MINCOST is not defined on Solaris.
Furthermore, <sys/sockio.h> is required for SIOCGIF*.

ASTERISK-27938

Change-Id: Idc9153ece769944765b66122efb11728d8d8ebde
2018-07-09 09:45:06 +02:00
Kevin Harwell
5bb874ee09 res_pjsip_session: sdp group:BUNDLE attribute being truncated
When setting/appending the media id's to the bundle group attribute a '-1' was
being passed to the 'ast_str_set/append' function for the 'max_len' parameter.
This essentially capped the length of the string to what it was originally
allocated with. In this case 64 bytes.

This patch makes it so a '0' is passed as in for the 'max_len', which means
"no maximum length".

ASTERISK-27955 #close

Change-Id: Iec565df6600401d54a502854a53d19bb4cc34876
2018-07-06 15:40:48 -05:00
Alexei Gradinari
96abe79ddf res_pjsip_pubsub: segfault in function publish_expire
The function pubsub_on_rx_publish_request incorrectly uses
of AST_SCHED_REPLACE_UNREF.

The AST_SCHED_REPLACE_UNREF should unref old '_data'.

Because of this, there may be a double unref
of variable 'publication' when ast_sched_del is unsuccessful
that leads to use after free of the 'publication' in publish_expire.

ASTERISK-27956 #close

Change-Id: Ie0f0cfc7e036953d890b188656010b325a5cdc82
2018-07-06 15:08:42 -05:00
George Joseph
c1e49720fa test.c: Make output jUnit compatible
Separate "name" into "classname" and "name".
Use '.' for classname separator instead of '/'.
Prefix reserved words with '_'.
Wrap output with a top-level "testsuites" element.

Change-Id: Iec1a985eba1c478e5c1d65d5dfd95cb708442099
2018-07-06 12:53:03 -05:00
George Joseph
8f42447c68 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 07:03:45 -06:00
Joshua Colp
c9f8e068ed res_pjsip_t38: Decline T.38 stream on failure case.
When negotiating an incoming T.38 stream the code incorrectly
returned failure instead of a decline for the stream when a
problem occurred or the configuration didn't allow it. This
resulted in SDP offers being rejected with a 488 response
in all cases, even when another valid stream was present.

This change makes it so the stream is now declined. If no
streams are accepted a 488 response is sent while if at least
one stream is accepted all the declined streams are, well,
declined.

ASTERISK-27763

Change-Id: I88bcf793788c412a9839d111a5c736bf6867807c
2018-07-06 04:21:35 -05:00
Jenkins2
ee3cbce5ba Merge "bridge_softmix_binaural: Enable FFTW3 in Solaris 11." 2018-07-05 15:41:12 -05:00
Richard Mudgett
d5db664d70 res_pjsip_t38.c: Be smarter about how we respond when T.38 is disabled.
We were blindly responding with AST_T38_REFUSED when ANY T.38 control
frame came accross the bridge.  This causes T.38 Gateway to get confused
and the T.38 session to get in a strange state.

* Made the T.38 framehook only respond to request frames and ignore
response frames.

ASTERISK-27657
ASTERISK-27080

Change-Id: I5fb5967c7d1efb30a7ff375f82887ca82a55b05b
2018-07-05 15:04:08 -05:00
Jenkins2
57231c1265 Merge "res_pjsip_t38.c: Fix crash by ignoring 1xx messages." 2018-07-05 10:53:47 -05:00
Richard Mudgett
0aff1a278e res_pjsip/pjsip_transport_management.c: Fix deadlock with transport keep alive.
Using the keep_alive_interval option can result in a deadlock between the
pjproject transport manager group lock and the monitored transports ao2
container lock.  The pjproject transport manager group lock has to be
superior in the locking order to the monitored transports ao2 container
lock because of pjproject callbacks called when already holding the group
lock.  The lock inversion happens when Asterisk attempts to send a keep
alive packet over the reliable transports.

* Made keepalive_transport_thread() iterate over the monitored transports
container rather than use the ao2_callback() method.  This avoids holding
the container lock when sending the keep alive packet.

ASTERISK-26686

Change-Id: I5d5392a52e698bbe41a93f7d8e92bf0e61fe3951
2018-07-03 12:15:40 -05:00
Joshua Colp
eb9c031120 Merge "pjsip: Clarify certificate configuration for Websocket." 2018-07-03 11:36:00 -05:00
Joshua Colp
de5144e751 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 07:56:45 -05:00
Alexander Traud
804d931f27 bridge_softmix_binaural: Enable FFTW3 in Solaris 11.
ASTERISK-27939

Change-Id: Ice5640e08385a64a0a6555deaccd91e86bca154f
2018-07-03 04:37:29 -05:00
Richard Mudgett
1aa45ffdfa 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.

ASTERISK-27944

Change-Id: I0ca88aae708d091db7335af73f41035a212adff4
2018-07-02 11:42:20 -05:00
Joshua Colp
f30ebd3823 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 09:39:48 -05:00
Jenkins2
efe2ba43ca Merge "app_confbridge: Bridge and announcers not removed if conference ends quickly" 2018-07-02 07:16:55 -05:00
Joshua Colp
454aa952fa Merge "main/cdr.c: Alleviate CDR deadlock" 2018-07-02 06:54:18 -05:00
Joshua Colp
d0eef3c755 Merge "AMI SendText action: Fix to use correct thread to send the text." 2018-07-02 05:47:04 -05:00
Robert Mordec
9d3f3a4b0a 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 10:07:06 -06:00
Matthew Fredrickson
db02218db2 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:27 -06:00
Kirsty Tyerman
4b9bf4f5e0 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 21:59:56 -06:00
Richard Mudgett
7a238fe74d 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 12:20:30 -06:00
Joshua Colp
5f517bacd0 Merge "app_confbridge: Move participant info code to confbridge_manager." 2018-06-28 13:04:12 -05:00
Joshua Colp
3f7a75b481 Merge "res_pjsip_messaging: Allow application/* for in-dialog MESSAGEs" 2018-06-28 06:46:39 -05:00
Jenkins2
84bb8586fd Merge "res_pjsip_session: Add ability to accept multiple sdp answers" 2018-06-28 06:34:22 -05:00
George Joseph
e3585353f6 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:47:35 -06:00
Joshua Colp
f248345a89 Merge "app_queue: Add option for predial handlers on caller and callee channels" 2018-06-27 05:37:33 -05:00
George Joseph
5f12e2bd07 app_confbridge: Move participant info code to confbridge_manager.
With the participant info code in app_confbridge, we were still
in the process of adding the channel to the bridge when trying to send
an in-dialog MESSAGE.  This caused 2 threads to grab the channel
blocking flag at the same time.  To mitigate this, the participant
info code was moved to confbridge_manager so it runs after all
channel/bridge actions have finished.

Change-Id: I228806ac153074f45e0b35d5236166e92e132abd
2018-06-26 15:18:35 -06:00
Kevin Harwell
fcd8e9d6ef Merge "uuid: Enable UUID in Solaris 11." 2018-06-26 11:08:56 -05:00
George Joseph
880fbff6b7 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 07:05:34 -06:00
George Joseph
017b7849bc Merge "VECTOR: Passing parameters with side effects to macros is dangerous." 2018-06-25 11:35:34 -05:00
Alexander Traud
675e2ddb49 uuid: Enable UUID in Solaris 11.
ASTERISK-27933
Reported by: bautsche

Change-Id: I9b8362824efbfb2a16981e46e85f7c8322908c49
2018-06-23 08:26:19 +02:00
George Joseph
9c63513e5b Merge "smsq: Remove an left-over special case for Solaris." 2018-06-22 12:48:44 -05:00
Jenkins2
06b79aec05 Merge "res_http_post: Enable GMime in Solaris 11." 2018-06-22 12:02:42 -05:00
George Joseph
3fee11f261 Merge "BuildSystem: Enable ./configure in Solaris 11." 2018-06-22 09:22:11 -05:00
George Joseph
5471feb306 Merge "BuildSystem: Enable autotools in Solaris 11." 2018-06-22 09:01:06 -05:00