dundi.conf.sample 9.3 KB

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