summaryrefslogtreecommitdiff
path: root/apps
AgeCommit message (Collapse)Author
2017-11-20Loader: Remove unneeded load_pri declarations.Corey Farrell
Instead of specifying AST_MODFLAG_LOAD_ORDER with load_pri AST_MODPRI_DEFAULT just use AST_MODFLAG_DEFAULT. Change-Id: I0123258eafce324249433a69df15a85cc16e509f
2017-11-18app_minivm: Fix possible uninitialized return value.Corey Farrell
Declare 'res' initialized to -1 to deal with earlier error paths that could cause 'res' to be returned uninitialized. Change-Id: I8ac2a5755bf4174d89ef893e924c940f702b104e
2017-11-15app_record: Don't set RECORD_STATUS chan var until file is closedGeorge Joseph
We've been calling pbx_builtin_setvar_helper to set the RECORD_STATUS variable before actually closing the recorded file. If a client is watching VarSet events and tries to do something with the file when a RECORD_STATUS event is seen, they might attempt to do so while the file it's still open. We now delay calling pbx_builtin_setvar_helper until after we close the file. ASTERISK-27423 Change-Id: I7fe9de99953e46b4bafa2b38cf151fe8f6488254
2017-11-06Fix ast_(v)asprintf() malloc failure usage conditions.Richard Mudgett
When (v)asprintf() fails, the state of the allocated buffer is undefined. The library had better not leave an allocated buffer as a result or no one will know to free it. The most likely way it can return failure is for an allocation failure. If the printf conversion fails then you actually have a threading problem which is much worse because another thread modified the parameter values. * Made __ast_asprintf()/__ast_vasprintf() set the returned buffer to NULL on failure. That is much more useful than either an uninitialized pointer or a pointer that has already been freed. Many uses won't have to check for failure to ensure that the buffer won't be double freed or prevent an attempt to free an uninitialized pointer. * stasis.c: Fixed memory leak in multi_object_blob_to_ami() allocated by ast_asprintf(). * ari/resource_bridges.c:ari_bridges_play_helper(): Remove assignment to the wrong thing which is now not needed even if assigning to the right thing. Change-Id: Ib5252fb8850ecf0f78ed0ee2ca0796bda7e91c23
2017-11-02Add missing menuselect dependencies.Corey Farrell
This adds menuselect dependencies for modules that use symbols of other modules. ASTERISK-27390 Change-Id: Ia2d2849f5b87a72af7324a82edc3f283eafb5385
2017-10-30Merge "Modules: Fix issues with CLI completion."Joshua Colp
2017-10-30Modules: Fix issues with CLI completion.Corey Farrell
* Stop using ast_module_helper to check if a module is loaded, use ast_module_check instead (app_confbridge and app_meetme). * Stop ast_module_helper from listing reload classes when needsreload was not requested. ASTERISK-27378 Change-Id: Iaed8c1e4fcbeb242921dbac7929a0fe75ff4b239
2017-10-28app_agent_spool: Fix typo in dtmf features usage desctiptionIgor Goncharovskiy
Fix typo, that specify usage wrong option 'dtmf-features' for CHANNEL() function instead of correct 'dtmf_features' ASTERISK-27377 #close Change-Id: I15ecc829c1035b359584673e12cdb5c9291ac930
2017-10-26app_voicemail.c: Fix compiler warning with IMAP build.Richard Mudgett
ASTERISK-27181 Change-Id: Ic4468b49860bd7f67e922baf4c9e96828c184d17
2017-10-23app_agent_pool.c: Fix online documentation typo.Richard Mudgett
Change-Id: Ib0bc95fd0ec288c78c313823254d7a84ebfc4429
2017-10-18app_macro deprecation.Corey Farrell
* Mark the module deprecated. * Disable the module by default. * Produce a warning the first time a macro is used. * Note deprecation related options in app_dial and app_queue. ASTERISK-27350 Change-Id: I560ea043bacdbc5534a17d97854273d52c2f1bdc
2017-10-11Merge "app_originate: Set ORIGINATE_STATUS correctly on failure"Joshua Colp
2017-10-11app_queue.c: clear moh field in init_queueNathan Bruning
ASTERISK-27301 #close Change-Id: Ic31361f34e2de3b6470e68fc37205a7711082eba
2017-10-10app_originate: Set ORIGINATE_STATUS correctly on failureSean Bright
We were ignoring the return value from ast_pbx_outgoing_exten() and ast_pbx_outgoing_app() which could fail before setting the reason code. This resulted in failures being reported as success. ASTERISK-25266 #close Reported by: Allen Ford Change-Id: Idf16237b7e41b527d2c69c865829128686beeb3b
2017-09-28app_queue.c: Fix announcements when announce-to-first-user not enabled.Richard Mudgett
The previous patch for ASTERISK-27216 made it so you wouldn't get any position or periodic announcements unless you had announce-to-first-user enabled. The announce-to-first-user feature was added by ASTERISK_21782 as a result of the patch which introduced the redundant announcements that ASTERISK-27216 removes. * By noting that the makeannouncement variable is used to suppresses the first user announcement, we set its initial value to the announce-to-first-user enable setting. ASTERISK-27216 Change-Id: Ieaeb7dbea8ae7073086b775fbafe0625b000b10a
2017-09-26Merge "app_queue: Only do announcement logic between ringing cycles"Joshua Colp
2017-09-25Merge "build: A few gcc 7 error fixes"Joshua Colp
2017-09-25build: A few gcc 7 error fixesGeorge Joseph
Change-Id: I7b5300fbf1af7d88d47129db13ad6dbdc9b553ec
2017-09-25app_queue: Only do announcement logic between ringing cyclesStefanEng86
This patch reverts the change by patch 2263 from old reviewboard. Note that reverting that 2263-patch still preserves the behaviour that the commit log of the 2263-patch claimed to add. The reason for this is: The function wait_for_answer is only called from try_calling which in turn is only called from the main for loop in queue_exec, and earlier in that loop we already check the things that's removed by this patch. There's no need to check those things twice each loop iteration, and I think the proper place to check it is before each ringing cycle. By checking it in wait_for_answer, you allow the issue explained in the jira - that the head caller hears announcements while the agents' sip phones are actively ringing. Reported-by: Stefan Engström Tested-by: Stefan Engström ASTERISK-27216 #close Change-Id: Ic4290dc75256f9743900c6762ee1bb915f672db0
2017-09-23app_stream_echo: Don't echo declined streamsSean Bright
Discovered while experimenting with Cyber Mega Phone 2K Ultimate Dynamic Edition after accepting the audio request but declining the video one. Change-Id: Iaa86d41fccfbc1b559a30ccf740d78a3b5f8a98c
2017-09-19app_confbridge: Only create a channel that records audio.Joshua Colp
This change makes it so that the conference recorder channel that is created only contains audio formats and an audio stream. This is because the underlying application used by ConfBridge to record, MixMonitor, only allows recording audio. Having additional streams (and in particular a video stream) can result in clients needlessly renegotiating to add a video stream that will never receive video. Change-Id: I89d38aedc9205eca7741d5435e73e73bb9de97a0
2017-09-06app_waitforsilence: Cleanup & don't treat missing frames as 'noise'Sean Bright
* WaitForSilence completes successfully if it receives no media in the specified timeout, but when acting as WaitForNoise that logic needs to be reversed. * Use standard argument parsing macros and add some error checking for invalid values. * The documentation indicated that the first argument to both WaitForSilence and WaitForNoise was required when it was not. Update the documentation to reflect that. * Wrap up some behavior in structs to avoid boolean checks all over the place. ASTERISK-24066 #close Reported by: M vd S Change-Id: I01d40adc5b63342bb5018a1bea2081a0aa191ef9
2017-09-01app_directory: Handle a NULL mailbox without crashingSean Bright
ASTERISK-27241 #close Reported by: David Moore Change-Id: Ibbbca85517b04c315406ebfe3b6f7e0763daedc6
2017-08-30AST-2017-006: Fix app_minivm application MinivmNotify command injectionCorey Farrell
An admin can configure app_minivm with an externnotify program to be run when a voicemail is received. The app_minivm application MinivmNotify uses ast_safe_system() for this purpose which is vulnerable to command injection since the Caller-ID name and number values given to externnotify can come from an external untrusted source. * Add ast_safe_execvp() function. This gives modules the ability to run external commands with greater safety compared to ast_safe_system(). Specifically when some parameters are filled by untrusted sources the new function does not allow malicious input to break argument encoding. This may be of particular concern where CALLERID(name) or CALLERID(num) may be used as a parameter to a script run by ast_safe_system() which could potentially allow arbitrary command execution. * Changed app_minivm.c:run_externnotify() to use the new ast_safe_execvp() instead of ast_safe_system() to avoid command injection. * Document code injection potential from untrusted data sources for other shell commands that are under user control. ASTERISK-27103 Change-Id: I7552472247a84cde24e1358aaf64af160107aef1
2017-08-29confbridge: Handle user hangup during name recordingSean Bright
This prevents orphaned CBAnn channels from getting stuck in the bridge. ASTERISK-26994 #close Reported by: James Terhune Change-Id: I5e43e832a9507ec3f2c59752cd900b41dab80457
2017-08-29Merge "app_record: Resolve some absolute vs. relative filename bugs"Jenkins2
2017-08-25voicemail: Fix various abuses of mkstempSean Bright
mkstemp() returns a unique filename, but appending an extension to that filename does not guarantee uniqueness. Instead, use mkdtemp() and we can put whatever extension we want on the files that we create inside the directory. In the case of app_minivm, we also now properly clean up any temporary files that we create. ASTERISK-20858 #close Reported by: Walter Doekes Change-Id: I30ad04f0e115f0b11693ff678ba5184d8b938e43
2017-08-25app_record: Resolve some absolute vs. relative filename bugsSean Bright
If the Record() application is called with a relative filename that includes directories, we were not properly creating the intermediate directories and Record() would fail. Secondarily, updated the documentation for RECORDED_FILE to mention that it does not include a filename extension. Finally, rewrote the '%d' functionality to be a bit more straight forward and less noisy. ASTERISK-16777 #close Reported by: klaus3000 Change-Id: Ibc2640cba3a8c7f17d97b02f76b7608b1e7ffde2
2017-08-25Merge "app_queue: Evaluate realtime queues when running dialplan functions"Jenkins2
2017-08-24app_queue: Evaluate realtime queues when running dialplan functionsSean Bright
ASTERISK-19103 #close Reported by: Jim Van Meggelen Change-Id: I4bd32a9d1fcebb8ac56bff0e084d4f53e31b692b
2017-08-24app_voicemail: Honor escape digits in "greeting only" modeSean Bright
ASTERISK-21241 #close Reported by: Eelco Brolman Patches: Patch uploaded by Eelco Brolman (License 6442) Change-Id: Icbe39b5c82a49b46cf1d168dc17766f3d84f54fe
2017-08-23Merge "app_confbridge: Document sfu video_mode value."Joshua Colp
2017-08-23Merge "confbridge.h: Fix doxygen comments."Jenkins2
2017-08-22app_confbridge: Document sfu video_mode value.Richard Mudgett
Change-Id: I26e17df2c93f3933b23f78070603adbcc84ba204
2017-08-22confbridge.h: Fix doxygen comments.Richard Mudgett
Change-Id: I16133166a85fdb557c66ffcbfe8128d0b4725b0e
2017-08-22app_queue: Fix initial hold time queue statisticSungtae Kim
Fixed to use correct initial value and fixed to use the correct queue info to check the first value. ASTERISK-27204 Change-Id: Ia9e36c828e566e1cc25c66f73307566e4acb8e73
2017-08-07Merge "app_privacy: remove unused header asterisk/image.h"Jenkins2
2017-08-02Fix compile error for old versions of GCC.Corey Farrell
Use -Wno-format-truncation only if supported by compiler. ASTERISK-27171 #close Change-Id: Iac0aed7a5bcaa16c21b7d62c4e4678d244c4ccb6
2017-08-02app_privacy: remove unused header asterisk/image.hCorey Farrell
Change-Id: I56ed530633a642633b18383821069e806c92ae82
2017-08-01Fix compiler warnings on Fedora 26 / GCC 7.Corey Farrell
GCC 7 has added capability to produce warnings, this fixes most of those warnings. The specific warnings are disabled in a few places: * app_voicemail.c: truncation of paths more than 4096 chars in many places. * chan_mgcp.c: callid truncated to 80 chars. * cdr.c: two userfields are combined to cdr copy, fix would break ABI. * tcptls.c: ignore use of deprecated method SSLv3_client_method(). ASTERISK-27156 #close Change-Id: I65f280e7d3cfad279d16f41823a4d6fddcbc4c88
2017-08-01app_queue: Add announce-position-only-up optionSean Bright
Setting this option will cause the Queue application to only announce the caller's position if it has improved since the last time that we announced it. Change-Id: I173a124121422209485b043e2bf784f54242fce6
2017-07-26Merge "bridge_softmix / res_rtp_asterisk: Fix packet loss and renegotiation ↵Joshua Colp
issues."
2017-07-21app_voicemail.c: Allow mailbox entry on authentication retry prompt.Richard Mudgett
The following testsuite voicemail tests were failing to re-enter the mailbox after the first login attempt. tests/apps/voicemail/authenticate_invalid_mailbox tests/apps/voicemail/authenticate_invalid_password The tests were noting the start of the vm-incorrect-mailbox prompt and immediately sending the mailbox for the next login attempt. Since the invalid message playback had to complete before the digits were recognized, the test passed for the wrong reason and added approximately 20 seconds to the test times. * Allow the vm-incorrect-mailbox prompt to get interrupted by the mailbox digits like the initial vm-login prompt so the tests are able to enter the intended mailbox. Change-Id: I1dc53fe917bfe03a4587b2c4cd24c94696a69df8
2017-07-19Merge "app_playback.c: Use the timezonename parameter"George Joseph
2017-07-19bridge_softmix / res_rtp_asterisk: Fix packet loss and renegotiation issues.Joshua Colp
This change does a few things to improve packet loss and renegotiation: 1. On outgoing RTP streams we will now properly reflect out of order packets and packet loss in the sequence number. This allows the remote jitterbuffer to better reorder things. 2. Video updates can now be discarded for a period of time after one has been sent to prevent flooding of clients. 3. For declined and removed streams we will now release any media session resources associated with them. This was not previously done and caused an issue where old state was being used for a new stream. 4. RTP bundling was not actually removing bundled RTP instances from the parent. This has been resolved by removing based on the RTP instance itself and not the SSRC. 5. The code did not properly handle explicitly unbundling an RTP instance from its parent. This now works as expected. ASTERISK-27143 Change-Id: Ibd91362f0e4990b6129638e712bc8adf0899fd45
2017-07-18Merge "app_queue: Add change priority of call"George Joseph
2017-07-14app_confbridge: Make sure name recordings are always removed from the filesystemSergej Kasumovic
This commit fixes two possible scenarios: * When recording name and if during recording you hangup, file is never removed. This is due to the fact file location is nulled. * When recording name and if you hangup during thank-you prompt, file is never removed. ASTERISK-27123 #close Change-Id: I39b7271408b4b54ce880c5111a886aa8f28c2625
2017-07-12app_playback.c: Use the timezonename parameterHolger Hans Peter Freyther
In say_date_generic the timezonename parameter is passed but never used. Fix it by passing it to the ast_localtime function. ASTERISK-27124 Change-Id: I63106b8db10426d417d7275f22554a616e92fae4
2017-07-12Merge "app_stream_echo: misc bug fixes"Joshua Colp
2017-07-12Merge "manager: Remove AMI "Queues" action."Joshua Colp