Debian Codegraph @

configs/samples/dundi.conf.sample

raw
1 ;
2 ; DUNDi configuration file
3 ;
4 ; For more information about DUNDi, see http://www.dundi.com
5 ;
6 ;
7 [general]
8 ;
9 ; The "general" section contains general parameters relating
10 ; to the operation of the dundi client and server.
11 ;
12 ; The first part should be your complete contact information
13 ; should someone else in your peer group need to contact you.
14 ;
15 ;department=Your Department
16 ;organization=Your Company, Inc.
17 ;locality=Your City
18 ;stateprov=ST
19 ;country=US
20 ;[email protected]
21 ;phone=+12565551212
22 ;
23 ;
24 ; Specify bind address. IPv6 addresses are accepted. Default is 0.0.0.0
25 ; You can specify 'bindaddr2' to bind to another address however
26 ; 'bindaddr and 'bindaddr2' need to be different IP protocols.
27 ; Specify port number. Default is 4520.
28 ;
29 ;bindaddr=0.0.0.0
30 ;port=4520
31 ;
32 ; See https://docs.asterisk.org/Configuration/Channel-Drivers/IP-Quality-of-Service for a description of the tos parameter.
33 ;tos=ef
34 ;
35 ; Our entity identifier. (It should generally be the MAC address of the
36 ; machine it's running on. Defaults to the first eth address, but you
37 ; can override it here, as long as you set it to the MAC of *something*
38 ; you own!) The EID can be overridden by a setting in asterisk.conf
39 ; or by setting this option.
40 ;
41 ;entityid=00:07:E9:3B:76:60
42 ;
43 ; Peers shall cache our query responses for the specified time
44 ; in seconds. Default is 3600.
45 ;
46 ;cachetime=3600
47 ;
48 ; This defines the max depth (hops) in which to search the DUNDi system.
49 ; Note that the maximum time that we will wait for a response is
50 ; (2000 + 200 * ttl) ms.
51 ;
52 ttl=32
53 ;
54 ; If we don't get ACK to our DPDISCOVER within 2000ms and autokill is set
55 ; to yes then we cancel the whole thing (that's enough time for one
56 ; retransmission only). This is used to keep things from stalling for a long
57 ; time for a host that is not available, but would be ill advised for bad
58 ; connections. In addition to 'yes' or 'no' you can also specify a number
59 ; of milliseconds. See 'qualify' for individual peers to turn on for just
60 ; a specific peer.
61 ;
62 autokill=yes
63 ;
64 ; pbx_dundi creates a rotating key called "secret", under the family
65 ; 'secretpath'. The default family is dundi (resulting in
66 ; the key being held at dundi/secret).
67 ;
68 ;secretpath=dundi
69 ;
70 ; The 'storehistory' option (also changeable at runtime with
71 ; 'dundi store history on' and 'dundi store history off') will
72 ; cause the DUNDi engine to keep track of the last several
73 ; queries and the amount of time each query took to execute
74 ; for the purpose of tracking slow nodes. This option is
75 ; off by default due to performance impacts.
76 ;
77 ;storehistory=yes
78 ;
79 ; Channel technology to use for outgoing calls using SIP (Session Initiation Protocol).
80 ; Options are 'SIP' for chan_sip and 'PJSIP' for chan_pjsip. Default is 'PJSIP'.
81 ; If specified, all outgoing SIP calls using DUNDi will use the specified channel tech.
82 ;
83 ;outgoing_sip_tech=pjsip
84 ;
85 ; Name of endpoint from pjsip.conf to use for outgoing calls from this system,
86 ; when using the PJSIP technology to complete a call to a SIP-based destination.
87 ; (Required for PJSIP, since PJSIP calls must specify an endpoint explicitly).
88 ;
89 ;pjsip_outgoing_endpoint=outgoing
90
91 [mappings]
92 ;
93 ; The "mappings" section maps DUNDi contexts
94 ; to contexts on the local asterisk system. Remember
95 ; that numbers that are made available under the e164
96 ; DUNDi context are regulated by the DUNDi General Peering
97 ; Agreement (GPA) if you are a member of the DUNDi E.164
98 ; Peering System.
99 ;
100 ; dundi_context => [local_context,weight,tech,dest{,options}]
101 ;
102 ; 'dundi_context' is the name of the context being requested
103 ; within the DUNDi request
104 ;
105 ; 'local_context' is the name of the context on the local system
106 ; in which numbers can be looked up for which responses shall be given.
107 ;
108 ; 'weight' is the weight to use for the responses provided from this
109 ; mapping. The number must be >= 0 and < 60000. Since it is totally
110 ; valid to receive multiple responses to a query, responses received
111 ; with a lower weight are tried first. Note that the weight has a
112 ; special meaning in the e164 context - see the GPA for more details.
113 ;
114 ; 'tech' is the technology to use (IAX2, SIP, H323)
115 ;
116 ; 'dest' is the Dial application's channel technology resource destination
117 ; to supply for reaching that number. The following variables can be used
118 ; in the destination string and will be automatically substituted:
119 ; ${NUMBER}: The number being requested
120 ; ${IPADDR}: The IP address to connect to
121 ; ${SECRET}: The current IAX2 rotating secret key to be used
122 ;
123 ; Further options may include:
124 ;
125 ; nounsolicited: No unsolicited calls of any type permitted via this
126 ; route
127 ; nocomunsolicit: No commercial unsolicited calls permitted via
128 ; this route
129 ; residential: This number is known to be a residence
130 ; commercial: This number is known to be a business
131 ; mobile: This number is known to be a mobile phone
132 ; nocomunsolicit: No commercial unsolicited calls permitted via
133 ; this route
134 ; nopartial: Do not search for partial matches
135 ;
136 ; There *must* exist an entry in mappings for DUNDi to respond
137 ; to any request, although it may be empty.
138 ;
139 ;empty_context =>
140 ;
141 ;e164 => dundi-e164-canonical,0,IAX2,dundi:${SECRET}@${IPADDR}/${NUMBER},nounsolicited,nocomunsolicit,nopartial
142 ;e164 => dundi-e164-customers,100,IAX2,dundi:${SECRET}@${IPADDR}/${NUMBER},nounsolicited,nocomunsolicit,nopartial
143 ;e164 => dundi-e164-via-pstn,400,IAX2,dundi:${SECRET}@${IPADDR}/${NUMBER},nounsolicited,nocomunsolicit,nopartial
144 ;
145 ;digexten => default,0,IAX2,guest@lappy/${NUMBER}
146
147 ;
148 ; Weights for mappings can be set a few different ways:
149 ;
150 ; 1) It can be set as a static number.
151 ;testmap1 => context1,222,IAX2,guest@peer1/${NUMBER}
152 ;
153 ; 2) It can be an Asterisk global variable.
154 ;testmap2 => context2,${DUNDITESTVAR},IAX2,guest@peer2${NUMBER}
155 ;
156 ; 3) It can be retrieved using a dialplan function. This can be extremely
157 ; useful if you want to let an external script decide what the weight
158 ; in a response should be.
159 ;testmap3 => context3,${SHELL(echo 123)},IAX2,guest@peer3/${NUMBER}
160 ;
161 ; The built in variables ${SECRET}, ${IPADDR} and ${NUMBER} can also be
162 ; passed to the weight. For example, you could pass the ${NUMBER} value
163 ; to your SHELL() script and use that to dynamically return a weight.
164 ;
165 ; Note when using a global variable or dialplan function to set the
166 ; weight for a mapping that response caching should be disabled if you
167 ; plan for these values to change frequently at all. If the results are
168 ; cached then any change in value will not take effect until the cache
169 ; has expired.
170 ;
171
172 ;
173 ; The remaining sections represent the peers that we fundamentally trust.
174 ; The section name specifies the peer's entityid. You can specify which
175 ; DUNDi contexts with which you want the trust to be established.
176 ;
177 ; inkey - What key they will be authenticating to us with
178 ;
179 ; outkey - What key we use to authenticate to them
180 ;
181 ; host - What their host is (DNS name, IP address, or dynamic)
182 ;
183 ; port - The port where their host is listening (default: 4520)
184 ;
185 ; ustothem - Explicitly specify the entityid we use with this peer.
186 ;
187 ; order - What search order to use. May be 'primary', 'secondary',
188 ; 'tertiary' or 'quartiary'. In large systems, it is beneficial
189 ; to only query one up-stream host in order to maximize caching
190 ; value. Adding one with primary and one with secondary gives you
191 ; redundancy without sacrificing performance.
192 ;
193 ; include - Includes this peer when searching a particular context
194 ; for lookup (set "all" to perform all lookups with that
195 ; host. This is also the context in which peers are permitted
196 ; to precache.
197 ;
198 ; noinclude - Excludes this peer when searching a particular context
199 ; for lookup (set "all" to perform no lookups with that
200 ; host.
201 ;
202 ; permit - Permits this peer to search a given DUNDi context on
203 ; the local system. Set "all" to permit this host to
204 ; lookup all contexts. This is also a context for which
205 ; we will create/forward PRECACHE commands.
206 ;
207 ; deny - Denies this peer to search a given DUNDi context on
208 ; the local system. Set "all" to deny this host to
209 ; lookup all contexts.
210 ;
211 ; model - inbound, outbound, or symmetric for whether we receive
212 ; requests only, transmit requests only, or do both.
213 ;
214 ; precache - Utilize/Permit precaching with this peer (to pre
215 ; cache means to provide an answer when no request
216 ; was made and is used so that machines with few
217 ; routes can push those routes up to a higher level).
218 ; outgoing means we send precache routes to this peer,
219 ; incoming means we permit this peer to send us
220 ; precache routes. symmetric means we do both.
221 ;
222 ; Note: You cannot mix symmetric/outbound model with symmetric/inbound
223 ; precache, nor can you mix symmetric/inbound model with symmetric/outbound
224 ; precache.
225 ;
226 ; qualify - Enable qualifying the peer to determine reachable status.
227 ; Set to yes, no, or number of milliseconds for qualifying
228 ; the peer's reachable status.
229 ;
230 ; register - Enable registering with the peer. This presupposes that the
231 ; peer's host option for us is dynamic. (yes/no value)
232 ;
233 ; The '*' peer is special and matches an unspecified entity
234 ;
235
236 ;
237 ; Sample Primary e164 DUNDi peer
238 ;
239 ;[00:50:8B:F3:75:BB]
240 ;model = symmetric
241 ;host = 64.215.96.114
242 ;inkey = digium
243 ;outkey = misery
244 ;include = e164
245 ;permit = e164
246 ;qualify = yes
247
248 ;
249 ; Sample Secondary e164 DUNDi peer
250 ;
251 ;[00:A0:C9:96:92:84]
252 ;model = symmetric
253 ;host = misery.digium.com
254 ;inkey = misery
255 ;outkey = ourkey
256 ;include = e164
257 ;permit = e164
258 ;qualify = yes
259 ;order = secondary
260
261 ;
262 ; Sample "push mode" downstream host
263 ;
264 ;[00:0C:76:96:75:28]
265 ;model = inbound
266 ;host = dynamic
267 ;precache = inbound
268 ;inkey = littleguy
269 ;outkey = ourkey
270 ;include = e164 ; In this case used only for precaching
271 ;permit = e164
272 ;qualify = yes
273
274 ;
275 ; Sample "push mode" upstream host
276 ;
277 ;[00:07:E9:3B:76:60]
278 ;model = outbound
279 ;precache = outbound
280 ;host = 216.207.245.34
281 ;register = yes
282 ;inkey = dhcp34
283 ;permit = all ; In this case used only for precaching
284 ;include = all
285 ;qualify = yes
286 ;outkey=foo
287
288 ;[*]
289 ;