Commit Graph

29740 Commits

Author SHA1 Message Date
Joshua Colp
027f3f665b Merge "res_pjsip_nat.c: Remove unnecessary CMP_STOP." into 15 2017-08-07 09:09:05 -05:00
Jenkins2
f339069d09 Merge "Support GMIME 3.0" into 15 2017-08-07 08:00:26 -05:00
Joshua Colp
0e352ec510 bridge: Fix stream topology/participant locking and video misrouting.
This change fixes a few locking issues and some video misrouting.

1. When accessing the stream topology of a channel the channel lock
must be held to guarantee the topology remains valid.

2. When a channel was joined to a bridge the bridge specific
implementation for stream mapping was not invoked, causing video
to be misrouted for a brief period of time.

ASTERISK-27182

Change-Id: I5d2f779248b84d41c5bb3896bf22ba324b336b03
2017-08-06 11:17:42 -05:00
Corey Farrell
3dbb1b9f48 channel: Fix leak on successful call to chan->tech->requester.
joint_cap needs to be released unconditionally as chan->tech->requester
does not steal the reference even on success.

ASTERISK-27180 #close

Change-Id: I647728992559bdb0a9c7357c20be1b36400d68b6
2017-08-05 15:16:40 -05:00
Kevin Harwell
09995fae53 res_pjsip_session/_sdp_rtp: Handling of 'msid' is incorrect
Currently, the handling of the msid attribute is not quite right. According to
the spec the msid's between the offer/answer are not dependent upon one another.
Meaning the same msid's given in an offer do not have to be returned in the
answer for a given stream. And they probably shouldn't be (copied/reused) since
this can potentially cause some browser side confusion.

This patch generates new msids when both an offer and answer are sent from
Asterisk. However, Asterisk does reuse the original msid it sent out for a
reinvite. Also audio+video streams are paired together by sharing the same
stream id, but a different track id.

ASTERISK-27179 #close

Change-Id: Ifaec06dc7e65ad841633a24ebec8c8a9302d6643
2017-08-04 17:16:25 -05:00
Corey Farrell
418e062ce5 app_privacy: remove unused header asterisk/image.h
Change-Id: I56ed530633a642633b18383821069e806c92ae82
2017-08-04 14:16:51 -05:00
Jenkins2
2014a695f7 Merge "alembic/res_pjsip: Add "webrtc" configuration option" into 15 2017-08-04 13:22:47 -05:00
Joshua Colp
3517551b3a Merge "Fix compile error for old versions of GCC." into 15 2017-08-04 12:05:48 -05:00
Jenkins2
3ac2da8974 Merge "Correct some leaks in unit tests." into 15 2017-08-04 11:40:18 -05:00
Jenkins2
4c7f81af6e Merge "res_pjsip_transport_websocket.c: Fix serializer ref leak." into 15 2017-08-04 10:46:36 -05:00
Jenkins2
230cf2ee59 Merge "res_pjsip_outbound_registration.c: Misc fixes." into 15 2017-08-04 09:53:10 -05:00
Tzafrir Cohen
0cbfb95b7f Support GMIME 3.0
Support building the Asterisk httpd with version 3.0 of gmime as
well as earlier versions of that library.

ASTERISK-27173

Change-Id: I7e13dd05a3083ccb0df2dabf83110223f6a9fa8f
2017-08-04 09:43:57 -05:00
Corey Farrell
1a3e08326e Correct some leaks in unit tests.
* chan_sip: channel in test_sip_rtpqos_1.
* test_config: config hook, config info and global config holder.
* test_core_format: format in format_attribute_set_without_interface.
* test_stream: unneeded frame duplication.
* test_taskprocessor: task_data.

Change-Id: I94d364d195cf3b3b5de2bf3ad565343275c7ad31
2017-08-03 21:27:51 -05:00
Richard Mudgett
563264c9b5 res_pjsip_transport_websocket.c: Fix serializer ref leak.
Change-Id: Ib5a19bfd597f63d9021baeb645fc11153b3afa57
2017-08-03 16:35:38 -05:00
Richard Mudgett
347e148aa0 res_pjsip_outbound_registration.c: Misc fixes.
* Remove unnecessary CMP_STOP.

* In handle_client_registration() use DEBUG_ATLEAST() to only do work
needed for the debug log message when the debug log message is needed.

* In sip_outbound_registration_state_destroy() check state->registration
for NULL.

Change-Id: I656d0fa11dda0b00048103efb1558e67a426fd80
2017-08-03 16:26:41 -05:00
Richard Mudgett
db6b883087 res_pjsip_nat.c: Remove unnecessary CMP_STOP.
Change-Id: I6279b0d723bc3b75b8d65e81e02da9ea9bc0c3da
2017-08-03 16:24:09 -05:00
Richard Mudgett
2cd7bec061 res_pjsip_registrar.c: Remove unnecessary CMP_STOP.
Most uses of CMP_STOP are superfluous and are only respected when
OBJ_MULTIPLE is used to search the container.

Change-Id: I20571a202ec0aa1098bb2749eeba18de7ca110b8
2017-08-03 16:22:04 -05:00
Kevin Harwell
b0c016cf6e alembic/res_pjsip: Add "webrtc" configuration option
When the "webrtc" option was added in res_pjsip it was not added to the alembic
scripts. This patch adds the option for alembic.

Also, changed the sorcery configuration type to an OPT_YESNO_T value instead of
an OPT_BOOL_T so if this field is ever written to a database it will write out
the correct value.

ASTERISK-27119 #close

Change-Id: I3e199f060aea25e193c439fc5cf96be4d3ed1c7b
2017-08-03 11:45:51 -05:00
Corey Farrell
cd79a15b2f Fix compile error for old versions of GCC.
Use -Wno-format-truncation only if supported by compiler.

ASTERISK-27171 #close

Change-Id: Iac0aed7a5bcaa16c21b7d62c4e4678d244c4ccb6
2017-08-03 11:31:58 -05:00
George Joseph
6edefc9480 Revert "res_pjsip_session: Release media resources on session end quicker."
This reverts commit 6c374d863c420d2519a52fffba3de5f935a30cdb.

Change-Id: Ia89836005df66ef540885afd6f171886de0db442
2017-08-01 15:39:26 -06:00
Joshua Colp
8f51443a08 res_pjsip_session: Release media resources on session end quicker.
A change was made long ago where the session was kept around
until the underlying INVITE session had been destroyed. This
had the side effect of also keeping the underlying media resources
around for this time as well.

This change ensures that when we know the session is ending we
release the media resources immediately.

ASTERISK-27110

Change-Id: I3c6a82fe7d2c50b9dc9197cb12ef22f20d337501
2017-08-01 15:39:26 -06:00
Sean Bright
ef39998169 res_pjsip_pidf_eyebeam_body_supplement: Correct status presentation
This change fixes PIDF content generation when the underlying device
state is considered in use. Previously it was incorrectly marked
as closed meaning they were offline/unavailable. The code now
correctly marks them as open.

Additionally:

  * Generate an XML element for our activity instead of a using a text
    node.

  * Consider every extension state other than "unavailable" to be 'open'
    status.

  * Update the XML namespaces and structure to reflect those
    documented in RFC 4480

  * Use 'on-the-phone' (defined in RFC 4880) instead of 'busy' as the
    "in use" activity. This change results in eyeBeam using the
    appropriate icon for the watched user.

This was tested on eyeBeam 1.5.20.2 build 59030 on Windows.

ASTERISK-26659 #close
Reported by: Abraham Liebsch
patches:
  ASTERISK-26659.diff submitted by snuffy (license 5024)

Change-Id: I6e5ad450f91106029fb30517b8c0ea0c2058c810
2017-08-01 15:39:25 -06:00
Joshua Colp
448317ddc7 res_pjsip: Add support for dnsmgr to external_media_address.
The "external_media_address" option on transports is now
resolved using dnsmgr. This allows it to be automatically
refreshed regularly if refreshes are enabled in dnsmgr.
If the system is using a dynamic IP address a dynamic DNS
hostname can be provided to keep the IP address up to
date.

Change-Id: Ia54771720dff0105bde55d5bbb81a3ba437e05b2
2017-08-01 15:39:25 -06:00
Corey Farrell
7c3cdc81f7 Fix compiler warnings on Fedora 26 / GCC 7.
GCC 7 has added capability to produce warnings, this fixes most of those
warnings.  The specific warnings are disabled in a few places:

* app_voicemail.c: truncation of paths more than 4096 chars in many places.
* chan_mgcp.c: callid truncated to 80 chars.
* cdr.c: two userfields are combined to cdr copy, fix would break ABI.
* tcptls.c: ignore use of deprecated method SSLv3_client_method().

ASTERISK-27156 #close

Change-Id: I65f280e7d3cfad279d16f41823a4d6fddcbc4c88
2017-08-01 15:39:25 -06:00
Sean Bright
1078d4f7f6 app_queue: Add announce-position-only-up option
Setting this option will cause the Queue application to only announce
the caller's position if it has improved since the last time that we
announced it.

Change-Id: I173a124121422209485b043e2bf784f54242fce6
2017-08-01 15:39:25 -06:00
George Joseph
63224d5d9c bundled_pjproject: Improve SSL/TLS error handling
OpenSSL has 2 levels or error processing.  It's possible for the
top layer to return SSL_ERROR_SYSCALL but the lower layer return
no error, in which case processing should continue.  Only the top
layer was being examined though so connections were being torn
down when they didn't need to be.  This patch adds the examination
of the lower level codes, and if they return no errors, allows
processing to continue.

ASTERISK-27001
Reported-by: Ian Gilmour
patches:
	pjproject-2.6.patch submitted by Ian Gilmour (license 6889)

Updated-by: George Joseph and Sauw Ming (Teluu)

Merged to upstream pjproject on 7/27/2017 (commit 5631)

Change-Id: I23844ca0c68ef1ee550f14d46f6dae57d33b7bd2
2017-08-01 15:39:12 -06:00
Torrey Searle
c24cdbf4ae chan_pjsip: add a new function PJSIP_DTMF_MODE
This function is a replica of SIPDtmfMode, allowing the DTMF mode of a
PJSIP call to be modified on a per-call basis

ASTERISK-27085 #close

Change-Id: I20eef5da3e5d1d3e58b304416bc79683f87e7612
2017-08-01 15:33:38 -06:00
Sean Bright
d056f6b2fe res_rtp_asterisk: Fix mapping of pjsip's ICE roles to ours
Change-Id: Ia578ede1a55b21014581793992a429441903278b
2017-07-26 16:16:35 -05:00
Joshua Colp
1c07c80eef Merge "bridge_softmix / res_rtp_asterisk: Fix packet loss and renegotiation issues." into 15 2017-07-26 10:48:19 -05:00
Jenkins2
fab609deeb Merge "Core: Add support for systemd socket activation." into 15 2017-07-26 08:59:58 -05:00
Joshua Colp
28979a0f1c Merge "res_stasis_device_state: Unsubscribe should remove old subscriptions" into 15 2017-07-26 07:58:45 -05:00
Jenkins2
a11f5fb51a Merge "app_voicemail.c: Allow mailbox entry on authentication retry prompt." into 15 2017-07-26 06:55:56 -05:00
Joshua Colp
451d86d62e bridge_softmix / res_rtp_asterisk: Fix packet loss and renegotiation issues.
This change does a few things to improve packet loss and renegotiation:

1. On outgoing RTP streams we will now properly reflect out of order
packets and packet loss in the sequence number. This allows the
remote jitterbuffer to better reorder things.

2. Video updates can now be discarded for a period of time
after one has been sent to prevent flooding of clients.

3. For declined and removed streams we will now release any
media session resources associated with them. This was not
previously done and caused an issue where old state was being
used for a new stream.

4. RTP bundling was not actually removing bundled RTP instances
from the parent. This has been resolved by removing based on
the RTP instance itself and not the SSRC.

5. The code did not properly handle explicitly unbundling an
RTP instance from its parent. This now works as expected.

ASTERISK-27143

Change-Id: Ibd91362f0e4990b6129638e712bc8adf0899fd45
2017-07-26 06:00:56 -05:00
Jenkins2
29a746c534 Merge "core: Add VP9 passthrough support." into 15 2017-07-25 10:43:07 -05:00
Sergej Kasumovic
2128dc7c87 res_stasis_device_state: Unsubscribe should remove old subscriptions
Case scenario with Applications ARI:

* Once you subscribe to deviceState with Applications REST API, it will be
added into subscription pool.

* When you unsubscribe it will remove from the device_state_subscription
hash table but not from the subscription pool.

* When you subscribe again, it will add it to pool again.

* Now you will have two subscriptions and you will receive same event
twice.

This fix should now remove deviceState subscription from pool and it
should fix unsubscribe on deviceState.

ASTERISK-27130 #close

Change-Id: I718b70d770a086e39b4ddba4f69a3c616d4476c4
2017-07-25 07:58:05 -05:00
Jenkins2
644af26f70 Merge "say.c: Fix file locations for second, seconds, minute, minutes files" into 15 2017-07-25 07:40:05 -05:00
Joshua Colp
927fc6bbd9 core: Add VP9 passthrough support.
This change adds VP9 as a known codec and creates a cached
"vp9" media format for use.

Change-Id: I025a93ed05cf96153d66f36db1839109cc24c5cc
2017-07-24 13:51:12 -05:00
Matthew Fredrickson
9aa4942a49 format.h: Fix a few minor errors in comments.
A few minor problems were found in comments in format.h.  This patch fixes them.

Change-Id: I07f0bdb47b93359b361c4c3d8ecc87cd3199dd94
2017-07-24 09:29:27 -05:00
Jenkins2
a4b55519d0 Merge "Restore the incorrectly deleted spandspflow2pcap.log" into 15 2017-07-24 07:19:59 -05:00
Richard Mudgett
85c631294a app_voicemail.c: Allow mailbox entry on authentication retry prompt.
The following testsuite voicemail tests were failing to re-enter the
mailbox after the first login attempt.

tests/apps/voicemail/authenticate_invalid_mailbox
tests/apps/voicemail/authenticate_invalid_password

The tests were noting the start of the vm-incorrect-mailbox prompt and
immediately sending the mailbox for the next login attempt.  Since the
invalid message playback had to complete before the digits were
recognized, the test passed for the wrong reason and added approximately
20 seconds to the test times.

* Allow the vm-incorrect-mailbox prompt to get interrupted by the mailbox
digits like the initial vm-login prompt so the tests are able to enter the
intended mailbox.

Change-Id: I1dc53fe917bfe03a4587b2c4cd24c94696a69df8
2017-07-21 16:16:58 -05:00
Rusty Newton
e0ad75ec2a Sounds: Update Makefile for Extra sounds 1.5.1 release
Incrementing version for the Extra sounds release. 1.5.1 Extra sounds
removes two prompts that were moved into the Core packages in the 1.6 Core
sounds release.

ASTERISK-27142 #close

Change-Id: I82f017812b0ea9599e19dd4635afd55611f13ee7
2017-07-21 16:10:56 -05:00
Rusty Newton
715d79b60d say.c: Fix file locations for second, seconds, minute, minutes files
The seconds and minutes files have always existed in the base language
directory of the Core package. So say.c has always been calling the wrong
location (under digits/) for those two files and in the case of second and
minute they didn't exist in the Core packages at all.

The 1.6 sounds release moves the second and minute files into Core from
Extra for the languages that already had them. A future release will include
the second and minute files for languages that didn't already have them.

This patch just changes all the target locations for second, seconds,
minute, and minutes that were under the digits subdir to be under the root of
sounds instead. Which is where the sounds will be for some languages after 1.6
sounds and for all languages after a future release.

ASTERISK-25810 #close

Change-Id: I05d9d4bee6a7237030530a46e7eb3df15f13f702
Reported-by: Nicolas Riendeau
2017-07-21 16:05:20 -05:00
Corey Farrell
eea9da2f42 Core: Add support for systemd socket activation.
This change adds support for socket activation of certain SOCK_STREAM
listeners in Asterisk:
* AMI / AMI over TLS
* CLI
* HTTP / HTTPS

Example systemd units are provided.  This support extends to any socket
which is initialized using ast_tcptls_server_start, so any unknown
modules using this function will support socket activation.

Asterisk continues to function as normal if socket activation is not
enabled or if systemd development headers are not available during
build.

ASTERISK-27063 #close

Change-Id: Id814ee6a892f4b80d018365c8ad8d89063474f4d
2017-07-21 14:04:33 -05:00
George Joseph
94de9d3eea Restore the incorrectly deleted spandspflow2pcap.log
Change-Id: Iafe78cf0fb1e7064223d4dea279eeb776c8fa8e5
2017-07-21 11:25:07 -05:00
George Joseph
7fcb730997 Merge "Update make_ari_stubs to correct version" into 15 2017-07-21 08:01:45 -05:00
George Joseph
6239203628 Update make_ari_stubs to correct version
Change-Id: I18575b46db48d62edc72f37dc23b4ab22b43a8b1
2017-07-21 06:56:49 -06:00
Sean Bright
6650ae43e1 corosync: Fix corosync library name in configure.ac
Also add new corosync packages to install_prereq.

Reported by Travis Ryan in #asterisk-dev

Change-Id: Ib861c95ba630fed62dc54e56784ad8446ed9d2db
2017-07-20 13:40:14 -05:00
George Joseph
b172474728 Update MAINLINE_BRANCH to 15
Change-Id: I425d542b600ceabeef2342e9adfeb68c484a043d
2017-07-20 12:10:00 -06:00
Jenkins2
96b69f6a47 Merge "Update AMI and ARI versions for master/15 and update UPDATE.txt" 2017-07-20 12:17:48 -05:00
George Joseph
2720e2b2b2 Merge "pjsip: Increase maximum packet size." 2017-07-20 11:08:44 -05:00