summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-08-22channel: Fix topology API locking.Richard Mudgett
* ast_channel_request_stream_topology_change() must not be called with any channel locks held. * ast_channel_stream_topology_changed() must be called with only the passed channel lock held. ASTERISK-27212 Change-Id: I843de7956d9f1cc7cc02025aea3463d8fe19c691
2017-08-22Merge "res_xmpp: fix inverted return code check in OAuth" into 15Joshua Colp
2017-08-22Merge "res_calendar_icalendar: Properly handle recurring events" into 15Jenkins2
2017-08-22res_xmpp: fix inverted return code check in OAuthMichael Kuron
fetch_access_token calls func_curl via ast_func_read. The latter returns 0 upon success and -1 if the function is not available. This commit inverts the return code check so that an error is printed if the module is not loaded and not if it is loaded. ASTERISK-27207 #close Change-Id: I9ef903f80702d1218e8701f65a4e5e918e6548fb
2017-08-18Merge "Fix downloader not working with curl" into 15Jenkins2
2017-08-17res_calendar_icalendar: Properly handle recurring eventsSean Bright
When looking for recurring events, use the correct end time based on the configured 'timeframe.' ASTERISK-27174 #close Reported by: Mark Thompson Change-Id: Id90c3cfc79d561a5521d79be176683e225f2edef
2017-08-17Merge "manager: hook event is not being raised" into 15Jenkins2
2017-08-16Fix downloader not working with curlGeorge Joseph
The codec/dpma downloader wasn't handling curl correctly. The logic that transforms makeopts into a bash-sourceable file wasn't handling the make 'or' command in DOWNLOAD_TIMEOUT so bash was looking for an 'or' command. That logic has been eliminated. Instead of trying to transform and source makeopts, the downloader now calls a make scriptlet to print the value of a specific variable. This way, make handles the ors (or any other make construct that happens to creep into that file). ASTERISK-27202 Reported by: Sean McCord Change-Id: Iadfb6693528e4d4da7b8bb201fa66da2c71c7f99
2017-08-16manager: hook event is not being raisedKevin Harwell
When the iostream code went in it introduced a conditional that made it so the hook event was not being raised even if a hook is present. This patch adds a check to see if a hook is present in astman_append. If so then call into the send_string function, which in turn raises the even for specified hook. Also updated the ami hooks unit test, so the test could be automated. ASTERISK-27200 #close Change-Id: Iff37f02f9708195d8f23e68f959d6eab720e1e36
2017-08-16Merge "configure: Check cache for valid pjproject tarball before ↵Jenkins2
downloading." into 15
2017-08-15configure: Check cache for valid pjproject tarball before downloading.Richard Mudgett
On a fresh Asterisk source directory, the bundled pjproject tarball is unconditionally downloaded even if the tarball is already in a specified cache directory. * Made check if the pjproject tarball is valid in the cache directory before downloading the tarball on a fresh source directory. Change-Id: Ic7ec842d3c97ecd8dafbad6f056b7fdbce41cae5
2017-08-15res_pjsip: Fix prune_on_boot to remove only contacts for the host.Richard Mudgett
* Check that the contact's reg_server matches the host's name before deleting any prune_on_boot contacts. We don't want to delete reliable transport contacts made with other servers if the ps_contacts database table is shared with other servers. Thanks to Ross Beer for pointing out that the original prune logic would delete reliable transport contacts from other servers. ASTERISK-27147 Change-Id: I8e439d0d1c266ffdfd7b73d1e5e466180a689bd0
2017-08-15res_xmpp: Google OAuth 2.0 protocol support for XMPP / MotifAndrey Egorov
Add ability to use tokens instead of passwords according to Google OAuth 2.0 protocol. ASTERISK-27169 Reported by: Andrey Egorov Tested by: Andrey Egorov Change-Id: I07f7052a502457ab55010a4d3686653b60f4c8db
2017-08-14Merge "res_pjsip_outbound_registration.c: Re-REGISTER on transport ↵George Joseph
shutdown." into 15
2017-08-14Merge changes from topic 'ASTERISK-27147' into 15George Joseph
* changes: res_pjsip: Remove ephemeral registered contacts on transport shutdown. res_pjsip: PJSIP Transport state monitor refactor.
2017-08-14Merge "res_pjsip_transport_management.c: Rename some variables." into 15Jenkins2
2017-08-14Merge "STUN/netsock2: Fix some valgrind uninitialized memory findings." into 15Jenkins2
2017-08-10STUN/netsock2: Fix some valgrind uninitialized memory findings.Richard Mudgett
* netsock2.c: Test the addr->len member first as it may be the only member initialized in the struct. * stun.c:ast_stun_handle_packet(): The combinded[] local array could get used uninitialized by ast_stun_request(). The uninitialized string gets copied to another location and could overflow the destination memory buffer. These valgrind findings were found for ASTERISK_27150 but are not necessarily a fix for the issue. Change-Id: I55f8687ba4ffc0f69578fd850af006a56cbc9a57
2017-08-10res_pjsip_outbound_registration.c: Re-REGISTER on transport shutdown.Richard Mudgett
The fix for the issue is broken up into three parts. This is part three which handles the client side of REGISTER requests. The registered contact may no longer be valid on the server when the transport used is reliable and the connection is broken. * Re-REGISTER our contact if the reliable transport is broken after registration completes. We attempt to re-REGISTER immediately to minimize the time we are unreachable. Time may have already passed between the connection being broken and the loss being detected. * Reorder sip_outbound_registration_state_alloc() so the STATSD_GUAGE's are still correct if an allocation failure happens. ASTERISK-27147 Change-Id: I3668405b1ee75dfefb07c0d637826176f741ce83
2017-08-10res_pjsip: Remove ephemeral registered contacts on transport shutdown.Richard Mudgett
The fix for the issue is broken up into three parts. This is part two which handles the server side of REGISTER requests when rewrite_contact is enabled. Any registered reliable transport contact becomes invalid when the transport connection becomes disconnected. * Monitor the rewrite_contact's reliable transport REGISTER contact for shutdown. If it is shutdown then the contact must be removed because it is no longer valid. Otherwise, when the client attempts to re-REGISTER it may be blocked because the invalid contact is there. Also if we try to send a call to the endpoint using the invalid contact then the endpoint is not likely to see the request. The endpoint either won't be listening on that port for new connections or a NAT/firewall will block it. * Prune any rewrite_contact's registered reliable transport contacts on boot. The reliable transport no longer exists so the contact is invalid. * Websockets always rewrite the REGISTER contact address and the transport needs to be monitored for shutdown. * Made the websocket transport set a unique name since that is what we use as the ao2 container key. Otherwise, we would not know which transport we find when one of them shuts down. The names are also used for PJPROJECT debug logging. * Made the websocket transport post the PJSIP_TP_STATE_CONNECTED state event. Now the global keep_alive_interval option, initially idle shutdown timer, and the server REGISTER contact monitor can work on wetsocket transports. * Made the websocket transport set the PJSIP_TP_DIR_INCOMING direction. Now initially idle websockets will automatically shutdown. ASTERISK-27147 Change-Id: I397a5e7d18476830f7ffe1726adf9ee6c15964f4
2017-08-10res_pjsip_transport_management.c: Rename some variables.Richard Mudgett
* Use monitored instead of the misleading keepalive name. Change-Id: I9e5bcbb4ab2b82d49bcd0f06dfe85d15e0b552b6
2017-08-10res_pjsip: PJSIP Transport state monitor refactor.Richard Mudgett
The fix for the issue is broken up into three parts. This is part one which refactors the transport state monitor code to allow more modules to be able to monitor transports. * Pull the management of PJPROJECT's transport state callback code from res_pjsip_transport_management.c into res_pjsip. Now other modules can dynamically add and remove themselves from transport monitoring without worrying about breaking PJPROJECT's callback chain. * Add the ability for other modules to get a callback whenever a specific transport is shutdown. ASTERISK-27147 Change-Id: I7d9a31371eb1487c9b7050cf82a9af5180a57912
2017-08-10UPGRADE notes: Fixup for the 15 branchRichard Mudgett
Change-Id: I4ca2f07ed62d77f1fdd10c3b216f6a28dd75720c
2017-08-10res_pjsip_messaging: IPv6 receive address needs bracketsScott Griepentrog
When handling an incoming SIP MESSAGE, PJSIP attaches the IP address that the message was received from to the message in the variable PJSIP_RECVADDR. When the IP address is IPv6 the :PORT appended results in an unparseable mess. By using an additional bit flag on the pj_sockaddr_print call, the conventional use of brackets around the address is achieved. ASTERISK-27193 #close Change-Id: I12342521f2ce87a5b6e4883d480a3fd957aa9fd9
2017-08-10Merge "Make --with-pjproject-bundled the default for Asterisk 15" into 15Jenkins2
2017-08-09Merge "res_rtp_asterisk: Make P2P bridge Asymmetric codec aware" into 15Joshua Colp
2017-08-09res_rtp_asterisk: enable rtcp & QOS stats on native bridgeTorrey Searle
Asterisk wasn't generating or forwarding RTCP packets when native bridge was activated. Also the stats weren't available via CHANNEL(qos). Now the RTCP stats are always calculated. ASTERISK-27158 #close Change-Id: I46fb8f61c95e836b9d2dda6054b0cf205c16037b
2017-08-09res_rtp_asterisk: Make P2P bridge Asymmetric codec awareTorrey Searle
Introduce a new property to rtp-engine to make it aware of the desire for assymetric codecs or not. If asymmetric codecs is not allowed, the bridge will compare read/write formats and shut down the p2p bridge if needed ASTERISK-26745 #close Change-Id: I0d9c83e5356df81661e58d40a8db565833501a6f
2017-08-09Merge "res_pjsip_session/_sdp_rtp: Handling of 'msid' is incorrect" into 15Joshua Colp
2017-08-08Make --with-pjproject-bundled the default for Asterisk 15George Joseph
'--with-pjproject-bundled' is now the default when running ./configure. It can be disabled with '--without-pjproject-bundled'. To make building without an internet connection easier, a new ./configure option '--with-download-cache' was added that sets the cache for externals (like pjproject, the codecs and the DPMA), AND the sounds files. It can also be specified as an environment variable named "AST_DOWNLOAD_CACHE". The existing '--with-sounds-cache' option / SOUNDS_CACHE_DIR env variable and '--with-externals-cache' option / EXTERNALS_CACHE_DIR env variable remain and if specified, will override '--with-downloads-cache'. ASTERISK-27189 Change-Id: Ifa9783fddf44aafadb060c9feba713dfa81d38ce
2017-08-08Merge "res_pjsip_session: Release media resources on session end quicker." ↵Jenkins2
into 15
2017-08-08res_pjsip_session: Release media resources on session end quicker.Joshua Colp
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 are told to terminate the session we immediately release any media sessions associated with it. ASTERISK-27110 Change-Id: I643e431d5c3bf05cda220c1d39e824a505a29b82
2017-08-07Merge "bridge: Fix stream topology/participant locking and video ↵Jenkins2
misrouting." into 15
2017-08-07Merge "channel: Fix leak on successful call to chan->tech->requester." into 15Jenkins2
2017-08-07Merge "res_pjsip_nat.c: Remove unnecessary CMP_STOP." into 15Joshua Colp
2017-08-07Merge "Support GMIME 3.0" into 15Jenkins2
2017-08-06bridge: Fix stream topology/participant locking and video misrouting.Joshua Colp
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-05channel: Fix leak on successful call to chan->tech->requester.Corey Farrell
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-04res_pjsip_session/_sdp_rtp: Handling of 'msid' is incorrectKevin Harwell
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-04app_privacy: remove unused header asterisk/image.hCorey Farrell
Change-Id: I56ed530633a642633b18383821069e806c92ae82
2017-08-04Merge "alembic/res_pjsip: Add "webrtc" configuration option" into 15Jenkins2
2017-08-04Merge "Fix compile error for old versions of GCC." into 15Joshua Colp
2017-08-04Merge "Correct some leaks in unit tests." into 15Jenkins2
2017-08-04Merge "res_pjsip_transport_websocket.c: Fix serializer ref leak." into 15Jenkins2
2017-08-04Merge "res_pjsip_outbound_registration.c: Misc fixes." into 15Jenkins2
2017-08-04Support GMIME 3.0Tzafrir Cohen
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-03Correct some leaks in unit tests.Corey Farrell
* 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-03res_pjsip_transport_websocket.c: Fix serializer ref leak.Richard Mudgett
Change-Id: Ib5a19bfd597f63d9021baeb645fc11153b3afa57
2017-08-03res_pjsip_outbound_registration.c: Misc fixes.Richard Mudgett
* 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-03res_pjsip_nat.c: Remove unnecessary CMP_STOP.Richard Mudgett
Change-Id: I6279b0d723bc3b75b8d65e81e02da9ea9bc0c3da