summaryrefslogtreecommitdiff
path: root/pbx/pbx_dundi.c
AgeCommit message (Collapse)Author
2007-03-07Add the ability to dynamically specify weights for responses to DUNDi queries.Russell Bryant
This can be done using a global variable or a dialplan function. Using the SHELL() function will allow you to use an external script to determine what the weight in the response should be. This can be very useful in load balancing applications. (inspired by discussions with blitzrage and jsmith in #asterisk-bugs) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@58304 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-28Convert the PBX core to use read/write locks. This yields a nifty ↵Joshua Colp
performance improvement when it comes to simultaneous calls going through the dialplan. Using murf's test the old mutex based core took an average of 57.3 seconds while the rwlock based core took 31.1 seconds. That's a nifty 26.2 seconds performance improvement. The other good part is that if we do need to switch back then we just have to change the lock/unlock API calls. I converted everywhere that used to touch the mutex locks directly to use them. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@57184 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-31Merged revisions 53046 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r53046 | russell | 2007-01-31 15:32:08 -0600 (Wed, 31 Jan 2007) | 11 lines Merged revisions 53045 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r53045 | russell | 2007-01-31 15:25:11 -0600 (Wed, 31 Jan 2007) | 3 lines Fix a bunch of places where pthread_attr_init() was called, but pthread_attr_destroy() was not. ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@53047 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-05const-ify some more APIs, and fix rev 49710 from branch-1.4 in a better way hereKevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@49711 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-06Staticize one, and Constify a bunch of usage strings for CLI commands.Russell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48303 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-10Fine, take this.Joshua Colp
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47465 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-10Hello compiler working, goodbye compiler warning. (fix compiler warning ↵Joshua Colp
introduced from pbx_dundi optimizations) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47461 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-10Various little bits of code cleanup to reduce nesting, remove useless casts,Russell Bryant
and to remove a duplicated error message after a memory allocation error git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47410 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-05Make pbx_dundi compile again. Sorry. :(Russell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47213 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-04use the AST_MODULE_LOAD_* return codes from load_module()Russell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47207 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-04simplify a couple of loopsRussell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47206 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-04Do some minor cleanup to the section of code that sets the EID by getting theRussell Bryant
mac address for an ethernet interface git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47204 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-01Add the ability to pass options to the Dial application when using the DUNDiRussell Bryant
switch in the dialplan by setting the DUNDIDIALARGS channel variable. (issue #8084, patch by bluecrow76, with small modifications and documentation updates) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46781 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-12put flags in an enum and remove a couple of unused definesRussell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44944 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-04Merged revisions 44378 via svnmerge from Kevin P. Fleming
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r44378 | kpfleming | 2006-10-04 14:47:22 -0500 (Wed, 04 Oct 2006) | 4 lines update thread creation code a bit reduce standard thread stack size slightly to allow the pthreads library to allocate the stack+data and not overflow a power-of-2 allocation in the kernel and waste memory/address space add a new stack size for 'background' threads (those that don't handle PBX calls) when LOW_MEMORY is defined ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44379 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-03bug #8076 check option_debug before printing to debug channel.Matt O'Gorman
patch provided in bugnote, with minor changes. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44253 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-18merge qwell's CLI verbification workKevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43212 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-31everything that loads a config that needs a config file to runMatt O'Gorman
now reports AST_MODULE_LOAD_DECLINE when loading if config file is not there, also fixed an error in res_config_pgsql where it had a non static function when it should. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41633 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-21merge new_loader_completion branch, including (at least):Kevin P. Fleming
- 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: https://origsvn.digium.com/svn/asterisk/trunk@40722 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-21Merge a new implementation of ast_inet_ntoa, our thread safe replacement forRussell Bryant
inet_ntoa, which uses thread specific data (aka thread local storage) instead of stack allocatted buffers to store the result. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38042 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-07simplify autoconfig include mechanism (make tholo happy he can use lint ↵Kevin P. Fleming
again :-) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32846 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-10remove almost all of the checks of the result from ast_strdupa() or alloca().Russell Bryant
As it turns out, all of these checks were useless, because alloca will never return NULL. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26451 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-07- use ast_calloc instead of malloc+memsetRussell Bryant
- conver one malloc to ast_malloc git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25356 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-02staticize the list heads from my recent conversions to list macrosRussell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24139 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-01- convert permission lists to use list macrosRussell Bryant
- remove unused precachesend and precachereceive variables from dundi_peer This concludes the visit to pbx_dundi ... git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23831 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-01conver the lists of dundi packets to use the list macrosRussell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23810 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-01- convert the dundi precache list to use the list macrosRussell Bryant
- change an instance of malloc+memset to ast_calloc git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23808 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30- convert the lists of dundi_transactions to the list macrosRussell Bryant
- remove an unused variable, keypending, from the dundi_peer struct git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23769 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30remove unneeded define - it is already in asterisk.hRussell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23494 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30convert the dundi_request list to use the list macrosRussell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23493 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30convert existing comments to doxygen formatRussell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23492 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30fix indentation for this functionRussell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23491 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30immediately handle ast_strdupa result so that one more level of indentationRussell Bryant
can be removed from this function git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23490 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30fix the indentation of a large blockRussell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23489 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30handle a memory allocation failure immediately so the following large blockRussell Bryant
does not have to be indented git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23480 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30- convert the list of dundi mappings to use the list macrosRussell Bryant
- change an instance of malloc+memset to use ast_calloc, instead git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23468 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30change a list traversal to use a for loopRussell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23466 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30fix the indentation of a large block of codeRussell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23465 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30immediately handle a memory allocation failure so the rest of the functionRussell Bryant
doesn't have to be indented (indentation still to be fixed) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23464 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30- convert some comments to doxygen formatRussell Bryant
- convert the list of dundi peers to use the list macros - convert a use of malloc+memset to use ast_calloc git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23463 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-29add a small optimization for deleting all the members of a listRussell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23271 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-24Thanks to the fine work of Russell Bryant and Dancho Lazarov, we now have ↵Kevin P. Fleming
autoconf and menuselect tools for Asterisk! git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22267 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-14This rather large commit changes the way modules are loaded. Luigi Rizzo
As partly documented in loader.c and include/asterisk/module.h, modules are now expected to return all of their methods and flags into a structure 'mod_data', and are normally loaded with RTLD_NOW | RTLD_LOCAL, so symbols are resolved immediately and conflicts should be less likely. Only in a small number of cases (res_*, typically) modules are loaded RTLD_GLOBAL, so they can export symbols. The core of the change is only the two files loader.c and include/asterisk/module.h, all the rest is simply adaptation of the existing modules to the new API, a rather mechanical (but believe me, time and finger-consuming!) process whose detail you can figure out by svn diff'ing any single module. Expect some minor compilation issue after this change, please report it on mantis http://bugs.digium.com/view.php?id=6968 so we collect all the feedback in one place. I am just sorry that this change missed SVN version number 20000! git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20003 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-08since the module API is changing, it's a good time to const-ify the ↵Kevin P. Fleming
description() and key() return values git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18552 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-05Bug 6873 - Finish moving from the non-threadsafe (and poor randomness) ↵Tilghman Lesher
rand() to threadsafe ast_random() git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17627 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-30as discussed with Mark a few weeks ago, the 'newstack' argumentLuigi Rizzo
in pbx_exec is always 1 so it can be removed. This change also takes away ast_exec_extension(), and lets all switch functions (exists, canmatch, exec, matchmore) all use the same prototype, which makes the code a bit cleaner. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16558 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-28- remove an unnecessary cast and recomputation of (timeout - now);Luigi Rizzo
- remove useless recomputations of strlen(word) in a loop, and normalize the form of complete_peer_helper(); - move LOCAL_USER_ADD() to after the verification of arguments, thus removing the need for one LOCAL_USER_REMOVE() call. The three chunks of the patch are fully disjoint. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15581 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-23add 'consumed' argument to ast_get_time_t, so callers can know how many ↵Kevin P. Fleming
characters were used in the parser update pbx_dundi to use ast_get_time_t eliminate some compiler warnings git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10871 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-23Fix a few compile warnings (turned errors) and disable -Werror on the Mark Spencer
normal build. If people want this they can turn it on, and don't anyone turn it on by default until you fix building on GCC 4.x git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10842 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-15remove the uses of the deprecated STANDARD_LOCAL_USERRussell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10241 65c4cc65-6c06-0410-ace0-fbb531ad65f3