summaryrefslogtreecommitdiff
path: root/apps
AgeCommit message (Collapse)Author
2018-01-08app_confbridge: Fix NULL check in action_kick_last.Corey Farrell
The check for last_user == NULL needs to happen before we dereference the variable, previously it was possible for us to check flags of a NULL last_user. Change-Id: I274f737aa8af9d2d53e4a78cdd7ad57561003945
2018-01-06General: Avoid implicit conversion to char when changes value to negative.Alexander Traud
clang 5.0 warned about this. ASTERISK-27557 Change-Id: I7cceaa88e147cbdf81a3a7beec5c1c20210fa41e
2017-12-22Remove as much trailing whitespace as possible.Sean Bright
Change-Id: I873c1c6d00f447269bd841494459efccdd2c19c0
2017-12-22Merge "app_voicemail: Fix file copy error handling." into 13Jenkins2
2017-12-21Merge "Fix Common Typo's." into 13Jenkins2
2017-12-20app_voicemail: Fix file copy error handling.Corey Farrell
Fix error where input/output file descriptors would be closed multiple times. Change-Id: Iba5140b60cb7de79e3d5d92be3c256947aa99da9
2017-12-20Fix Common Typo's.Corey Farrell
Fix instances of: * Retreive * Recieve * other then * different then * Repeated words ("the the", "an an", "and and", etc). * othterwise, teh ASTERISK-24198 #close Change-Id: I3809a9c113b92fd9d0d9f9bac98e9c66dc8b2d31
2017-12-20app_festival: Fix fd leak on connection failure.Corey Farrell
Change-Id: If5efaddcf735ff7d17e55c36cc1388946cee9e0f
2017-12-18app_voicemail: Fix memory management issues.Corey Farrell
* mwi_sub_event_cb: mwist leaked on separate_mailbox failure. * add_email_attachment: A reference to sox_gain_tmpdir was used after the storage was out of scope. Change-Id: I6282c542ff7b82fa091177a912d11234a8b00a30
2017-12-18Merge "aco: Minimize use of regex." into 13Jenkins2
2017-12-18app_transfer: Remove LOCAL from documentation.Joshua Colp
The Local channel has never supported app_transfer from what I can see so remove it from the documentation. ASTERISK-25649 Change-Id: Icbcfe297f6f866285a26b3e9fd5c6d00fa22e0e9
2017-12-15aco: Minimize use of regex.Corey Farrell
Remove nearly all use of regex from ACO users. Still remaining: * app_confbridge has a legitamate use of option name regex. * ast_sorcery_object_fields_register is implemented with regex, all callers use simple prefix based regex. I haven't decided the best way to fix this in both 13/15 and master. Change-Id: Ib5ed478218d8a661ace4d2eaaea98b59a897974b
2017-12-12app_queue: Fix extension state subscriptions removed on dialplan reloadIvan Poddubny
The approach with having a single global subscription to all extension state changes has one issue: dynamically created hints don't have any watchers and are therefore garbage collected on the first dialplan reload. This change creates a state subscription for every queue member with a hint as state_interface, thus increasing the count of watches for hints, so they are not destroyed prematurely anymore. There are 2 side effects: 1. The state change callback in app_queue is not executed when there are no members referring to the extension. 2. The callback is called multiple times for the same hint if it's associated with more than one queue member. Reported by: Steven T. Wheeler ASTERISK-18411 #close Change-Id: I4956af2136ea2a7f110ac9272eae5f6e676d8f89
2017-12-08utils: Add convenience function for setting fd flagsSean Bright
There are many places in the code base where we ignore the return value of fcntl() when getting/setting file descriptior flags. This patch introduces a convenience function that allows setting or clearing file descriptor flags and will also log an error on failure for later analysis. Change-Id: I8b81901e1b1bd537ca632567cdb408931c6eded7
2017-12-04Add new object for VoicemailUserEntrySungtae Kim
Currently, when the app_voicemail sending VoicemailUserEntry AMI event, there's no OldMessageCount info for default. To check the OldMessageCount info, it required IMAP_STORAGE define, but this is not correct. Added OldMessageCount item as a default. ASTERISK-27456 Change-Id: I5c71521c2d1daf8b7b161e31c34d28cca6aea4c7
2017-11-23Merge "Loader: Remove unneeded load_pri declarations." into 13Joshua Colp
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." into 13Jenkins2
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-29app_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-11Merge "app_originate: Set ORIGINATE_STATUS correctly on failure" into 13Jenkins2
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" into 13Jenkins2
2017-09-25build: A few gcc 7 error fixesGeorge Joseph
Change-Id: I7b5300fbf1af7d88d47129db13ad6dbdc9b553ec
2017-09-21app_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-08Merge "app_waitforsilence: Cleanup & don't treat missing frames as 'noise'" ↵Jenkins2
into 13
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" into 13Jenkins2
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
into 13
2017-08-25Merge "app_voicemail: Honor escape digits in "greeting only" mode" into 13Jenkins2
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-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-04app_privacy: remove unused header asterisk/image.hCorey Farrell
Change-Id: I56ed530633a642633b18383821069e806c92ae82
2017-08-03Fix 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-01app_queue: Add priority to AMI QueueStatusNiklas Larsson
Add priority to callers in AMI QueueStatus response ASTERISK-27092 #close Change-Id: I8d1f737a72c7c38f4cfe1a4ee3ecc0a4f85bd199
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