diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-03-07 22:30:52 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-03-07 22:30:52 +0000 |
commit | 37371ea446a869461a4b9511a1cfcdd316c92627 (patch) | |
tree | 8d4088c771d6cffda4f94c22688bf0e952b739a3 /configs/dundi.conf.sample | |
parent | ad62ae0f76479d764136eb88fbc9ebb42c5407f4 (diff) |
Add the ability to dynamically specify weights for responses to DUNDi queries.
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: http://svn.digium.com/svn/asterisk/trunk@58304 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'configs/dundi.conf.sample')
-rw-r--r-- | configs/dundi.conf.sample | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/configs/dundi.conf.sample b/configs/dundi.conf.sample index a1e999726..4b7f15617 100644 --- a/configs/dundi.conf.sample +++ b/configs/dundi.conf.sample @@ -125,8 +125,27 @@ autokill=yes ;digexten => default,0,IAX2,guest@lappy/${NUMBER} ;asdf => - ; +; Weights for mappings can be set a few different ways: +; +; 1) It can be set as a static number. +;testmap1 => context1,222,IAX2,guest@peer1/${NUMBER} +; +; 2) It can be an Asterisk global variable. +;testmap2 => context2,${DUNDITESTVAR},IAX2,guest@peer2${NUMBER} +; +; 3) It can be retrieved using a dialplan function. This can be extremely +; useful if you want to let an external script decide what the weight +; in a response shouuld be. +;testmap3 => context3,${SHELL(echo 123)},IAX2,guest@peer3/${NUMBER} +; +; Note than when using a global variable or dialplan function to set the +; weight for a mapping, that response caching should be disabled if you +; plan for these values to change frequently at all. If the results are +; cached, then any change in value will not take effect until the cache +; has expired. +; + ; ; The remaining sections represent the peers ; that we fundamentally trust. The section name |