- Mar 04, 2019
-
-
Sean Bright authored
While the 'interface' column is a NOT NULL, the empty string is still allowed. res_config_odbc treats the empty string as a NULL and we crash when trying to dereference. Also cleaned up an adjacent error message for consistency. ASTERISK-28168 #close Change-Id: I55e012b540fbcda99bb40bede3099b7ae5db8202
-
- Feb 19, 2019
-
-
Rodrigo Ramírez Norambuena authored
This change add ability to set the wrapuptime per-member using the AddQueueMember application. The feature to set wrapuptime per member was include in the issue ASTERISK-27483 for static member by configuration file and was not added to set from AddQueueMember. ASTERISK-28055 #close Change-Id: I7c7ee4a6f804922cd7c42cb02eea26eb3806c6cf
-
- Feb 07, 2019
-
-
Joshua Colp authored
When Asterisk is connected and used with a database the response time of the database can cause problems in Asterisk if it is long. Normally the only way to see this problem would be to retrieve a backtrace from Asterisk and examine where things are blocked, or examine the database to see if there is any indication of a problem. This change adds some basic query logging to make it easier to investigate such a problem. When logging is enabled res_odbc will now keep track of the number of queries executed, as well as the query that has taken the longest time to execute. There is also an option which will cause a WARNING message to be output if a query takes longer than a configurable amount of time to execute. This makes it easier and clearer for users that their database may be experiencing a problem that could impact Asterisk. ASTERISK-28277 Change-Id: I173cf4928b10754478a6a8c27dfa96ede0f058a6
-
- Jan 22, 2019
-
-
George Joseph authored
You can now define an "aliases" context in voicemail.conf whose entries point to actual mailboxes. These can be used anywhere the mailbox is specified. Example: [general] aliasescontext = myaliases [default] 1234 = yadayada [myaliases] 4321@devices = 1234@default Now you can use 4321@devices to refer to the 1234@default mailbox. This can be useful to provide channel drivers with constant mailbox specifications such as <extension>@devices leaving app_voicemail to control exactly which mailbox the alias points to. Now, only voicemail has to be reloaded to make changes instead of individual channel drivers which are usually more expensive to reload. Change-Id: I395b9205c91523a334fe971be0d1de4522067b04
-
- Jan 02, 2019
-
-
Bryan Boatright authored
If a voicemail is marked "urgent" then the VM_MESSAGEFILE channel variable is not updated correctly since urgent messages are in a different directory. The fix is to update the channel variable when the path to the urgent message is created. ASTERISK-28225 Change-Id: I8efbace06e6122ea0793f7bdb073d4378e8274ca
-
Joshua Colp authored
When using the 'b' option to Queue with a queue that was not configured for ring all a crash would occur as the wrong pointer would be used. ASTERISK-28218 Change-Id: If1390f64e321047dff24fd2410c95dde74904980
-
- Dec 18, 2018
-
-
George Joseph authored
The free_user function was automatically deleting the stasis mailbox state but this only makes sense when the mailbox is actually deleted, not just the structure freed. This was causing issues where leave_voicemail would publish the mwi message to stasis and delete the state before the message could be processed by res_pjsip_mwi. * Removed the delete of state from free_user(). * Created a new free_user_final() function that both frees the data structure and deletes the state. This function is only called during module load/unload where it's appropriate to delete the state. ASTERISK-28215 Change-Id: I305e8b3c930e9ac41d901e5dc8a58fd7904d98dd
-
- Dec 12, 2018
-
-
Alexei Gradinari authored
Currently the file sound_only_person is not played when a marked user (with announce_only_user=yes) joins an empty conference. This patch fixes it. ASTERISK-28201 #close Change-Id: I85b67687e6b220939c3af8091d83a70a7b174cf4
-
- Dec 03, 2018
-
- Nov 29, 2018
-
-
George Joseph authored
This reverts commit 29115e23. That commit closed a long standing hole which allowed subscriptions to mailboxes that weren't configured in voicemail.conf. This caused an issue with FreePBX which depdended on that behavior. The commit is being reverted until FreePBX can handle the new behavior. ASTERISK-28151 Reported by: Ronald Raikes Change-Id: I57b7b85e75d7dd97c742b5c69d718a0f61260c15
-
- Nov 26, 2018
-
-
George Joseph authored
* The bridging core no longer uses the stasis cache for bridge snapshots. The latest bridge snapshot is now stored on the ast_bridge structure itself. * The following APIs are no longer available since the stasis cache is no longer used: ast_bridge_topic_cached() ast_bridge_topic_all_cached() * A topic pool is now used for individual bridge topics. * The ast_bridge_cache() function was removed since there's no longer a separate container of snapshots. * A new function "ast_bridges()" was created to retrieve the container of all bridges. Users formerly calling ast_bridge_cache() can use the new function to iterate over bridges and retrieve the latest snapshot directly from the bridge. * The ast_bridge_snapshot_get_latest() function was renamed to ast_bridge_get_snapshot_by_uniqueid(). * A new function "ast_bridge_get_snapshot()" was created to retrieve the bridge snapshot directly from the bridge structure. * The ast_bridge_topic_all() function now returns a normal topic not a cached one so you can't use stasis cache functions on it either. * The ast_bridge_snapshot_type() stasis message now has the ast_bridge_snapshot_update structure as it's data. It contains the last snapshot and the new one. * cdr, cel, manager and ari have been updated to use the new arrangement. Change-Id: I7049b80efa88676ce5c4666f818fa18ad1985369
-
Joshua Colp authored
When a channel snapshot was created it used to be done from scratch, copying all data (many strings). This incurs a cost when doing so. This change segments the channel snapshot into different components which can be reused if unchanged from the previous snapshot creation, reducing the cost. In normal cases this results in some pointers being copied with reference count being bumped, some integers being set, and a string or two copied. The other benefit is that it is now possible to determine if a channel snapshot update is redundant and thus stop it before a message is published to stasis. The specific segments in the channel snapshot were split up based on whether they are changed together, how often they are changed, and their general grouping. In practice only 1 (or 0) of the segments actually get changed in normal operation. Invalidation is done by setting a flag on the channel when the segment source is changed, forcing creation of a new segment when the channel snapshot is created. ASTERISK-28119 Change-Id: I5d7ef3df963a88ac47bc187d73c5225c315f8423
-
Joshua Colp authored
Channels no longer use the Stasis cache for channel snapshots. Instead they are stored in a hash table in stasis_channels which reduces the number of Stasis messages created and allows better storage. As a result the following APIs are no longer available since the stasis cache is no longer used: ast_channel_topic_cached() ast_channel_topic_all_cached() The ast_channel_cache_all() and ast_channel_cache_by_name() functions now return an ao2_container of ast_channel_snapshots rather than a container of stasis_messages therefore you can't (and don't need to) call stasis_cache functions on it. The ast_channel_topic_all() function now returns a normal topic not a cached one so you can't use stasis cache functions on it either. The ast_channel_snapshot_type() stasis message now has the ast_channel_snapshot_update structure as it's data. It contains the last snapshot and the new one. ast_channel_snapshot_get_latest() still returns the latest snapshot. The latest snapshot is now stored on the channel itself to eliminate cache hits when Stasis messages that have the snapshot as a payload are created. ASTERISK-28102 Change-Id: I9334febff60a82d7c39703e49059fa3a68825786
-
- Nov 21, 2018
-
-
Corey Farrell authored
Replace usage of ao2_container_alloc with ao2_container_alloc_hash or ao2_container_alloc_list. Remove ao2_container_alloc macro. Change-Id: I0907d78bc66efc775672df37c8faad00f2f6c088
-
- Nov 19, 2018
-
-
Corey Farrell authored
This replaces the inline functions with macros. This removes the need to directly use __ao2_ref, opts instead for standard ao2_bump and ao2_cleanup macros. Change-Id: If4e04e9bab2e3c883188437cb9f487b3e498a21b
-
- Nov 18, 2018
-
-
Joshua Colp authored
This change adds the ability for subscriptions to indicate which message types they are interested in accepting. By doing so the filtering is done before being dispatched to the subscriber, reducing the amount of work that has to be done. This is optional and if a subscriber does not add message types they wish to accept and set the subscription to selective filtering the previous behavior is preserved and they receive all messages. There is also the ability to explicitly force the reception of all messages for cases such as AMI or ARI where a large number of messages are expected that are then generically converted into a different format. ASTERISK-28103 Change-Id: I99bee23895baa0a117985d51683f7963b77aa190
-
- Oct 24, 2018
-
-
Alexei Gradinari authored
The 'I' option currently blocks initial CONNECTEDLINE or REDIRECTING updates from the called parties to the caller. This patch also blocks updates in the other direction before call is answered. ASTERISK-27980 Change-Id: I6ce9e151a2220ce9e95aa66666933cfb9e2a4a01
-
George Joseph authored
Adding the "label" attribute used for participant info correlation was previously done in app_confbridge but it wasn't working correctly because it didn't have knowledge about which video streams belonged to which channel. Only bridge_softmix has that data so now it's set when the bridge topology is changed. ASTERISK-28107 Change-Id: Ieddeca5799d710cad083af3fcc3e677fa2a2a499
-
- Oct 18, 2018
-
-
Richard Mudgett authored
* Update the post-answer documentation and example. The Dial example was incorrect and misleading for the post-answer subroutine useage. * Fix note and warning paragraphs in option descriptions. They don't show up in the wiki. Change-Id: I81019a1fd75d5b9151f76b52c38e2a90da682d14
-
- Oct 17, 2018
-
-
Corey Farrell authored
Add attribute_warn_unused_result to ast_taskprocessor_push, ast_taskprocessor_push_local and ast_threadpool_push. This will help ensure we perform the necessary cleanup upon failure. Change-Id: I7e4079bd7b21cfe52fb431ea79e41314520c3f6d
-
- Oct 01, 2018
-
-
Corey Farrell authored
Change-Id: I1946509f518961d23fb21229d91676ee3e441921
-
Richard Mudgett authored
Declining the queue_member_status_type stasis message in stasis.conf causes these messages to leak json objects. * Add missing ast_json_unref() if the type is NULL in queue_publish_member_blob(). ASTERISK-28084 Change-Id: I691ecf49bd1f7d9c29182e1eee8c4bb7103be9fc
-
- Sep 28, 2018
-
-
George Joseph authored
The first attempt at publishing confbridge events to participants involved publishing them at the same time stasis events were created. This caused issues with bridge and channel locks. The second attempt involved publishing them when the stasis events were received by the code that published the confbridge AMI events. This caused timing issues because, depending on resources available, the event could be received before channels actually joined the bridge and would therefore fail to send messages to the participant. This attempt reverts to the original mechanism with one exception. The join and leave events are published via bridge join and leave hooks. This guarantees the states of the channels and bridge and provides deterministic timing for event publishing. Change-Id: I2660074f8a30a5224cb953d5e047ee84484a9036
-
- Sep 27, 2018
-
-
Cao Minh Hiep authored
This issue related to setting of holdtime, announcements, member delays. It works well if we set the member delays to "0" and no announcements and no holdtime.This issue will happen if we set member delays to "1", "2"... or announcements or holdtime and hangs up the call during processing it. And here is the reason: (At the step of answering a phone.) It takes care any holdtime, announcements, member delays, or other options after a call has been answered if it exists. Normally, After the call has been aswered, and we wait for the processing one of the cases of the member delays or hold time or announcements finished, "if (ast_check_hangup(peer))" will be not executed, then queue will be updated at update_queue(). Here, pending member will be removed. However, after the call has been aswered, if we hangs up the call during one of the cases of the member delays or hold time or announcements, "if (ast_check_hangup(peer))" will be executed. outgoing = NULL and at hangupcalls, pending members will not be removed. * This fixed patch will remove the pending member from container before hanging up the call with outgoing is NULL. ASTERISK-27920 Reported by: Cao Minh Hiep Tested by: Cao Minh Hiep Change-Id: Ib780fbf48ace9d2d8eaa1270b9d530a4fc14c855
-
- Sep 24, 2018
-
-
George Joseph authored
app_voicemail wasn't properly cleaning up the stasis cache or the mwi topic pool when the module was unloaded or when a user was deleted as a result of a reload. This resulted in leaks in both areas. * app_voicemail now calls ast_delete_mwi_state_full when it frees a user structure and ast_delete_mwi_state_full in turn now calls the new stasis_topic_pool_delete_topic function to clear the topic from the pool. Change-Id: Ide23144a4a810e7e0faad5a8e988d15947965df8
-
- Sep 21, 2018
-
-
George Joseph authored
The append_mailbox function wasn't calculating the correct length to pass to ast_alloca and it wasn't handling the case where context might be empty. Found by the Address Sanitizer. Change-Id: I7eb51c7bd18a7a8dbdba261462a95cc69e84f161
-
- Sep 18, 2018
-
-
George Joseph authored
app_voicemail was using the stasis cache to build and maintain a list of mailboxes that had subscribers. It then used this list to determine if a mailbox should be polled for new messages if polling was enabled. For this to work, stasis had to cache every subscription and unsubscription to the mailbox which caused a lot of overhead, both cpu and memory related. Since polling is only required when changes are being made to mailboxes outside of app_voicemail and since the number of mailboxes that don't have any subscribers is likely to be very low, all mailboxes are now polled instead of just the ones with subscribers. This paves the way for disabling the caching of stasis subscription change messages. Also fixed cleanup in some of the unit tests that not only left test users in the users list but also caused segfaults if the tests were run more than once. ASTERISK-27121 Change-Id: I5cceb737246949f9782955c64425b8bd25a9e9ee
-
- Sep 06, 2018
-
-
lvl authored
This ensures the most up-to-date information is used for the next call attempt. ASTERISK-28032 Change-Id: I02fc17c6ffb50bb60ea97c2d2e6023e8061815ce
-
- Sep 03, 2018
-
-
Rodrigo Ramírez Norambuena authored
Change-Id: I08f88adb09f7e5813f37e70fecd787468cdb32c8
-
- Aug 22, 2018
-
-
Sean Bright authored
I'm only seeing an error in 14+, so I assume it is due to different compiler options: app_queue.c: In function ‘handle_queue_add_member’: app_queue.c:10234:19: error: ‘%d’ directive writing between 1 and 11 bytes into a region of size 3 [-Werror=format-overflow=] sprintf(num, "%d", state); ^~ app_queue.c:10234:18: note: directive argument in the range [-2147483648, 99] sprintf(num, "%d", state); ^~~~ Compiler: gcc version 8.0.1 20180414 (experimental) [trunk revision 259383] (Ubuntu 8-20180414-1ubuntu2) Change-Id: I18577590da46829c1ea7d8b82e41d69f105baa10
-
- Aug 13, 2018
-
-
Ivan Poddubny authored
When a call leaves a queue on leaveempty condition, QUEUESTATUS must be set to LEAVEEMPTY, no matter whether Queue was executed with or without the "c" (continue) option. The regression was introduced in the fix for ASTERISK_25665. The following fix (ASTERISK_27065) was incomplete, as QUEUESTATUS was overwritten in case when "c" is set, regardless of what was the cause for leaving the queue. ASTERISK-27973 #close Reported-by: Valentin Safonov Change-Id: Iec013fe6a26a4e825ca572a1dda4f3cee5f6f80c
-
- Jul 18, 2018
-
-
Joshua Colp authored
I have removed the STATIC_BUILD option immediately as it has not been maintained in many years and is non-functional. ASTERISK-27965 Change-Id: I64783d017b86dba9ee3c7bcfb97e59889a3f76d7
-
- Jul 13, 2018
-
-
George Joseph authored
Previously, the msid "label" attribute was used to correlate participant info but because streams could be reused, the msid wasn't being updated correctly when someone left the bridge and another joined. Now, instead of looking for the msid attribute on a channel's streams, app_confbridge sets an "SDP:LABEL" attribute on the stream which res_pjsip_sdp_rtp looks for. If it finds it, it adds a "label" attribute to the current sdp. Change-Id: I6cbaa87fb59a2e0688d956e72d2d09e4ac20d5a5
-
- Jun 29, 2018
-
-
Robert Mordec authored
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
-
- Jun 26, 2018
-
-
George Joseph authored
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
-
- Jun 21, 2018
-
-
Kristian F. Høgh authored
Add predial handler support to app_queue. app_dial (ASTERISK_19548) and app_originate (ASTERISK_26587) have the ability to execute predial handlers on caller and callee channels. This patch adds predial handlers to app_queue and uses the same options as Dial and Originate (b and B). The caller routine gets executed when the caller first enters the queue. The callee routine gets executed for each queue member when they are about to be called. ASTERISK-27912 Change-Id: I5acf5c32587ee008658d12e8a8049eb8fa4d0f24
-
- Jun 19, 2018
-
-
Richard Mudgett authored
There can be one and only one thread handling a channel's media at a time. Otherwise, we don't know which thread is going to handle the media frames. ASTERISK-27625 Change-Id: Ia341f1a6f4d54f2022261abec9021fe5b2eb4905
-
- Jun 15, 2018
-
-
Sam Wierema authored
This patch changes the way asterisk polls output from mpg123, instead of waiting for 10 seconds(when playing an http url) it now uses a timeout of one second and iterates 10 times using this same timeout. The main difference is that for every timeout asterisk receives it now checks if mpg123 is still running before poll again. ASTERISK-27752 Change-Id: Ib7df8462e3e380cb328011890ad9270d9e9b4620
-
- Jun 13, 2018
-
-
George Joseph authored
ConfBridge can now send events to participants via in-dialog MESSAGEs. All current Confbridge events are supported, such as ConfbridgeJoin, ConfbridgeLeave, etc. In addition to those events, a new event ConfbridgeWelcome has been added that will send a list of all current participants to a new participant. For all but the ConfbridgeWelcome event, the JSON message contains information about the bridge, such as its id and name, and information about the channel that triggered the event such as channel name, callerid info, mute status, and the MSID labels for their audio and video tracks. You can use the labels to correlate callerid and mute status to specific video elements in a webrtc client. To control this behavior, the following options have been added to confbridge.conf: bridge_profile/enable_events: This must be enabled on any bridge where events are desired. user_profile/send_events: This must be set for a user profile to send events. Different user profiles connected to the same bridge can have different settings. This allows admins to get events but not normal users for instance. user_profile/echo_events: In some cases, you might not want the user triggering the event to get the event sent back to them. To prevent it, set this to false. A change was also made to res_pjsip_sdp_rtp to save the generated msid to the stream so it can be re-used. This allows participant A's video stream to appear as the same label to all other participants. Change-Id: I26420aa9f101f0b2387dc9e2fd10733197f1318e
-
- Jun 04, 2018
-
-
George Joseph authored
There was no real reason to limit the conteny type to text/plain other than that's what it was limited to before. Now any text/* content type will be allowed for channel drivers that don't support enhanced messaging and any type will be allowed for channel drivers that do support enhanced messaging. Change-Id: I94a90cfee98b4bc8e22aa5c0b6afb7b862f979d9
-