summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-06-29chan_pjsip: Fix ability to send UPDATE on COLPGeorge Joseph
When connected_line_method is "invite", we're supposed to determine if the client can support UPDATE and if it can, send UPDATE instead of INVITE to avoid the SDP renegotiation. Not only was pjproject not setting the PJSIP_INV_SUPPORT_UPDATE flag, we were testing that invite_tsx wasn't NULL which isn't always the case. * Updated chan_pjsip/update_connected_line_information to drop the requirement that invite_tsx isn't NULL. * Submitted patch to pjproject sip_inv.c that sets the PJSIP_INV_SUPPORT_UPDATE flag correctly. * Updated pjsip.conf.sample to clarify what happens when "invite" is specified. ASTERISK-27095 Change-Id: Ic2381b3567b8052c616d96fbe79564c530e81560
2017-06-29Merge "app_voicemail: IMAP connection control"Jenkins2
2017-06-28chan_pjsip: Add support for multiple streams of the same type.Mark Michelson
The stream topology (list of streams and order) is now stored with the configured PJSIP endpoints and used during the negotiation process. Media negotiation state information has been changed to be stored in a separate object. Two of these objects exist at any one time on a session. The active media state information is what was previously negotiated and the pending media state information is what the media state will become if negotiation succeeds. Streams and other state information is stored in this object using the index (or position) of each individual stream for easy lookup. The ability for a media type handler to specify a callback for writing has been added as well as the ability to add file descriptors with a callback which is invoked when data is available to be read on them. This allows media logic to live outside of the chan_pjsip module. Direct media has been changed so that only the first audio and video stream are directly connected. In the future once the RTP engine glue API has been updated to know about streams each individual stream can be directly connected as appropriate. Media negotiation itself will currently answer all the provided streams on an offer within configured limits and on an offer will use the topology created as a result of the disallow/allow codec lines. If a stream has been removed or declined we will now mark it as such within the resulting SDP. Applications can now also request that the stream topology change. If we are told to do so we will limit any provided formats to the ones configured on the endpoint and send a re-invite with the new topology. Two new configuration options have also been added to PJSIP endpoints: max_audio_streams: determines the maximum number of audio streams to offer/accept from an endpoint. Defaults to 1. max_video_streams: determines the maximum number of video streams to offer/accept from an endpoint. Defaults to 1. ASTERISK-27076 Change-Id: I8afd8dd2eb538806a39b887af0abd046266e14c7
2017-06-27res/res_pjsip_t38: fix incorrect increment of media_countTorrey Searle
The T38 sdp callback incorrectly has a side effect of incrementing the media_count. This can lead to core dumps. Change-Id: I7bb2f4987de4046ec52cfc34e5ea0662dae32af8
2017-06-22Merge "res_pjsip_mwi: update unsolicited MWI subscriptions on updating contact"Jenkins2
2017-06-22app_voicemail: IMAP connection controlAlexei Gradinari
A new global option "imap_poll_logout" was added to specify whether need to disconnect from the IMAP server after polling of mailboxes. ASTERISK-27068 #close Closing IMAP connection after loading mailbox from voicemail.conf ASTERISK-24052 #close Change-Id: Ib7558ba04516240a32b65f42e9be64372a0ae12a
2017-06-21res_pjsip_mwi.c: Eliminate RAII_VAR in contact delete observerRichard Mudgett
Change-Id: I0bc97c6608de1d1a4228826b3b3be43f162f05f3
2017-06-21res_pjsip_mwi: update unsolicited MWI subscriptions on updating contactAlexei Gradinari
Do not need to unsubscribe/subscribe on creating the ednpoint's contact. The modified function create_mwi_subscriptions_for_endpoint adds the subscription only if it does not exist. The subscriptions aren't added for active contacts which are retrieved on startup from realtime if mwi_disable_initial_unsolicited=yes. Because the mwi_contact_added is not called. So the subscriptions also should be created on updating contact. ASTERISK-26230 #close Change-Id: I47e265af9296ca09aa42a316fdacac104148cee4
2017-06-21Merge "bridge: stuck channel(s) after failed attended transfer"Jenkins2
2017-06-21Merge "core_local: local channel data not being properly unref'ed and unlocked"Jenkins2
2017-06-21core_local: local channel data not being properly unref'ed and unlockedKevin Harwell
In an earlier version of Asterisk a local channel [un]lock all functions were added in order to keep a crash from occurring when a channel hung up too early during an attended transfer. Unfortunately, when a transfer failure occurs and depending on the timing, the local channels sometime do not get properly unlocked and deref'ed after being locked and ref'ed. This happens because the underlying local channel structure gets NULLed out before unlocking. This patch reworks those [un]lock functions and makes sure the values that get locked and ref'ed later get unlocked and deref'ed. ASTERISK-27074 #close Change-Id: Ice96653e29bd9d6674ed5f95feb6b448ab148b09
2017-06-21bridge: stuck channel(s) after failed attended transferKevin Harwell
If an attended transfer failed it was possible for some of the channels involved to get "stuck" because Asterisk was not hanging up the transfer target. This patch ensures Asterisk hangs up the transfer target when an attended transfer failure occurs. ASTERISK-27075 #close Change-Id: I98a6ecd92d3461ab98c36f0d9451d23adaf3e5f9
2017-06-20Merge "res_corosync: Change thread stack size"Jenkins2
2017-06-20Merge "cdr: fix mistake spelling of a word for Unanswered."Jenkins2
2017-06-20Merge "res_pjsip_mwi: unsubscribe unsolicited MWI on deleting endpoint last ↵Joshua Colp
contact"
2017-06-19Merge "res_stasis: Plug reference leak on stolen channels"Joshua Colp
2017-06-19cdr: fix mistake spelling of a word for Unanswered.Rodrigo Ramírez Norambuena
Change-Id: I7a610bef369924523a445c7e849ee88cc45dc5df
2017-06-19Merge "SDP: Add get/set option calls for RTP sched context per type."George Joseph
2017-06-19Merge "res_pjsip: New endpoint option "notify_early_inuse_ringing""Jenkins2
2017-06-19Merge "app_voicemail: IMAP logout on reload/unload"Jenkins2
2017-06-16res_pjsip_mwi: unsubscribe unsolicited MWI on deleting endpoint last contactAlexei Gradinari
If the endpoint's last contact is deleted unsolicited MWI has to be unsubscribed. ASTERISK-27051 #close Change-Id: I33e174e0b9dba0998927d16d6d100fda5c7254e0
2017-06-16Merge "formats/format_g729: Fix typo in comment"Joshua Colp
2017-06-16res_stasis: Plug reference leak on stolen channelsGeorge Joseph
When a stasis channel is stolen by another app, the control structure is unreffed but never unlinked from the app_controls container. This causes the channel reference to leak. Added OBJ_UNLINK to the callback in channel_stolen_cb. Also added some additional channel lifecycle debug messages to channel.c. ASTERISK-27059 #close Repoorted-by: George Joseph Change-Id: Ib820936cd49453f20156971785e7f4f182c56e14
2017-06-16formats/format_g729: Fix typo in commentMatthew Fredrickson
There was a typo in a comment. This commit is to fix the typo. ASTERISK-27060 #close Change-Id: Ic2699f8dbeaacd58ccb6ec3203e853e1babe3235
2017-06-16Core/PBX: Deadlock between dialplan execution and application unregistration.Frederic LE FOLL
Not easy to reproduce, but we have noticed deadlocks when unloading a module while dialplan is handling a request. The deadlock is between : 1) Dialplan execution: pbx_extension_helper() first taking conlock, then pbx_findapp() [when called] asking for lock on apps list. 2) Application unregistration: ast_unregister_application() first taking lock on apps list, then unreference_cached_app() [when called] asking for conlock. As a protection, I suggest to modify ast_unregister_application(), so that it anticipates the need of conlock, before taking the lock on apps list. The side effect is a longer unavailability of conlock when unregistering an application. ASTERISK-27041 Change-Id: I0db0f1eb320da6a5758cce3a47d765be1face8e2
2017-06-16Merge "SDP: Search for the ice-lite attribute in the right place."Joshua Colp
2017-06-16Merge changes from topic 'sdp_api_adjustments'Jenkins2
* changes: SDP: Set the remote c= line in RTP instance. SDP: Add t= line in sdp_create_from_state() stream: Ignore declined streams for some topology calls.
2017-06-16Merge "stream: Add ast_stream_topology_del_stream() and unit test."Jenkins2
2017-06-16res_pjsip: New endpoint option "notify_early_inuse_ringing"Alexei Gradinari
This option was added to control whether to notify dialog-info state 'early' or 'confirmed' on Ringing when already INUSE. The value "yes" is useful for some SIP phones (Cisco SPA) to be able to indicate and pick up ringing devices. ASTERISK-26919 #close Change-Id: Ie050bc30023543c7dfb4365c5be3ce58c738c711
2017-06-16Merge "res_ari: Add "module loaded" check to ari stubs"Jenkins2
2017-06-16app_voicemail: IMAP logout on reload/unloadAlexei Gradinari
Closing IMAP connection on module reload or unload. ASTERISK-24052 #close Change-Id: I2a40182aa9ef249fa6865d33570430e9ada68525
2017-06-16res_corosync: Change thread stack sizeJan Friesse
In Corosync 2.x libraries were changed to use LibQB IPC. Sadly LibQB IPC doesn't support copy-free access to received buffer, so Corosync libraries were rewritten to use stack as buffer. Mostly the needed stack size is quite small, but for all *_dispatch functions, 1MiB is needed. Asterisk function ast_pthread_create_background set stack size for new thread to much smaller AST_BACKGROUND_STACKSIZE (~500KiB). This results in Asterisk crash when running with Corosync 2.x. Patch solves this issue by creating it's own version of ast_pthread_create_background which sets stack size to much higher value (actually it's AST_BACKGROUND_STACKSIZE + 3MiB). Another problem may appear when "corosync show members" netconsole command is executed. It is also executed in thread and also has only 500KiB stack size. Sadly it calls corosync_cfg_get_node_addrs which again needs at least 1MiB stack. Solution is to use HAVE_COROSYNC_CFG_STATE_TRACK as a discriminator between Corosync 1.x and 2.x. If 1.x is found, nothing changes. If 2.x is found, NodeID is displayed instead of IP address. ASTERISK-25370 #close Reported by: mdu113 Change-Id: Id95b0d21ab6e708e7d74ad8786c587211676fa08
2017-06-16Merge "chan_pjsip: Fix PJSIP_MEDIA_OFFER dialplan function read."Jenkins2
2017-06-15res_ari: Add "module loaded" check to ari stubsGeorge Joseph
The recent change to make the use of LOAD_DECLINE more consistent caused res_ari to unload itself before declining if the ari.conf file wasn't found. The ari stubs though still tried to use the configuration resulting in segfaults. This patch creates a new CHECK_ARI_MODULE_LOADED macro which tests to see if res_ari is actually loaded and causes the stubs to also decline if it isn't. The macro was then added to the mustache template's "load_module" function. ASTERISK-27026 #close Reported-by: Ronald Raikes Change-Id: I263d56efa628ee3c411bdcd16d49af6260c6c91d
2017-06-15Merge "channel: Fix reference counting in ast_channel_suppress."Joshua Colp
2017-06-15Merge "res_pjsip_pubsub: Fix reference to released endpoint"Jenkins2
2017-06-15Merge "bridge: Add a deferred queue."Joshua Colp
2017-06-15chan_pjsip: Fix PJSIP_MEDIA_OFFER dialplan function read.Richard Mudgett
The construction of the returned string assumed incorrectly that the supplied buffer would always be initialized as an empty string. If it is not an empty string we could overrun the supplied buffer by the length of the non-empty buffer string plus one. It is also theoreticaly possible for the supplied buffer to be overrun by a string terminator during a read operation even if the supplied buffer is an empty string. * Fix the assumption that the supplied buffer would already be an empty string. The buffer is not guaranteed to contain an empty string by all possible callers. * Fix string terminator buffer overrun potential. Change-Id: If6a0806806527678c8554b1dcb34fd7808aa95c9
2017-06-15SDP: Add get/set option calls for RTP sched context per type.Richard Mudgett
Change-Id: I82dc75c63c48904e9e5a49e2205dcc06e88487e4
2017-06-15SDP: Search for the ice-lite attribute in the right place.Richard Mudgett
* Pulled finding the rtcp-mux attribute flag out of the ICE candidate for loop. Also ordered the RTCP ICE candidate skip test to fail earlier. Change-Id: I8905d9c68563027a46cd3ae14dbcc27e9c814809
2017-06-15SDP: Set the remote c= line in RTP instance.Richard Mudgett
Change-Id: I23b646392082deab65bedeb19b12dcbcb9216d0c
2017-06-15stream: Add ast_stream_topology_del_stream() and unit test.Richard Mudgett
Change-Id: If07e3c716a2e3ff85ae905c17572ea6ec3cdc1f9
2017-06-15SDP: Add t= line in sdp_create_from_state()Richard Mudgett
Change-Id: I4060391328a893101ed87d0d9bacbbab4fd8b141
2017-06-15stream: Ignore declined streams for some topology calls.Richard Mudgett
* Made ast_format_cap_from_stream_topology() not include any formats from declined streams. * Made ast_stream_topology_get_first_stream_by_type() ignore declined streams to return the first active stream of the type. * Updated unit tests to check these changes have the expected effect. Change-Id: Iabbc6a3e8edf263a25fd3056c3c614407c7897df
2017-06-15Merge "app_voicemail.c: Fix compile error when IMAP enabled."George Joseph
2017-06-15Merge "app_voicemail: IMAP logout on MWI unsubscribe"George Joseph
2017-06-15Merge "res_pjsip_refer/session: Calls dropped during transfer"Jenkins2
2017-06-15channel: Fix reference counting in ast_channel_suppress.Joshua Colp
The ast_channel_suppress function wrongly decremented the reference count of the underlying structure used to keep track of what should be suppressed on a channel if the function was called multiple times on the same channel. This change cleans up the reference counting a bit so this no longer occurs. ASTERISK-27016 Change-Id: I2eed4077cb4916e6626f9f120b63b963acc5c136
2017-06-14Merge "res_rtp_asterisk: Fix ssrc change for rtcp srtp"George Joseph
2017-06-14Merge "res_pjsip_session: Correct inverted test in session_outgoing_nat_hook"Jenkins2