summaryrefslogtreecommitdiff
path: root/apps
AgeCommit message (Collapse)Author
2017-03-08app_voicemail: Cannot set fromstring on a per-mailbox basisDaniel Journo
* apps/app_voicemail.c fromstring field added to mailbox which will override the global fromstring if set. ASTERISK-24562 #close Change-Id: I5e90e3a1ec2b2d5340b49a0db825e4bbb158b2fe
2017-02-21realtime: Fix ast_load_realtime_multientry handlingSean Bright
ast_load_realtime_multientry() returns an ast_config structure whose ast_categorys are keyed with the empty strings. Several modules were giving semantic meaning to the category names causing problems at runtime. * app_directory: Treated the category name as the mailbox name, and would fail to direct calls to the appropriate extension after an entry was chosen. * app_queue: Queues, queue members, and queue rules were all affected and needed to be updated. * pbx_realtime: Pattern matching would never succeed because the extension entered by the user was always compared to the empty string. Change-Id: Ie7e44986344b0b76ea8f6ddb5879f5040c6ca8a7
2017-02-20app_voicemail: vm_authenticate accesses uninitialized memorySean Bright
vm_authenticate doesn't always set the passed ast_vm_user argument, so we initialize to 0 before passing it in. ASTERISK-25893 #close Reported by: Filip Jenicek Change-Id: Ia3cc0128f93d352ed9add8d5c2f0f7232c2cbe4a
2017-02-14Merge "app_voicemail: Allow 'Comedian Mail' branding to be overriden" into 13zuul
2017-02-14Merge "app_voicemail: VoiceMailPlayMsg did not play database stored ↵zuul
messages" into 13
2017-02-14app_voicemail: Allow 'Comedian Mail' branding to be overridenSean Bright
Original patch by John Covert, slight modifications by me. ASTERISK-17428 #close Reported by: John Covert Patches: app_voicemail.c.patch (license #5512) patch uploaded by John Covert Change-Id: Ic3361b0782e5a5397a19ab18eb8550923a9bd6a6
2017-02-14Merge "app_record: Add option to prevent silence from being truncated" into 13zuul
2017-02-14Merge "cli: Fix various CLI documentation and completion issues" into 13zuul
2017-02-14app_voicemail: VoiceMailPlayMsg did not play database stored messagesrrittgarn
When attempting to use VoiceMailPlayMsg with a realtime data backend the message is located, but never retrieved. This patch adds the required RETRIEVE and DISPOSE calls that will fetch the message from the database (and IMAP storage as well for that matter). Also, removed extraneous make_file call. ASTERISK-26723 #close Change-Id: I1e122dd53c0f3d7faa10f3c2b7e7e76a47d51b8c
2017-02-14app_record: Add option to prevent silence from being truncatedSean Bright
When using Record() with the silence detection feature, the stream is written out to the given file. However, if only 'silence' is detected, this file is then truncated to the first second of the recording. This patch adds the 'u' option to Record() to override that behavior. ASTERISK-18286 #close Reported by: var Patches: app_record-1.8.7.1.diff (license #6184) patch uploaded by var Change-Id: Ia1cd163483235efe2db05e52f39054288553b957
2017-02-13Merge "core: Cleanup some channel snapshot staging anomalies." into 13zuul
2017-02-13cli: Fix various CLI documentation and completion issuesSean Bright
* app_minivm: Use built-in completion facilities to complete optional arguments. * app_voicemail: Use built-in completion facilities to complete optional arguments. * app_confbridge: Add missing colons after 'Usage' text. * chan_alsa: Use built-in completion facilities to complete optional arguments. * chan_sip: Use built-in completion facilities to complete optional arguments. Add completions for 'load' for 'sip show user', 'sip show peer', and 'sip qualify peer.' * chan_skinny: Correct and extend completions for 'skinny reset' and 'skinny show line.' * func_odbc: Correct completions for 'odbc read' and 'odbc write' * main/asterisk: Correct and extend completions for 'core show file version.' * main/astmm: Use built-in completion facilities to complete arguments for 'memory' commands. * main/bridge: Correct completions for 'bridge kick.' * main/ccss: Use built-in completion facilities to complete arguments for 'cc cancel' command. * main/cli: Add 'all' completion for 'channel request hangup.' Correct completions for 'core set debug channel.' Correct completions for 'core show calls.' * main/pbx_app: Remove redundant completions for 'core show applications.' * main/pbx_hangup_handler: Remove unused completions for 'core show hanguphandlers all.' * res_sorcery_memory_cache: Add completion for 'reload' argument of 'sorcery memory cache stale' and properly implement. Change-Id: Iee58c7392f6fec34ad9d596109117af87697bbca
2017-02-10manager: Restore Originate failure behavior from Asterisk 11Sean Bright
In Asterisk 11, if the 'Originate' AMI command failed to connect the provided Channel while in extension mode, a 'failed' extension would be looked up and run. This was, I believe, unintentionally removed in 51b6c49. This patch restores that behavior. This also adds an enum for the various 'synchronous' modes in an attempt to make them meaningful. ASTERISK-26115 #close Reported by: Nasir Iqbal Change-Id: I8afbd06725e99610e02adb529137d4800c05345d
2017-02-10core: Cleanup some channel snapshot staging anomalies.Richard Mudgett
We shouldn't unlock the channel after starting a snapshot staging because another thread may interfere and do its own snapshot staging. * app_dial.c:dial_exec_full() made hold the channel lock while setting up the outgoing channel staging. Made hold the channel lock after the called party answers while updating the caller channel staging. * chan_sip.c:sip_new() completed the channel staging on off-nominal exit. Also we need to use ast_hangup() instead of ast_channel_unref() at that location. * channel.c:__ast_channel_alloc_ap() added a comment about not needing to complete the channel snapshot staging on off-nominal exit paths. * rtp_engine.c:ast_rtp_instance_set_stats_vars() made hold the channel locks while staging the channels for the stats channel variables. Change-Id: Iefb6336893163f6447bad65568722ad5d5d8212a
2017-01-30Merge "app_queue: Fix queues randomly disappearing on reload" into 13zuul
2017-01-26app_queue: Fix queues randomly disappearing on reloadkkm
With 500+ queues and a reload every minute, a random queue disappears upon reload. The cause is mususe of the 'dead' flag. Namely, all queues were marked dead up front, and then "resurrected" by dropping this flag for those found in the configuration. But a queue marked dead can be removed also when control leaves the app entry point on a PBX thread. With this change, the queue is marked only not found, and at the end of reload only the queues that are still not found are actually marked as dead, so the dead flag is never reset, and set only on positively dead queues. ASTERISK-26755 Change-Id: I3a4537aec9eb8d8aeeaa0193407e3523feb004bf
2017-01-24tests: use datadir for sound filesTzafrir Cohen
Some (voicemail-related) tests API symlinks beep.gsm and other files from ast_config_AST_VAR_DIR. It should use ast_config_AST_DATA_DIR. ASTERISK-26740 #close Change-Id: Id49c56fb9e16df64b1a2b829693ca7601252df89
2016-12-19app_queue: Ensure member is removed from pending when hanging up.Martin Tomec
In some cases member is added to pending_members, and the channel is hung up before any extension state change. So the member would stay in pending_members forever. So when we call do_hang, we should also remove member from pending. ASTERISK-26621 #close Change-Id: Iae476b5c06481db18ebe0fa594b3e80fdc9a7d54
2016-11-14apps/app_echo: Only relay a single video source change frameMatt Jordan
In 9785e8d0, app_echo was updated to relay video source updates to the channel for the purposes of displaying video in WebRTC tests. Unfortunately, this can cause a Kafkaesque nightmare if two or more Local channels are in a bridge together where their ends are in app_echo. When this situation occurs, a video update sent into app_echo will cause the video update to be relayed to the other Local channels, causing another round of video updates, etc. In not much time at all, the channel length queues will be overwhelmed, channel alert pipes will fail, and all hell will break loose as Asterisk merrily continues to throw more video update requests onto the channels. This patch updates app_echo to *only* relay a single video update. Once a video update has been made, all further video updates are dropped. This meets the intended purpose of the original patch: if we get a video update and we're in app_echo, go ahead and ask the sender to update themselves. However, once we've got that video stream sync'd up, don't keep spamming the world. Change-Id: I9210780b08d4c17ddb38599d1c64453adfc34f74
2016-11-08app_queue: new variable set when abandonedSebastian Gutierrez
sets the variable ABANDONED to TRUE if the call was not answered. ASTERISK-26558 Change-Id: I4729af9bff4eba436d8a776afd3374065d0036d3
2016-11-02app_dial: Fix incorrect device state when channel is picked up.Joshua Colp
Given the scenario where multiple channels are dialed using Dial() but the caller is picked up using PickupChan() all outgoing channels except the channel specified to PickupChan() would be marked as ringing until the call had been hung up. When using the PickupChan application the channel executing the application is swapped into place of another channel. As part of this process the channel is answered. The Dial application has explicit logic which checks if the channel is answered, cancels all other outgoing channels, and bridges. This logic is different than the normal logic that is executed when an outgoing channel is answered. This different logic failed to publish dial events stating that the other outgoing channels had been canceled. As a result references to the outgoing channels were held onto by the dial masquerade process until the call had been ended and the channels had gone away. This would result in the channels appearing in the "core show channels" list despite not being present anymore and would also result in incorrect device state. This change makes it so that this logic also publishes dial events stating that the other outgoing channels have been canceled. ASTERISK-26549 Change-Id: Iea7168e6e82f7d4609ec0366153804e4f55ea64f
2016-10-26app_voicemail: Clear voice mailbox in MailboxExists and MAILBOX_EXISTS.Joshua Colp
When executing the MailboxExists dialplan application and MAILBOX_EXISTS dialplan function the passed in temporary voice mailbox was not cleared, causing it to try to free garbage. ASTERISK-26503 #close Change-Id: Ie21ccfa1b80b9c59318e596f6b8e17da2b5a7cb3
2016-10-17Merge "app_queue: Added initialization for "context" parameter" into 13zuul
2016-10-14app_queue: Added initialization for "context" parameterLeandro Dardini
When using Asterisk Realtime Architecture, empty fields are skipped and the default values are used. If the "context" parameter in queue was set and then cleared from the database, the old value remains in memory and it continues to be used. This change initialize the "context" parameter with an empty value, allowing clearing the parameter. ASTERISK-26462 #close Change-Id: I64be73d5044ce38dd02408bd0e53de965ef65905
2016-10-14Merge "Audit ast_json_pack() calls for needed UTF-8 checks." into 13zuul
2016-10-14Merge "app_queue.c: Fix clearing of pause reason string." into 13zuul
2016-10-13Audit ast_json_pack() calls for needed UTF-8 checks.Richard Mudgett
Added needed UTF-8 checks before constructing json objects in various files for strings obtained outside the system. In this case string values from a channel driver's peer and not from the user setting channel variables. * aoc.c: Fixed type mismatch in s_to_json() for time and granularity json object construction. ASTERISK-26466 Reported by: Richard Mudgett Change-Id: Iac2d867fa598daba5c5dbc619b5464625a7f2096
2016-10-13app_queue.c: Fix clearing of pause reason string.Richard Mudgett
The pause reason is not always cleared when it should be cleared. * Made set_queue_member_pause() always clear pause reason if not pausing with a reason string. Change-Id: I993dad19626ec017478a230e980989438b778c53
2016-10-13app_minivm.c: Fix malformed ast_json_pack() call.Richard Mudgett
Change-Id: I082b239022fac462666e52a14a44304748908dc0
2016-10-11app_dial: Add the "Q" option to set the cause on unanswered channelsGeorge Joseph
The "Q" option will set the cause on the unanswered channels when another channel answers. It overrides the default of ANSWERED_ELSEWHERE. NOTE: chan_sip does not support setting the cause on a CANCEL to anything other than ANSWERED_ELSEWHERE. ASTERISK-26446 #close Change-Id: I71742e0919aaa16784c30a2b2e73fbeed7672e47
2016-09-12app_queue: Fix CLI "queue show" and AMI Queues action output truncation.Richard Mudgett
The output of CLI "queue show" and AMI Queues action is truncated and "failed to extend from 240 to 327" messages are generated if the queue member and interface names are lengthy. * Increase the string buffer size from 240 to 512 in order to accommodate for more information fields added to the output since v1.8. ASTERISK-26360 #close Reported by: Richard Mudgett Change-Id: Id99c03cf5362453b80491a4b3b0434cb67aa966d
2016-09-07Merge "ConfBridge: Make some announcements asynchronous." into 13zuul
2016-09-07Merge "followme: initialize all config items on reload" into 13zuul
2016-09-07Merge "apps/app_dial: Fix crash on non-connect call paths for ↵zuul
Privacy/Screening option" into 13
2016-09-07Merge "apps/app_dial: Set the DIALSTATUS to NOANSWER on privacy option 5" ↵zuul
into 13
2016-09-07followme: initialize all config items on reloadTzafrir Cohen
Some configuration directives were not initialized on reload, and hence were not reset to default if they were removed from followme.conf. ASTERISK-26288 #close Change-Id: Ief829e16374ad1e0ecfd63e6ee4923b5a1d1c150
2016-09-03apps/app_dial: Fix crash on non-connect call paths for Privacy/Screening optionMatt Jordan
In any scenario in which the callee is not connected to the caller, the current code in app_dial will crash due to raising a Dial End Stasis Message after the callee channel has been hung up. This patch corrects the error by simply moving the explicit hangup of the callee (peer) channel until after the dial end message. ASTERISK-25691 #close Change-Id: I816a414014424d0d8c80e2a3cbef13ef8c63798d
2016-09-03apps/app_dial: Set the DIALSTATUS to NOANSWER on privacy option 5Matt Jordan
If the callee selects option '5' using the Dial application's privacy (P) option, the DIALSTATUS is erroneously set to ANSWER. This option reflects the callee sending the caller to VoiceMail one time; the call is definitely *not* ANSWERed in such a scenario. With this patch, the DIALSTATUS is instead set to NOANSWER, which is the same DIALSTATUS that is set when the 'send to VoiceMail every time' option is set. ASTERISK-25691 Change-Id: Iaf0c9f0fa00545e7366443875e2bb7d9a89a1358
2016-09-01ConfBridge: Make some announcements asynchronous.Mark Michelson
Confbridge announcements tend to block a channel while they are being played. In some circumstances, this is warranted since you want that particular channel not to hear the announcement (Example: "John Doe has entered the conference"). For others it makes less sense. This change first introduces methods for playing sounds asynchronously into the conference. This is very similar to how synchronous sounds are played, except the channel initiating the playback does not wait for the sound to complete before moving on. Asynchronous announcements are used for two circumstances: * Sounds played for a user after they have left the bridge * Sounds that play first to a single user and then the rest of the conference (if the channel and conference use the same language) ASTERISK-26289 #close Reported by Mark Michelson Change-Id: Ie486bb3de1646d50894489030326a423e594ab0a
2016-09-01app_mp3: Use correct buffer size and the same sample rate as the channelMichael Kuron
Previously, the buffer used for MP3 streamed from HTTP servers had a size of 1 MB. For 8 kHz mono audio at 16 bit resolution, such a buffer covers about 1 minute. Only when the buffer is full does audio start to play. For MP3 files streamed from a server, that is usually not a big deal as long as the connection to the server is fast enough to supply that much data within a second or two. For MP3 live streams however, it takes 1 minute to download 1 minute of audio, so without this change, app_mp3 wasn't really usable for MP3 live streams. This commit changes the buffer size so that it covers 6 seconds of an MP3 file streamed from a server and 0.5 seconds of an MP3 live stream. The latter is identified by the use of a .m3u file extension. app_mp3 so far only supported 8 kHz audio. Now it always runs at the sample rate of the channel. ASTERISK-26085 #close Change-Id: Id1ee274733cd804a0edecf7450329b72f1235af0
2016-08-29Merge "app_queue: Ensure member is removed from pending when hanging up." ↵zuul
into 13
2016-08-29app_macro: Consider '~~s~~' as a macro start extension.chrisderock
As described in issue ASTERISK-26282 the AEL parser creates macros with extension '~~s~~'. app_macro searches only for extension 's' so the created extension cannot be found. with this patch app_macro searches for both extensions and performs the right extension. ASTERISK-26282 #close Change-Id: I939aa2a694148cc1054dd75ec0c47c47f47c90fb
2016-08-25app_queue: Ensure member is removed from pending when hanging up.Joshua Colp
When dialing channels it is possible that they may not ever leave the not in use state (Local channels in particular) by the time we cancel them. If this occurs but we know they were dialed we explicitly remove them from the pending members container so that subsequent call attempts occur. ASTERISK-26299 #close Change-Id: I6ad0d17c36480c92cebf840626228ce3f7e4bd65
2016-08-23ConfBridge: Rework announcer channel methodologyMark Michelson
NOTE: This patch was submitted earlier and reverted because of a failing test. The test has been patched so that it adjusts for the changes here, so this is being resubmitted for review. One feature that confbridge has is the ability to play sounds to all participants in the conference. Prior to this commit, the algorithm for this was as follows: * Grab the playback lock * Push the conference announcer channel into the bridge * Play back the sound * Pull the conference announcer channel from the bridge * Release the playback lock The issue here is that the act of adding the playback channel to the bridge and removing it for each announcement is expensive. Amongst the expenses: * The announcer channel is imparted into the bridge, meaning a new thread is spun up for each playback. * When the announcer is added or removed from the bridge, it results in the BRIDGEPEER channel variable being set on all channels in the bridge. This requires keeping the bridge locked and locking each individual channel in order to set it. * There's also just the general overhead of adding the channel and removing it from the bridge. The bridge potentially has to reconfigure every single time With this commit, the paradigm for playing back announcements has shifted. * The announcer channel is now added to the bridge when the conference is allocated, and it is hung up when the conference is destroyed. * A taskprocessor is used to queue playbacks onto the announcer channel. This keeps the behavior from before where playbacks do not overlap. * The announcer channel is no longer placed into the bridge as departable. Since we are not constantly removing the channel from the bridge, it is safe to add the channel using an independent thread and simply hang the channel up when it is time for the conference to be destroyed. The use of the taskprocessor for playbacks opens up the interesting possibility of having asynchronous announcements played. In this commit, however, the behavior is still exactly the same as it previously was. ASTERISK-26289 Reported by Mark Michelson Change-Id: Ica9fa4907c2f3728cdd1cf0bc564ef4eb40754a0
2016-08-23Revert "ConfBridge: Rework announcer channel methodology"Joshua Colp
This reverts commit 0cdeb2bfb0f4203384c08858951af3c77be8b9b3. Change-Id: I18ba73b6d4dc0b994f4ffb01ae0b6cfad36ac636
2016-08-19ConfBridge: Rework announcer channel methodologyMark Michelson
One feature that confbridge has is the ability to play sounds to all participants in the conference. Prior to this commit, the algorithm for this was as follows: * Grab the playback lock * Push the conference announcer channel into the bridge * Play back the sound * Pull the conference announcer channel from the bridge * Release the playback lock The issue here is that the act of adding the playback channel to the bridge and removing it for each announcement is expensive. Amongst the expenses: * The announcer channel is imparted into the bridge, meaning a new thread is spun up for each playback. * When the announcer is added or removed from the bridge, it results in the BRIDGEPEER channel variable being set on all channels in the bridge. This requires keeping the bridge locked and locking each individual channel in order to set it. * There's also just the general overhead of adding the channel and removing it from the bridge. The bridge potentially has to reconfigure every single time With this commit, the paradigm for playing back announcements has shifted. * The announcer channel is now added to the bridge when the conference is allocated, and it is hung up when the conference is destroyed. * A taskprocessor is used to queue playbacks onto the announcer channel. This keeps the behavior from before where playbacks do not overlap. * The announcer channel is no longer placed into the bridge as departable. Since we are not constantly removing the channel from the bridge, it is safe to add the channel using an independent thread and simply hang the channel up when it is time for the conference to be destroyed. The use of the taskprocessor for playbacks opens up the interesting possibility of having asynchronous announcements played. In this commit, however, the behavior is still exactly the same as it previously was. ASTERISK-26289 Reported by Mark Michelson Change-Id: Ic5cd2c4b98a1eaa1715eb7a5b35d62f1a76d78a5
2016-08-15Merge "app_dial: Improve documentation" into 13Joshua Colp
2016-08-15Merge "manager: Add <see-also> tags to relate UserEvent actions/apps/events" ↵Joshua Colp
into 13
2016-08-14app_dial: Improve documentationMatt Jordan
* Add some helpful <literal> and other embedded paragraph tags * Document some of the lesser known channel variables set by Dial * Add examples for some common Dial uses, along with some more challenging but useful options Change-Id: Ib2fb9301e8e044d14fbb2815ec64161f19bbfbc1
2016-08-13manager: Add <see-also> tags to relate UserEvent actions/apps/eventsMatt Jordan
Change-Id: I80f8a981f62f50e74609c69c49edcaca6c95efa4