summaryrefslogtreecommitdiff
path: root/res
AgeCommit message (Collapse)Author
2018-04-18Merge "stringfields: Collect extended stringfields into the stringfield ↵Jenkins2
section."
2018-04-18Merge "res_pjsip: Fix deadlock on reliable transport shutdown."Joshua Colp
2018-04-17Merge "res_musiconhold: Don't restart MOH from beginning after announcement."Jenkins2
2018-04-16res_rtp_asterisk: Add support for receiving and handling NACK requests.Ben Ford
Adds the ability to receive and handle incoming NACK requests if retransmissions are enabled. If retransmissions are enabled, a data buffer is allocated that stores packets being sent. If a NACK request is received, the packet requested for retransmission is sent if it is still in the buffer. In the same request, if any of the following 16 packets are marked as not received, those will be sent as well if available, as outlined in RFC4585. Also changes RTCP RR and SR to use media source SSRC instead of packet source SSRC when determining which instance to use for RTCP reports. For more information, refer to the wiki page: https://wiki.asterisk.org/wiki/display/AST/WebRTC+User+Experience+Improvements ASTERISK-27806 #close Change-Id: I7f7f124af3b9d5d2fd9cffc6ba8cb48a6fff06ec
2018-04-16stringfields: Collect extended stringfields into the stringfield section.Richard Mudgett
Use of extended stringfields is a temporary mechanism to avoid ABI breakage in released branches without resorting to more inconvienient methods. * Collect existing extended stringfields into the parent stringfield section of the struct. Change-Id: I8d46d037801b4518837c3ea4b6df95ceadc9436b
2018-04-16Merge "res_pjsip.c: Split ast_sip_push_task_synchronous() to fit expectations."George Joseph
2018-04-16Merge "pjsip_scheduler.c: Add ability to trace scheduled tasks."Jenkins2
2018-04-16Merge "pjsip_scheduler.c: Fix some corner cases."Jenkins2
2018-04-13res_musiconhold: Don't restart MOH from beginning after announcement.Ben Ford
This reverts a problem introduced by the fix for ASTERISK_24329. Now, when an announcement is played while waiting in a queue, music on hold will not restart from the beginning of the sound file and will instead pick up where it left off. However, the incorrect behavior in ASTERISK_24329 is now present again; if an announcement X seconds long is played when music on hold starts, music on hold will start X seconds into the file. ASTERISK-27774 #close Reported by: lvl Change-Id: I86b2885ee7063268f9b9747eddb788336ade989b
2018-04-12pjsip_scheduler.c: Add ability to trace scheduled tasks.Richard Mudgett
When a scheduled task is created you can pass in the AST_SIP_SCHED_TASK_TRACK flag. This new flag causes scheduling events to be logged. Change-Id: I91967eb3d5a220915ce86881a28af772f9a7f56b
2018-04-12res_pjsip.c: Split ast_sip_push_task_synchronous() to fit expectations.Richard Mudgett
ast_sip_push_task_synchronous() did not necessarily execute the passed in task under the specified serializer. If the current thread is any registered pjsip thread then it would execute the task immediately instead of under the specified serializer. Reentrancy issues could result if the task does not execute with the right serializer. The original reason ast_sip_push_task_synchronous() checked to see if the current thread was a registered pjsip thread was because of a deadlock with masquerades and the channel technology's fixup callback (ASTERISK_22936). A subsequent masquerade deadlock fix (ASTERISK_24356) involving call pickups avoided the original deadlock situation entirely. The PJSIP channel technology's fixup callback no longer needed to call ast_sip_push_task_synchronous(). However, there are a few places where this unexpected behavior is still required to avoid deadlocks. The pjsip monitor thread executes callbacks that do calls to ast_sip_push_task_synchronous() that would deadlock if the task were actually pushed to the specified serializer. I ran into one dealing with the pubsub subscriptions where an ao2 destructor called ast_sip_push_task_synchronous(). * Split ast_sip_push_task_synchronous() into ast_sip_push_task_wait_servant() and ast_sip_push_task_wait_serializer(). ast_sip_push_task_wait_servant() has the old behavior of ast_sip_push_task_synchronous(). ast_sip_push_task_wait_serializer() has the new behavior where the task is always executed by the specified serializer or a picked serializer if one is not passed in. Both functions behave the same if the current thread is not a SIP servant. * Redirected ast_sip_push_task_synchronous() to ast_sip_push_task_wait_servant() to preserve API for released branches. ASTERISK_26806 Change-Id: Id040fa42c0e5972f4c8deef380921461d213b9f3
2018-04-12pjsip_scheduler.c: Fix some corner cases.Richard Mudgett
* Fix the periodic interval wander because it may take significant time between the sched thread queueing the task in the serializer and the serializer actually executing the task. The time it takes to actually execute the task was already taken into account. * Pass a schtd ref to the serializer when we queue a scheduled task on the serializer. We don't want it going away on us while it is in the serializer queue. * Skip the scheduled task if the task was canceled between queueing the task to the serializer and the serializer actually executing the task. * Reorder struct ast_sip_sched_task to avoid unnecessary padding. Removed task_id and added next_periodic. * Hold a ref to the passed in serializer so the serializer cannot go away on the scheduled task. ASTERISK_26806 Change-Id: I6c8046b75f6953792c8c30e55b836a4291143f24
2018-04-12pjsip_scheduler.c: Sort "pjsip show scheduled_tasks" output.Richard Mudgett
* A side benefit is that the scheduled tasks are not completely blocked while the CLI command executes. * Adjusted the "Task Name" column width to have more room for longer names. Change-Id: Iec64aa463ee8b10eef90120e00c38b1fb444087e
2018-04-12Merge "res_pjsip_notify.c: enable in-dialog NOTIFY"Jenkins2
2018-04-12Merge "pjsip_scheduler.c: Fix ao2 usage errors."Jenkins2
2018-04-11res_pjsip_session: Rewrite o= with external_media_address.Chris-Savinovich
It now appends the external IP address on the o= line of the SDP packet. The decision was made to write the numeric IP address as opposed to the RFC that states the FQDN should be used if and when available. We believe the usage of literal IP address will help avoid potential problems. ASTERISK-27614 #close Change-Id: I84f3360f3606b8c4e8d161edb228799ec0b8a302
2018-04-11res_pjsip_notify.c: enable in-dialog NOTIFYNathan Bruning
This patch adds support to send in-dialog SIP NOTIFY commands on chan_pjsip channels, similar to the functionality recently added for chan_sip (ASTERISK_27461). This extends res_pjsip_notify to allow for in-dialog messages. ASTERISK-27697 Change-Id: If7f3151a6d633e414d5dc319d5efc1443c43dd29
2018-04-11Merge "res_pjsip_refer/chan_sip: Fix INVITE with replaces transfer to ↵Jenkins2
ConfBridge"
2018-04-09pjsip_scheduler.c: Fix ao2 usage errors.Richard Mudgett
* Removed several invalid uses of OBJ_NOLOCK. These uses resulted in the 'tasks' container being accessed without a lock in a multi-threaded environment. A recipe for crashes. * Removed needlessly obtaining schtd object references. If the caller providing you a pointer to an object doesn't have a valid reference then you cannot safely get one from it. * Getting a ref to 'tasks' when you aren't copying the pointer into another location is useless. The 'tasks' container pointer is global. * Removed many unnecessary uses of RAII_VAR. * Make ast_sip_schedule_task() name parameter const. ASTERISK_26806 Change-Id: I5c62488e651314e2a1dbc01f5b078a15512d73db
2018-04-09Merge "pjsip / res_rtp_asterisk: Add support for sending REMB"Jenkins2
2018-04-09Merge "res_rtp_asterisk: Fix minimum block word length for REMB."Joshua Colp
2018-04-09Merge "res_rtp_asterisk: Queue video update on picture loss indication."Jenkins2
2018-04-06res_pjsip_refer/chan_sip: Fix INVITE with replaces transfer to ConfBridgeRichard Mudgett
There is a problem when an INVITE-with-Replaces transfer targets a channel in a ConfBridge. The transfer will unconditionally swap out the ConfBridge channel. Unfortunately, the ConfBridge state will not be aware of this change. Unexpected behavior will happen as a result since ConfBridge channels currently can only be replaced by a masquerade and not normal bridge channel moves. * We just need to pretend that the channel isn't in a bridge (like other transfer methods already do) so the transfer channel will masquerade into the ConfBridge channel. Change-Id: I209beb0e748fa4f4b92a576f36afa8f495ba4c82
2018-04-06pjsip / res_rtp_asterisk: Add support for sending REMBJoshua Colp
This change allows chan_pjsip to be given an AST_FRAME_RTCP containing REMB feedback and pass it to res_rtp_asterisk. Once res_rtp_asterisk receives the frame a REMB RTCP feedback packet is constructed with the appropriate contents and sent to the remote endpoint. ASTERISK-27776 Change-Id: Ic53f821c1560d8924907ad82c4d9c0bc322b38cd
2018-04-05res_rtp_asterisk: Fix minimum block word length for REMB.Joshua Colp
The minimum block word length is actually 4, not 5. Change-Id: I878542218225aed72c72bdf1b856fc822cd2d649
2018-04-05res_rtp_asterisk: Queue video update on picture loss indication.Joshua Colp
The previous payload specific feedback handling was very single minded in that it just assumed everything should trigger a video update. This was changed but the handling of picture loss indication was not added. The result was that video may not flow. This change adds it explicitly in. Change-Id: I1894be02e39ee10a0af841b5a1dca5f0ec7d60b6
2018-04-04res_pjsip: Update authenticate_qualify documentation.Richard Mudgett
Change-Id: I3811de0014b1ffe96d4a3b49cddd5d4ca02ee5d4
2018-04-02res_pjsip: Correct usages of pjproject's timer heapGeorge Joseph
Fix some timer heap initializations and cancels to try and prevent crashes and timer heap issues. Change-Id: I64885d190fa22097d1b55987091375541e57a7ee
2018-03-29res_pjsip: Fix deadlock on reliable transport shutdown.Richard Mudgett
A deadlock can happen when the PJSIP monitor thread is shutting down a connection oriented transport (TCP/TLS) used by a subscription at the same time as another thread tries to send something for that subscription. The deadlock is between the pjsip monitor thread attempting to get the dialog lock and another thread sending something for that dialog when it tries to get the transport manager lock. * res_pjsip_pubsub.c: Avoid the deadlock by pushing the subscription removal to the subscription serializer. * res_pjsip_registrar.c: Pushed off incoming registration contact removals to a default serializer as a precaution. Removing the contacts involves sorcery access which in this case will involve database access. Depending upon the setup, the database may not be on the same machine and could take awhile. We don't want to hold up the pjsip monitor thread with potentially long access times. ASTERISK-27706 Change-Id: I56b647aea565f24dba33e9e5ebeed4cd3f31f8c4
2018-03-29Merge "res_rtp_asterisk: Add support for raising additional RTCP messages."Kevin Harwell
2018-03-28pjsip_transport_events.c: Fix crash using stale transport pointer.Ross Beer
Apparently it is possible for the transport to be destroyed without triggering the transport callback logic. As a result the transport gets destroyed and we have a stale pointer in the active_transports container. * Invoke the transport monitor callback checks when the transport is destroyed in addition to when it is disconnected and shutdown. ASTERISK-27688 Change-Id: Ia9b5469fea8f2b3f2d8476fae6b748a4d23e7261
2018-03-27res_rtp_asterisk: Add support for raising additional RTCP messages.Joshua Colp
This change extends the existing AST_FRAME_RTCP frame type to be able to contain additional RTCP message types, such as feedback messages. The payload type is contained in the subclass which allows knowing what is in the frame itself. The RTCP feedback message type is now handled and REMB[1] messages are raised with their containing information. This also fixes a bug where all feedback messages were triggering video updates instead of just FIR and FUR. Finally RTCP frames are now passed up through the Asterisk core to what is handling the channel, mapped appropriately in the case of bridging, and written to an outgoing stream. Since RTCP frames are on a per-stream basis this is only done on multistream capable channels. [1] https://tools.ietf.org/html/draft-alvestrand-rmcat-remb-03 ASTERISK-27758 ASTERISK-26366 Change-Id: I680da0ad8d5059d5e9655d896fb9d92e9da8491e
2018-03-21Merge "rtp: Add REMB RTP property and set it on PJSIP video RTP."Jenkins2
2018-03-20Merge "BuildSystem: Remove unused dependency on libltdl."Joshua Colp
2018-03-19Merge "loader: Convert reload_classes to built-in modules."Jenkins2
2018-03-19rtp: Add REMB RTP property and set it on PJSIP video RTP.Joshua Colp
This change adds a property to RTP instances to indicate that REMB support is enabled and that sending/receiving should be passed through. This also enables it on video RTP instances in PJSIP if WebRTC support is enabled. Finally the goog-remb extension is added to the SDP using the rtcp-fb attribute to indicate our support for it. Details about REMB can be found on the draft document for it: https://tools.ietf.org/html/draft-alvestrand-rmcat-remb-03 Change-Id: I1902dda1c0882bd1a0d71b2f120684b44b97e789
2018-03-17BuildSystem: Remove unused dependency on libltdl.Alexander Traud
Asterisk does not need the development package of libltdl, because it does not use any symbol of -lltdl directly. Instead, it uses the runtime package via the shared library -lodbc. On the supported platforms, that shared library declares its dependency on -lltdl correctly, otherwise AST_EXT_LIB_CHECK would have failed. ASTERISK-27745 Change-Id: Icd315809b8e7978203431f3afb66240dd3a040ba
2018-03-14res_pjsip_rfc3326.c: Account for more than one 'Reason' headerRoss Beer
ASTERISK-27741 Change-Id: I0aa59a54735c6d20b95c54db1bd095dbf93e7adf
2018-03-14Merge "res_srtp: Add support for libsrtp2.x on openSUSE."Joshua Colp
2018-03-14loader: Convert reload_classes to built-in modules.Corey Farrell
* acl (named_acl.c) * cdr * cel * ccss * dnsmgr * dsp * enum * extconfig (config.c) * features * http * indications * logger * manager * plc * sounds * udptl These modules are now loaded at appropriate time by the module loader. Unlike loadable modules these use AST_MODULE_LOAD_FAILURE on error so the module loader will abort startup on failure of these modules. Some of these modules are still initialized or shutdown from outside the module loader. logger.c is initialized very early and shutdown very late, manager.c is initialized by the module loader but is shutdown by the Asterisk core (too much uses it without holding references). Change-Id: I371a9a45064f20026c492623ea8062d02a1ab97f
2018-03-13Merge "core: Remove ABI effects of MALLOC_DEBUG."Jenkins2
2018-03-12Merge "Replace direct checks of option_debug with DEBUG_ATLEAST macro."Jenkins2
2018-03-12Merge "Complete deprecating legacy modules."Jenkins2
2018-03-12Merge "res_pjsip_session: properly handle SDP from a forked call with early ↵Jenkins2
media"
2018-03-12Merge "BuildSystem: Depend not implicitly but explicitly on external libraries."Jenkins2
2018-03-12res_srtp: Add support for libsrtp2.x on openSUSE.Alexander Traud
Since ASTERISK-27253, no symbols from the header srtp2/crypto_types.h are used anymore. Therefore, its include statement can be removed. This allows to compile Asterisk on platforms which do not offer this private header, like openSUSE. ASTERISK-27733 Change-Id: I25c5cb8fa966043d1506ebef449e5a724412b4b6
2018-03-09Merge "res_http_post: Enable GMime in NetBSD."Jenkins2
2018-03-08Complete deprecating legacy modules.Richard Mudgett
The menuselect comment was updated to deprecate these modules but the AST_MODULE_INFO block at the end of file was missed. ASTERISK-27671 Change-Id: I63070b5c4d4f08af010c6034acd4793c1bcef839
2018-03-07Replace direct checks of option_debug with DEBUG_ATLEAST macro.Corey Farrell
Checking option_debug directly is incorrect as it ignores file/module specific debug settings. This system-wide change replaces nearly all direct checks for option_debug with the DEBUG_ATLEAST macro. Change-Id: Ic342d4799a945dbc40ac085ac142681094a4ebf0
2018-03-07res_pjsip_rfc3326: Order of 'Reason' headers break many endpointsRoss Beer
ASTERISK-27554 Change-Id: If61c7faab7d2fa1031c056ed6268fe928e2391cf