aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_directory.c
AgeCommit message (Collapse)AuthorFilesLines
2010-05-18Merged revisions 263807 via svnmerge from jpeeler1-14/+22
https://origsvn.digium.com/svn/asterisk/trunk ................ r263807 | jpeeler | 2010-05-18 14:27:34 -0500 (Tue, 18 May 2010) | 17 lines Merged revisions 263769 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r263769 | jpeeler | 2010-05-18 13:54:58 -0500 (Tue, 18 May 2010) | 10 lines Modify directory name reading to be interrupted with operator or pound escape. In the case of accidentally entering the wrong first three letters for the reading, users could be very frustrated if the name listing is very long. This allows interrupting the reading by pressing 0 or #. 0 will attempt to execute a configured operator (o) extension and # will exit and proceed in the dialplan. ABE-2200 ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@263809 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-11Merged revisions 251779 via svnmerge from alecdavis1-8/+30
https://origsvn.digium.com/svn/asterisk/trunk ........ r251779 | alecdavis | 2010-03-11 20:03:51 +1300 (Thu, 11 Mar 2010) | 14 lines Add supporting code for app-directory pause option. Since 1.6.1 CLI help reports that option p(n) 'initial pause' is available. Supporting code was never implemented. (closes issue #16751) Reported by: alecdavis Patches: directory_pause.trunk.diff.txt uploaded by alecdavis (license 585) Tested by: alecdavis Review: https://reviewboard.asterisk.org/r/481/ ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@251820 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-02Merged revisions 249950 via svnmerge from lmadsen1-2/+3
https://origsvn.digium.com/svn/asterisk/trunk ........ r249950 | lmadsen | 2010-03-02 14:49:48 -0500 (Tue, 02 Mar 2010) | 4 lines Fix literal values wrapped in documentation. (closes issue #16145) Reported by: tilghman ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@249953 f38db490-d61c-443f-a65b-d21fe96a405b
2009-12-15Merged revisions 234893 via svnmerge from alecdavis1-2/+2
https://origsvn.digium.com/svn/asterisk/trunk ........ r234893 | alecdavis | 2009-12-15 15:29:50 +1300 (Tue, 15 Dec 2009) | 9 lines fixes escape to extensions 'o' and 'a', for digits '0' and '*' (closes issue #16437) Reported by: alecdavis Tested by: alecdavis Patch extension_o_a_fix.diff.txt uploaded by alecdavis (license 585) ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@234896 f38db490-d61c-443f-a65b-d21fe96a405b
2009-12-15Merged revisions 234855 via svnmerge from alecdavis1-1/+1
https://origsvn.digium.com/svn/asterisk/trunk ........ r234855 | alecdavis | 2009-12-15 13:54:44 +1300 (Tue, 15 Dec 2009) | 9 lines ast_stream_and_wait(chan,dir-usingkeypad) didn't capture the dialled DTMF. (closes issue #16409) Reported by: alecdavis Tested by: alecdavis Patch bug_16409.diff.txt uploaded by alecdavis (license 585) ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@234890 f38db490-d61c-443f-a65b-d21fe96a405b
2009-09-24Merged revisions 219987 via svnmerge from tilghman1-0/+5
https://origsvn.digium.com/svn/asterisk/trunk ........ r219987 | tilghman | 2009-09-24 02:39:44 -0500 (Thu, 24 Sep 2009) | 8 lines Fix two possible crashes, one only in 1.6.1 and one in 1.6.1 forward. (closes issue #15739) Reported by: DLNoah, jeffg Patches: 20090914__issue15739.diff.txt uploaded by tilghman (license 14) 20090922__issue15739.diff.txt uploaded by tilghman (license 14) Tested by: DLNoah, jeffg ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@219989 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-17Merged revisions 165255 via svnmerge from mmichelson1-0/+3
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r165255 | mmichelson | 2008-12-17 14:51:38 -0600 (Wed, 17 Dec 2008) | 7 lines Fix some memory leaks found while looking at how realtime configs are handled. Also cleaned up some coding guidelines violations in app_realtime.c, mostly related to spacing ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@165318 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-01Merge changes from team/group/appdocsxmlrussell1-44/+72
This commit introduces the first phase of an effort to manage documentation of the interfaces in Asterisk in an XML format. Currently, a new format is available for applications and dialplan functions. A good number of conversions to the new format are also included. For more information, see the following message to asterisk-dev: http://lists.digium.com/pipermail/asterisk-dev/2008-October/034968.html git-svn-id: http://svn.digium.com/svn/asterisk/trunk@153365 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-30Pay attention to the searchcontexts entry in voicemail.conf (related to AST-125)tilghman1-58/+92
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@152727 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-29If there was no named defined in a voicemail.conf mailboxmmichelson1-0/+4
entry, then app_directory would crash when attempting to read that entry from the file. We now check for the NULL or empty string properly so that there will be no crash. (closes issue #13804) Reported by: bluecrow76 git-svn-id: http://svn.digium.com/svn/asterisk/trunk@152646 f38db490-d61c-443f-a65b-d21fe96a405b
2008-09-12Create a new config file status, CONFIG_STATUS_FILEINVALID for differentiatingtilghman1-1/+7
when a file is invalid from when a file is missing. This is most important when we have two configuration files. Consider the following example: Old system: sip.conf users.conf Old result New result ======== ========== ========== ========== Missing Missing SIP doesn't load SIP doesn't load Missing OK SIP doesn't load SIP doesn't load Missing Invalid SIP doesn't load SIP doesn't load OK Missing SIP loads SIP loads OK OK SIP loads SIP loads OK Invalid SIP loads incompletely SIP doesn't load Invalid Missing SIP doesn't load SIP doesn't load Invalid OK SIP doesn't load SIP doesn't load Invalid Invalid SIP doesn't load SIP doesn't load So in the case when users.conf doesn't load because there's a typo that disrupts the syntax, we may only partially load users, instead of failing with an error, which may cause some calls not to get processed. Worse yet, the old system would do this with no indication that anything was even wrong. (closes issue #10690) Reported by: dtyoo Patches: 20080716__bug10690.diff.txt uploaded by Corydon76 (license 14) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@142992 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-10More RSW merges. Everything from apps/ except for the big offendersseanbright1-5/+5
app_voicemail and app_queue. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@137055 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-19Older versions of GNU gcc do not allow 'NULL' as sentinel.mvanbaak1-1/+1
They want (char *)NULL as sentinel. An example is OpenBSD (confirmed on 4.3) that ships with gcc 3.3.4 This commit introduces a contstant SENTINEL which is declared as: #define SENTINEL ((char *)NULL) All places I could test compile on my openbsd system are converted. Update CODING-GUIDELINES to tell about this constant. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@124127 f38db490-d61c-443f-a65b-d21fe96a405b
2008-04-29Make app_directory dependent on app_voicemail. This is because the functionmmichelson1-0/+3
which says the person's name is handled inside app_voicemail now. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@114841 f38db490-d61c-443f-a65b-d21fe96a405b
2008-04-29Since there is now a globally available function for saying someone's name, ↵mmichelson1-167/+1
a LOT of functions in app_directory can be removed since the ODBC-specific lookups are accomplished within app_voicemail. This change greatly reduces the amount of lines in app_directory that were solely for the purpose of looking up a name when ODBC_STORAGE is specified for voicemail. This commit also makes the name-saying interruptable via DTMF. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@114834 f38db490-d61c-443f-a65b-d21fe96a405b
2008-04-29Fix a crash happening in app_directory. This crash would occur if a ↵mmichelson1-4/+2
users.conf existed. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@114832 f38db490-d61c-443f-a65b-d21fe96a405b
2008-04-15If somebody enters a digit during ast_stream_and_wait, the return value is ↵qwell1-5/+14
the digit, which we need to use later. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@114149 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-20Upgrade the sounds version; add several directory enhancements:tilghman1-27/+112
1) Number of digits to enter can now be configured 2) The digits can now match on both first AND last name, instead of only one or the other (Closes issue #7151) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@110237 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-09whitespace fixes only.mvanbaak1-17/+17
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@103249 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-14Big improvement for app_directory. This patch breaks the do_directory ↵mmichelson1-397/+383
function up so that it is more easily parsed by the human brain. It also fixes some errors. I'll quote dimas from the original bug description: "app_directory contained some duplicate code even before addition of 'm' option. Addition of that option doubled amount of that code. Worst of all, there are minor differences between these code block and bugs caused by these differences. 1. There is a memory leak. In the 'menu' mode, result of the convert(pos) function is not freed while it should be. 2. In the 'menu' mode check for OPT_LISTBYFIRSTNAME flag ('f' option) is not negated as result, application works in the mode opposite to what user expect (checking last name when user wants the first nd vice versa). 3. select_item function plays message for user using res = func1() || func2() || func3()... construct. This construct loses the actual value returned by ast_waitstream() for example so at the end, res does not contain digit user dialed while listening to the message. 4. (also in 1.4) application announces entries from voicemail.conf/realtime separately from entries from users.conf. I see no reason why doing so instead of building combined list. 5. Alot of duplicated code as already mentioned." This was tested by dimas and I (I tested under valgrind). A word of caution: any bug fixes that happen in app_directory in 1.4 will almost certainly not merge cleanly into trunk as a result of this, but it is well worth it. Huge thanks to dimas for this wonderful submission. (closes issue #11744) Reported by: dimas Patches: dir3.patch uploaded by dimas (license 88) Tested by: putnopvut, dimas git-svn-id: http://svn.digium.com/svn/asterisk/trunk@98888 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-05Resolve compiler warnings.russell1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@91193 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-05Added multiple name listing. (Closes issue #10413)tilghman1-105/+268
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@91172 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-22more removal of redundant headersrizzo1-4/+0
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89519 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-20move asterisk/paths.h outside asterisk.h and into those filesrizzo1-0/+1
who really need it. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89466 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-19more errno.h removalrizzo1-1/+0
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89432 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-19include "logger.h" and errno.h from asterisk.h - usage shows that theyrizzo1-1/+0
were included almost everywhere. Remove some of the instances. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89424 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-16Start untangling header inclusion in a way that does not affectrizzo1-3/+0
build times - tested, there is no measureable difference before and after this commit. In this change: use asterisk/compat.h to include a small set of system headers: inttypes.h, unistd.h, stddef.h, stddint.h, sys/types.h, stdarg.h, stdlib.h, alloca.h, stdio.h Where available, the inclusion is conditional on HAVE_FOO_H as determined by autoconf. Normally, source files should not include any of the above system headers, and instead use either "asterisk.h" or "asterisk/compat.h" which does it better. For the time being I have left alone second-level directories (main/db1-ast, etc.). git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89333 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-14make the 'name' and 'value' fields in ast_variable const char *rizzo1-2/+2
This prevents modifying the strings in the stored variables, and catched a few instances where this was actually done. Given the differences between trunk and 1.4 (and the fact that this is effectively an API change) it is better to fix 1.4 independently. These are chan_sip.c::sip_register() chan_skinny.c:: near line 2847 config.c:: near line 1774 logger.c::make_components() res_adsi.c:: near line 1049 I may have missed some instances for modules that do not build here. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89268 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-29This code was in team/murf/bug8684-trunk; it should fix bug 8684 in trunk. I ↵murf1-2/+2
didn't add it to 1.4 yet, because it's not entirely clear to me if this is a bug fix or an enhancement. A lot of files were affected by small changes like ast_variable_new getting an added arg, for the file name the var was defined in; ast_category_new gets added args of filename and lineno; ast_category and ast_variable structures now record file and lineno for each entry; a list of all #include and #execs in a config file (or any of its inclusions are now kept in the ast_config struct; at save time, each entry is put back into its proper file of origin, in order. #include and #exec directives are folded in properly. Headers indicating that the file was generated, are generated also for each included file. Some changes to main/manager.c to take care of file renaming, via the UpdateConfig command. Multiple inclusions of the same file are handled by exploding these into multiple include files, uniquely named. There's probably more, but I can't remember it right now. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@81361 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-16Don't reload a configuration file if nothing has changed.tilghman1-3/+6
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@79747 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-07Merged revisions 78415 via svnmerge from tilghman1-15/+34
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r78415 | tilghman | 2007-08-07 14:09:38 -0500 (Tue, 07 Aug 2007) | 2 lines Reconnection doesn't happen automatically when a DB goes down (fixes issue #9389) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@78417 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-31Mostly cleanup of documentation to substitute the pipe with the comma, but a ↵tilghman1-1/+1
few other formatting cleanups, too. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@77808 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-20Merged revisions 76139 via svnmerge from mmichelson1-3/+9
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r76139 | mmichelson | 2007-07-20 13:42:27 -0500 (Fri, 20 Jul 2007) | 6 lines When using users.conf for the entries in the directory, if multiple users had the same last name, only the first user listed would be available in the directory. (closes issue #10200, reported by mrskippy, patched by me) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76140 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-16Applications no longer need to call ast_module_user_add and ↵file1-5/+0
ast_module_user_remove. This is now taken care of in the pbx_exec function outside of the application. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@75200 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-14Convert uses of strdup() to ast_strdup()russell1-1/+1
(issue #9983, eliel) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@69436 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-11Merged revisions 68781 via svnmerge from tilghman1-5/+1
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r68781 | tilghman | 2007-06-11 15:45:53 -0500 (Mon, 11 Jun 2007) | 2 lines Issue 9947 - fn2 was unused / incorrectly used ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@68782 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-06Issue 9869 - replace malloc and memset with ast_calloc, and other coding ↵tilghman1-6/+6
guidelines changes git-svn-id: http://svn.digium.com/svn/asterisk/trunk@67864 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-09Merged revisions 63566 via svnmerge from tilghman1-2/+2
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r63566 | tilghman | 2007-05-09 09:50:33 -0500 (Wed, 09 May 2007) | 10 lines Merged revisions 63565 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r63565 | tilghman | 2007-05-09 09:48:06 -0500 (Wed, 09 May 2007) | 2 lines Replicate fix from 51158 (app_voicemail) to app_directory (Issue 9224) ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@63567 f38db490-d61c-443f-a65b-d21fe96a405b
2007-04-09Merged revisions 60936 via svnmerge from qwell1-1/+1
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r60936 | qwell | 2007-04-09 12:22:59 -0500 (Mon, 09 Apr 2007) | 13 lines Merged revisions 60935 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r60935 | qwell | 2007-04-09 12:22:15 -0500 (Mon, 09 Apr 2007) | 5 lines Allow matching on names shorter than 3 chars. This also fixes the case where somebody wants to match on less then 3 chars. Issue 9071 ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@60937 f38db490-d61c-443f-a65b-d21fe96a405b
2007-03-27Merged revisions 59278 via svnmerge from russell1-3/+3
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r59278 | russell | 2007-03-27 18:20:22 -0500 (Tue, 27 Mar 2007) | 11 lines Merged revisions 59277 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r59277 | russell | 2007-03-27 18:19:41 -0500 (Tue, 27 Mar 2007) | 3 lines Fix the check of the return value from mmap(). Thanks to Corydon for catching this one. ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@59279 f38db490-d61c-443f-a65b-d21fe96a405b
2007-03-27Merged revisions 59275 via svnmerge from russell1-10/+14
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r59275 | russell | 2007-03-27 18:16:27 -0500 (Tue, 27 Mar 2007) | 3 lines Fix app_directory to actually compile with ODBC_STORAGE, and update the code to the latest res_odbc API. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@59276 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-21a quick fix to app_sms.c to get rid of cursed compiler warnings so I can ↵murf1-1/+1
compile under --enable-dev-mode git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48767 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-17This update fulfils the request of bug 7109, which claimed the language arg ↵murf1-5/+5
to ast_stream_and_wait() was redundant. Almost all calls just used chan->language, and seeing how chan is the first argument, this certainly seems redundant. A change of language could just as easily be done by simply changing the channel language before calling. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@47821 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-20Constify the result of a config retrieval function, to avoid mutilation ↵tilghman1-5/+7
(issue 7983). git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43364 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-17Merged revisions 43072 via svnmerge from tilghman1-2/+2
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r43072 | tilghman | 2006-09-17 08:54:34 -0500 (Sun, 17 Sep 2006) | 3 lines Directory used the wrong context for delivery of 0- and *- keypresses (according to Directory's own documentation) - Issue 7965 ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43075 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-16merge markster's usersconf branch with some slight changeskpfleming1-4/+60
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43052 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-21merge new_loader_completion branch, including (at least):kpfleming1-19/+7
- restructured build tree and makefiles to eliminate recursion problems - support for embedded modules - support for static builds - simpler cross-compilation support - simpler module/loader interface (no exported symbols) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@40722 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-19Fix a bug with app_voicemail when trying to use app_directory to leave messagesqwell1-10/+19
to another user (options 3, 5, 2). If the context/extension didn't exist in the dialplan (and why should it have to?), it would fail, saying that it's an "invalid extension". (issue BE-71) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@40426 f38db490-d61c-443f-a65b-d21fe96a405b
2006-06-30Merged revisions 36377 via svnmerge from tilghman1-0/+134
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r36377 | tilghman | 2006-06-30 09:05:53 -0500 (Fri, 30 Jun 2006) | 5 lines Bug 7349 - Directory did not work correctly when USE_ODBC_STORAGE was defined. Note: Russell agreed that this should have worked, which is why this is classified as a bugfix. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@36380 f38db490-d61c-443f-a65b-d21fe96a405b
2006-06-07simplify autoconfig include mechanism (make tholo happy he can use lint ↵kpfleming1-4/+4
again :-) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@32846 f38db490-d61c-443f-a65b-d21fe96a405b