summaryrefslogtreecommitdiff
path: root/apps
AgeCommit message (Collapse)Author
2013-05-15Fix VM snapshot handling for combined INBOX.Jason Parker
The snapshot API contains an option that allow for combining of new and old messages within a single snapshot. New messages, however, include options beyond just 'INBOX' - it also includes the Urgent folder. A previous patch that combined INBOX and Urgent accidentally impacted snapshots that attempted to gain messages from just the Old folder. This patch fixes the snapshot gathering such that the API returns the appropriate messages for the folder selected, with and without the combine option. This should make it more clear about what's happening. Review: https://reviewboard.asterisk.org/r/2539/ ........ Merged revisions 388816 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@388818 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-14Break res_stasis into smaller files.David M. Lee
When implementing playback for stasis-http, the monolithicedness of res_stasis really started to get in my way. This patch breaks the major components of res_stasis.c into individual files. * res/stasis/app.c - Stasis application tracking * res/stasis/control.c - Channel control objects * res/stasis/command.c - Channel command object This refactoring also allows res_stasis applications to be loaded as independent modules, such as the new res_stasis_answer module. The bulk of this patch is simply moving code from one file to another, adjusting names and adding accessors as necessary. Review: https://reviewboard.asterisk.org/r/2530/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@388729 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-10Address unload order issues for res_stasis* modulesDavid M. Lee
I've noticed when doing a graceful shutdown that the res_stasis_http.so module gets unloaded before the modules that use it, which causes some asserts during their unload. While r386928 was a quick hack to get it to not assert and die, this patch increases the use counts on res_stasis.so and res_stasis_http.so properly. It's a bigger change than I expected, hence the review instead of just committing it. Review: https://reviewboard.asterisk.org/r/2489/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@388350 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-10Add channel events for res_stasis appsKinsey Moore
This change adds a framework in res_stasis for handling events from channel topics. JSON event generation and validation code is created from event documentation in rest-api/api-docs/events.json to assist in JSON event generation, ensure consistency, and ensure that accurate documentation is available for ALL events that are received by res_stasis applications. The userevent application has been refactored along with the code that handles userevent channel blob events to pass the headers as key/value pairs in the JSON blob. As a side-effect, app_userevent now handles duplicate keys by overwriting the previous value. Review: https://reviewboard.asterisk.org/r/2428/ (closes issue ASTERISK-21180) Patch-By: Kinsey Moore <kmoore@digium.com> git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@388275 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-09Don't expect to pack three tuples when you only have twoMatthew Jordan
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@388175 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-09Fix Segfault In app_queue When "persistentmembers" Is Enabled And Using RealtimeMichael L. Young
When the "ignorebusy" setting was deprecated, we added some code to allow us to be compatible with older setups that are still using the "ignorebusy" setting instead of "ringinuse". We set a char *variable with the column name to use, which helps the realtime functions to use the correct column in their SQL queries. When "persistentmembers" is enabled, we are not setting this variable before the realtime functions were called to load members. This results in the variable being NULL and therefore causing a segfault when loading members during the module's process of loading. The solution was to move the code that sets that variable to be before these realtime functions are called during the loading of the module. (closes issue ASTERISK-21738) Reported by: JoshE Tested by: JoshE Patches: asterisk-21738-rt-ringinuse-field-not-set.diff uploaded by Michael L. Young (license 5026) Review: https://reviewboard.asterisk.org/r/2499/ ........ Merged revisions 388108 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@388110 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-08Don't perform a realtime lookup with a NULL keywordMatthew Jordan
Previously, a call to ast_load_realtime_multientry could get away with passing a NULL parameter to the function, even though it really isn't supposed to do that. After the change over to using ast_variable instead of variadic arguments, the realtime engine gets unhappy if you do this. This was always an unintended function call in app_directory anyway - now, we just don't call into the realtime function calls if we don't have anything to query on. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@388008 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-08Remove required type field from channel blobsDavid M. Lee
When we first introduced the channel blob types, the JSON blobs were self identifying by a required "type" field in the JSON object itself. This, as it turns out, was a bad idea. When we introduced the message router, it was useless for routing based on the JSON type. And messages had two type fields to check: the stasis_message_type() of the message itself, plus the type field in the JSON blob (but only if it was a blob message). This patch corrects that mistake by removing the required type field from JSON blobs, and introducing first class stasis_message_type objects for the actual message type. Since we now will have a proliferation of message types, I introduced a few macros to help reduce the amount of boilerplate necessary to set them up. Review: https://reviewboard.asterisk.org/r/2509 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@388005 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-06Make SLA reload more paranoid.Russell Bryant
Reload support was originally not included for SLA. It was added later, but in a fairly non-traditional way. It basically sets a flag indicating that a reload is pending, and then waits for a time where it thinks everything SLA related is idle and unused, and *then* executes the reload. It does this because the reload process is destructive. It starts by throwing everything away and starting over. There are a number of problems with this approach. One of them is that the check to see if anything in use was incomplete. This patch makes it more complete and thus less likely for a crash to occur during reload processing. However, this approach still has problems so some much more significant reworking of this code will need to come in as a next step. Patch credit and testing by CoreDial, LLC. ........ Merged revisions 387688 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 387689 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387690 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-02Migrate AMI VarSet events raised by GoSub local variablesMatthew Jordan
This patch moves VarSet events for local variables raised by GoSub over to Stasis-Core. It also tweaks up the post-processing documentation scripts to not combine parameters if both parameters are already documented. (issue ASTERISK-21462) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387519 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-29Play periodic prompts for first call in a call queueOlle Johansson
Review: https://reviewboard.asterisk.org/r/2263/ ........ Merged revisions 386792 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 386794 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@386841 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-23confbridge: Make search the conference bridges container using OBJ_KEY.Richard Mudgett
* Make confbridge config parsing user profile, bridge profile, and menu container hash/cmp functions correctly check the OBJ_POINTER, OBJ_KEY, and OBJ_PARTIAL_KEY flags. * Made confbridge load_module()/unload_module() free all resources on failure conditions. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@386375 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-22sla: remove redundant locking.Russell Bryant
sla.lock was already locked in the only place that sla_check_reload() was called. Remove the redundant locking of sla.lock done in this function. Less recursive locking is A Good Thing. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@386190 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-16Move device state distribution to Stasis-coreKinsey Moore
In the move from Asterisk's event system to Stasis, this makes distributed device state aggregation always-on, removes unnecessary task processors where possible, and collapses aggregate and non-aggregate states into a single cache for ease of retrieval. This also removes an intermediary step in device state aggregation. Review: https://reviewboard.asterisk.org/r/2389/ (closes issue ASTERISK-21101) Patch-by: Kinsey Moore <kmoore@digium.com> git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@385860 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-15Moved core logic from app_stasis to res_stasisDavid M. Lee
After some discussion on asterisk-dev, it was decided that the bulk of the logic in app_stasis actually belongs in a resource module instead of the application module. This patch does that, leaves the app specific stuff in app_stasis, and fixes up everything else to be consistent with that change. * Renamed test_app_stasis to test_res_stasis * Renamed app_stasis.h to stasis_app.h * This is still stasis application support, even though it's no longer in an app_ module. The name should never have been tied to the type of module, anyways. * Now that json isn't a resource module anymore, moved the ast_channel_snapshot_to_json function to main/stasis_channels.c, where it makes more sense. Review: https://reviewboard.asterisk.org/r/2430/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@385742 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-15DTMF events are now published on a channel's stasis_topic. AMI wasDavid M. Lee
refactored to use these events rather than producing the events directly in channel.c. Finally, the code was added to app_stasis to produce DTMF events on the WebSocket. The AMI events are completely backward compatible, including sending events on transmitted DTMF, and sending DTMF start events. The Stasis-HTTP events are somewhat simplified. Since DTMF start and DTMF send events are generally less useful, Stasis-HTTP will only send events on received DTMF end. (closes issue ASTERISK-21282) (closes issue ASTERISK-21359) Review: https://reviewboard.asterisk.org/r/2439 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@385734 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-12Fix Manager Segfault When app_queue Is UnloadedMichael L. Young
When app_queue is unloaded, some manager commands are not being unregistered which result in a segfault. This patch corrects this. (closes issue ASTERISK-21397) Reported by: Peter Katzmann, Corey Farrell Tested by: Corey Farrell Patches: asterisk-21397-missing-unreg-manager-cmd_1.8.diff Michael L. Young (license 5026) asterisk-21397-missing-unreg-manager-cmd_11.diff Michael L. Young (license 5026) Review: https://reviewboard.asterisk.org/r/2444/ ........ Merged revisions 385593 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 385594 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@385595 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-12Fix app_voicemail Segfault And A Few Memory LeaksMichael L. Young
The original report was that app_voicemail would crash. This was caused by ast_config_load() returning CONFIG_STATUS_FILEINVALID but no checks being performed for that return status. After adding the initial patch to fix this issue, Jaco Kroon (jkroon) added some fixes to memory leaks he had discovered. During review, Walter Doekes (wdoekes) suggested adding a helper function in order to determine if we had a valid configuration or not. This patch does the following: * Creates a helper function to check if the configuration is valid * Adds calls to the new helper function where appropiate * Fixes memory leaks where the code returned without running ast_config_destroy() on the configuration that was loaded (closes issue ASTERISK-21302) Reported by: Jaco Kroon Tested by: Jaco Kroon, Michael L. Young Patches: asterisk-11.3.0-app_voicemail-ast_config-fixes.patch Jaco Kroon (license 5671) asterisk-21302-valid_cfg_and_mem_leaks_v3-1.8.diff Michael L. Young (license 5026) Review: https://reviewboard.asterisk.org/r/2443/ ........ Merged revisions 385551 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 385557 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@385573 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-09Backported app_stasis fix from stasis-http branch.David M. Lee
The hash and compare functions for the control container was reusing the wrong ones, causing some problems. I fixed it, but in the wrong branch. Oh well, it happens. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@385116 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-08Add multi-channel Stasis messages; refactor Dial AMI events to StasisMatthew Jordan
This patch does the following: * A new Stasis payload has been defined for multi-channel messages. This payload can store multiple ast_channel_snapshot objects along with a single JSON blob. The payload object itself is opaque; the snapshots are stored in a container keyed by roles. APIs have been provided to query for and retrieve the snapshots from the payload object. * The Dial AMI events have been refactored onto Stasis. This includes dial messages in app_dial, as well as the core dialing framework. The AMI events have been modified to send out a DialBegin/DialEnd events, as opposed to the subevent type that was previously used. * Stasis messages, types, and other objects related to channels have been placed in their own file, stasis_channels. Unit tests for some of these objects/messages have also been written. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@384910 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-08Stasis application WebSocket supportDavid M. Lee
This is the API that binds the Stasis dialplan application to external Stasis applications. It also adds the beginnings of WebSocket application support. This module registers a dialplan function named Stasis, which is used to put a channel into the named Stasis app. As a channel enters and leaves the Stasis diaplan application, the Stasis app receives a 'stasis-start' and 'stasis-end' events. Stasis apps register themselves using the stasis_app_register and stasis_app_unregister functions. Messages are sent to an application using stasis_app_send. Finally, Stasis apps control channels through the use of the stasis_app_control object, and the family of stasis_app_control_* functions. Other changes along for the ride are: * An ast_frame_dtor function that's RAII_VAR safe * Some common JSON encoders for name/number, timeval, and context/extension/priority Review: https://reviewboard.asterisk.org/r/2361/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@384879 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-01Remove silly use of strncmp.Joshua Colp
........ Merged revisions 384414 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@384416 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-30Convert TestEvent AMI events over to Stasis CoreMatthew Jordan
This patch migrates the TestEvent AMI events to first be dispatched over the Stasis-Core message bus. This helps to preserve the ordering of the events with other events in the AMI system, such as the various channel related events. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@384389 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-29app_voicemail: Add blank argument to externnotify if no context argumentJonathan Rose
At least one call to run_externnotify provides a NULL context parameter and because the snprintf statement doesn't account for a NULL context parameter, it simply writes '(null)' to the arguments string instead. This patch makes it write two quotes back to back for that argument instead in the event of a NULL context. (closes issue ASTERISK-18207) Reported by: Barry L. Kline Patches: modified from patch-20130306 uploaded by Karsten Wemheuer (License 5930) ........ Merged revisions 384325 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 384326 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@384327 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-28Break the world. Stasis message type accessors should now all be named ↵Kinsey Moore
correctly. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@384261 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-26Fix multi-station answer race condition.Russell Bryant
When an SLA trunk is ringing (inbound call on the trunk) Asterisk will make outbound calls to the stations that have that trunk. If more than one station answers the call at the same time, all channels other than the first one to answer are left in a bad state. The channel gets leaked, is not connected to anything, and there's no way to get rid of it. We now properly clean up these losing channels by hanging up on them. Since they lost the race, as we process their answer, there is no ringing trunk for them to answer. ........ Merged revisions 383835 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 383836 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383837 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-22Fix StopMixMonitor Hanging Up When Unable To Stop MixMonitor On A ChannelMichael L. Young
A regression was accidentally introduced when allowing an optional ID to be used when calling StopMixMonitor. When we are unable to stop MixMonitor on a channel, -1 is being returned which triggers the hangup of the channel. This patch restores the prior behavior by returning 0 whether we were successful or not. It also allows the call from the manager to use the return code when the action fails. (closes issue ASTERISK-21294) Reported by: daroz Tested by: daroz Patches: asterisk-21294-stop_mixmonitor_hangingup.diff Michael L. Young (license 5026) Review: https://reviewboard.asterisk.org/r/2404/ ........ Merged revisions 383631 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383632 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-22Move more channel events to Stasis; move res_json.c to main/json.c.David M. Lee
This patch started out simply as fixing the bouncing tests introduced in r382685, but required some other changes to give it a decent implementation. To fix the bouncing tests, the UserEvent and Newexten AMI events needed to be refactored to dispatch via Stasis. Dispatching directly to AMI resulted in those events sometimes getting ahead of the associated Newchannel events, which would understandably confuse anyone. I found that instead of creating a zillion different message types and structures associated with them, it would be preferable to define a message type that has a channel snapshot and a blob of structured data with a small bit of additional information. The JSON object model provides a very nice way of representing structured data, so I went with that. * Move JSON support from res_json.c to main/json.c * Made libjansson-dev a required dependency * Added an ast_channel_blob message type, which has a channel snapshot and JSON blob of data. * Changed UserEvent and Newexten events so that they are dispatched via ast_channel_blob messages on the channel's topic. * Got rid of the ast_channel_varset message; used ast_channel_blob instead. * Extracted the manager functions converting Stasis channel events to AMI events into manager_channel.c. (issue ASTERISK-21096) Review: https://reviewboard.asterisk.org/r/2381/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383579 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-16Transition MWI to Stasis-coreKinsey Moore
Remove MWI's dependency on the event system by moving it to Stasis-core. This also introduces forwarding topic pools in Stasis-core which aggregate many dynamically allocated topics into a single primary topic. Review: https://reviewboard.asterisk.org/r/2368/ (closes issue ASTERISK-21097) Patch-by: Kinsey Moore git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383284 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-09confbridge: Rename items for clarity and consistency.Richard Mudgett
struct conference_bridge_user -> struct confbridge_user struct conference_bridge -> struct confbridge_conference struct conference_state -> struct confbridge_state struct conference_bridge_user *conference_bridge_user -> struct confbridge_user *user struct conference_bridge_user *cbu -> struct confbridge_user *user struct conference_bridge *conference_bridge -> struct confbridge_conference *conference The names are now generally shorter, consistently used, and don't conflict with the struct names. This patch handles the renaming part of the issue. (issue ASTERISK-20776) Reported by: rmudgett git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@382764 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-07Let vm_mailbox_snapshot combine "Urgent" when no folder is specifiedMatthew Jordan
r381835 fixed a bug in vm_mailbox_snapshot where combining INBOX and Old forgot that Urgent also "counts" as new messages. This fixed the problem when any of the three folders was specified and the combine option was used. It missed the case where the folder isn't specified and we build a snapshot of all folders. This patch corrects that. ........ Merged revisions 382617 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@382621 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-04Confbridge CLI new record file name check.Kevin Harwell
This fix checks to make sure that if a confbridge record start command is issued from the CLI it will always use the file name given on the CLI even if it changes between start/stop records for a conference. Previously it had been reusing the same file between start/stops even if a new filename was given. (issue AST-1088) Reported by: John Bigelow ........ Merged revisions 382385 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@382386 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-28Let channels joining a MeetMe conference opt out of the denoiserMatthew Jordan
For some channel drivers, specifically those that have a varying rate in the number of audio samples, the audio quality for a MeetMe conference can be exceedingly poor. This is due to a unilateral application of the DENOISE function in func_speex to channels joining the conference. The denoiser function in the speex library is initialized with the number of audio samples in each sample that will be provided to it. If the number of audio samples changes, the denoiser has to be thrown away and re-initialized. While this could be worked around by removing func_speex, that doesn't help if you actually use the denoiser with other channels on the system. This patches does the following: * Checks for the presence of func_speex as opposed to codec_speex when determining if the DENOISE function is present (which is where the function is actually implemented) * Adds an option to MeetMe 'n' that causes the denoiser to not be applied to a channel when it joins. This keeps the current behavior the default, but let's users disable the denoiser if it causes problems on their system. Review: https://reviewboard.asterisk.org/r/2358 (closes issue AST-1062) Reported by: Thomas Arimont ........ Merged revisions 382227 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 382230 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@382232 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-26Clean up ConfBridge commands to account for wait_marked usersMatthew Jordan
When ConfBridge was refactored to better handle the concept of marked, wait_marked, and normal users co-existing in a conference (thereby implementing a state machine for the conference), the wait_marked users were put into their own list of conference participants, separate from the active users. This list is used for wait_marked users when they are waiting in a conference but no marked user has joined; normal users may have joined at this point however. There are several AMI/CLI commands that affect conference users that were not checking the wait_marked users list: * CLI/AMI commands that mute/unmute a participant. In this case, wait_marked users have to remain in their particular state and should not be affected - however, the commands would return "Channel not found" as opposed to the appropriate error condition. * CLI/AMI commands that kick a participant. An admin should always be able to kick a participant out of the conference. This patch fixes both sets of commands, and cleans up the CLI commands slightly by allowing them to complete a participant name (this was supposed to have been added, but the function call was commented out and wasn't implemented). Review: https://reviewboard.asterisk.org/r/2346/ (closes issue AST-1114) Reported by: John Bigelow Tested by: John Bigelow ........ Merged revisions 382068 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@382070 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-26Ensure that the default bridge/user profiles are always availableMatthew Jordan
ConfBridge and Page require that there always be a default bridge and user profile available. While properties of the default profiles can be overriden in the configuration file, removing them can create situations where neither application can function properly. This patch ensures that if an administrator removes the profiles from the confbridge.conf configuration file, the profiles are added upon load. Documentation clarifying this has been added to the confbridge.conf.sample file. Review: https://reviewboard.asterisk.org/r/2356/ (closes issue AST-1115) Reported by: John Bigelow Tested by: John Bigelow ........ Merged revisions 382066 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@382067 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-24Make ParkAndAnnounce return to priority + 1 when return context is not definedMatthew Jordan
The ParkAndAnnounce application documentation for the optional return_context parameter states the following: return_context The goto-style label to jump the call back into after timeout. Default 'priority+1'. Unfortunately, the application was sending the channel back into the dialplan at 'priority', which is the ParkAndAnnounce application call. This causes an infinite loop of the channel constantly being parked, announced, timed out, parked, announced, timed out... while fun, especially for those callers you wish to drive to the end of madness, this was not the intent of the application. (closes issue ASTERISK-20113) Reported by: serginuez patches: app_parkandannounce.diff uploaded by serginuez (License 6405) ........ Merged revisions 381916 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 381917 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381918 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-22app_dial: Honor the 'c' flag when the calling party hangs upJonathan Rose
Apparently this feature became broken in 11, probably as a result of the Hangup Cause project. (closes issue ASTERISK-21113) Reprted by: Heiko Wundram Patches: app_dial.patch uploaded by Heiko Wundram (license 5822) ........ Merged revisions 381880 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381881 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-19Confbridge channels staying active when all participants leave.Kevin Harwell
If you started/stopped recording of a conference multiple times channels would remain active even when all participants left the conference. This was due to the fact that a reference to the confbridge was being added every time a start record command was issued, but when the recording was stopped there was no matching de-reference thus keeping the conference alive. Made sure only a single reference is added for the record thread no matter how many times recording is started/stopped. A de-reference is issued upon thread ending. Note, this issue is being fixed under AST-1088 since it relates to it and should have been corrected along with those modifications. (issue AST-1088) Reported by: John Bigelow ........ Merged revisions 381737 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381741 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-19Added Confbridge record_file_append option.Kevin Harwell
Currently, if one starts, stops, and then starts a recording again for a conference the recorded data is appended to the file originally created on the first record start. An option record_file_append has been added that defaults to "yes", but when set to "no" will force creation of a new file between every record start/stop. (issue AST-1088) Reported by: John Bigelow Review: http://reviewboard.digium.internal/r/374/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381729 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-18Fixed Confbridge file recording deadlock and appending.Kevin Harwell
A deadlock occurred after starting/stopping and then restarting a confbridge recording. Upon starting a recording a record thread is created that holds a lock until just before exiting. Stopping the recording does not stop/exit the thread or release the lock. The thread waits until recording begins again. Starting a stopped recording signals the thread to continue and start recording again. However restarting the recording also created another record thread resulting in a deadlock. The fix was to make sure the record thread was only created once. Also it was noted that filenames for the recordings were being concatenated for each start/stop. This was fixed by creating a new file for each conference session and appending the actual recorded data within the file (e.g. passing the 'a' option to MixMonitor). (issue AST-1088) Reported by: John Bigelow Review: http://reviewboard.digium.internal/r/374/ ........ Merged revisions 381702 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381703 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-18confbridge: Add flags column to CLI "confbridge list <conference>"Richard Mudgett
* Added the following flags to the CLI "confbridge list <conference>" output: A - The user is an admin M - The user is a marked user W - The user must wait for a marked user to join E - The user will be kicked after the last marked user leaves the conference w - The user is waiting for a marked user to join * Added the following header to the AMI ConfbridgeList events: WaitMarked, EndMarked, and Waiting. (closes issue AST-1101) Reported by: John Bigelow Patches: confbridge-show-admin3.txt (license #5091) patch uploaded by John Bigelow Modified git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381644 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-16confbridge: Rename i iterator variables to iter.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381628 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-15Add CLI configuration documentationMatthew Jordan
This patch allows a module to define its configuration in XML in source, such that it can be parsed by the XML documentation engine. Documentation is generated in a two-pass approach: 1. The documentation is first generated from the XML pulled from the source 2. The documentation is then enhanced by the registration of configuration options that use the configuration framework This patch include configuration documentation for the following modules: * chan_motif * res_xmpp * app_confbridge * app_skel * udptl Two new CLI commands have been added: * config show help - show configuration help by module, category, and item * xmldoc dump - dump the in-memory representation of the XML documentation to a new XML file. Review: https://reviewboard.asterisk.org/r/2278 Review: https://reviewboard.asterisk.org/r/2058 patches: on review 2058 uploaded by twilson git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381527 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-14Revamp of terminal color codesKinsey Moore
The core module related to coloring terminal output was old and needed some love. The main thing here was an attempt to get rid of the obscene number of stack-local buffers that were allocated for no other reason than to colorize some output. Instead, this uses a simple trick to allocate several buffers within threadlocal storage, then automatically rotates between them, so that you can make multiple calls to the colorization routine within one function and not need to allocate multiple buffers. Review: https://reviewboard.asterisk.org/r/2241/ Patches: bug.patch uploaded by Tilghman Lesher git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381448 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-14Don't throw a spurious error when using DBdeltreeMatthew Jordan
The function call ast_db_deltree returns the number of row deleted, or a negative number if it failed. DBdeltree was treating any non-zero return as an error, causing a spurious verbose error message to be displayed. This patch handles the return code of ast_db_deltree correctly. (closes issue ASTERISK-21070) Reported by: ianc patches: dbdeltree.diff uploaded by ianc (License #5955) ........ Merged revisions 381364 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 381365 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381366 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-12Adding Some More Manager Events To ConfBridgeMichael L. Young
Currently, ConfBridge does not send manager events for ConfbridgeMute, ConfbridgeUnmute, ConfbridgeStartRecord and ConfbridgeStopRecord. This patch adds these events to the manager. The reporter's patch moves some other events up to the beginning of the file. The patch being committed is based on the patch contributed from the reporter of this issue. I have made a lot of modifications to the patch in order for it to fit in better with what we currently are doing in the code when it comes to manager events. I also made a few changes to the <see-also> elements on some of the events. (closes issue ASTERISK-20827) Reported by: Clint Davis Tested by: Clint Davis, Michael L. Young Patches: 20827.diff uploaded by Clint Davis (license 6453) asterisk-20827-confbridge-events.diff uploaded by Michael L. Young (license 5026) Review: https://reviewboard.asterisk.org/r/2309/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381256 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-11Properly load say.conf upon reload of module app_playback.Kevin Harwell
If say.conf did not exists prior to originally loading module app_playback it would not load on subsequent reloads of the module once it had been created. This occurred because upon reload of the app_playback module it would only load a new configuration if an old one had previously existed. This fix simply removed the association between checking if an old configuration existed and the loading of the new one. (closes issue ASTERISK-20800) Reported by: pgoergler ........ Merged revisions 381216 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 381217 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381219 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-08app_confbridge: Fix crash from receiving an AMI action after ConfBridge ↵Richard Mudgett
unloaded. Unloading ConfBridge caused the next AMI action received to crash Asterisk. * Add the missing unregister of AMI action ConfbridgeSetSingleVideoSrc when ConfBridge is unloaded. (closes issue ASTERISK-20994) Reported by: Jeremy Kister Patches: jira_asterisk_20994_v11.patch (license #5621) patch uploaded by rmudgett Tested by: Rusty Newton, Jeremy Kister ........ Merged revisions 381067 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381069 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-05app_page and app_confbridge: Fix custom announcement on entering conference.Richard Mudgett
The Page and ConfBridge custom announcement did not play when users entered the conference. * Fix the CONFBRIDGE(user,announcement) file not getting played. The code to do this got removed accidentally when the ConfBridge code was restructured to be more state machine like. * Fixed play_prompt_to_user() doxygen comments. * Fixed the Page A(x) and n options for the caller. The caller never played the announcement file and totally ignored the n option. The code to do this was lost when the application was converted to use ConfBridge. * Factored out setup_profile_bridge(), setup_profile_paged(), and setup_profile_caller() routines to setup ConfBridge profiles. Made each profile setup routine use the default template if one has not already been setup by dialplan. (closes issue ASTERISK-20990) Reported by: Jeremy Kister Tested by: rmudgett ........ Merged revisions 380894 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@380896 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-05app_confbridge: Fix error messages on exiting conference.Richard Mudgett
A marked user ending a conference with only end_marked users generates error messages: ERROR[0000][C-00000000]: confbridge/conf_state.c:47 conf_invalid_event_fn: Invalid event for confbridge user '' * The MULTI_MARKED state was doing too much when it was kicking out the end_marked users from the conference. The kicked out users will clean up after themselves when they exit the conference. (closes issue ASTERISK-20991) Reported by: Jeremy Kister Tested by: rmudgett ........ Merged revisions 380892 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@380893 65c4cc65-6c06-0410-ace0-fbb531ad65f3