summaryrefslogtreecommitdiff
path: root/configs
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2007-03-07 22:30:52 +0000
committerRussell Bryant <russell@russellbryant.com>2007-03-07 22:30:52 +0000
commit32e03f9e4a21be12d2703dad8101948fe3510e08 (patch)
tree8d4088c771d6cffda4f94c22688bf0e952b739a3 /configs
parent21b9973d212a13f8be5f418af9e9c6c4b8f73627 (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: https://origsvn.digium.com/svn/asterisk/trunk@58304 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'configs')
-rw-r--r--configs/dundi.conf.sample21
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