dundi.conf.sample 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263
  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 qos.tex or Quality of Service section of asterisk.pdf for a description of the tos parameter.
  31. ;tos=ef
  32. ;
  33. ; Our entity identifier (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. ; given in seconds. Default is 3600.
  43. ;
  44. ;cachetime=3600
  45. ;
  46. ; This defines the max depth 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' and 'dundi no store history') 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 (IAX, SIP, H323)
  100. ;
  101. ; 'dest' is the destination to supply for reaching that number. The
  102. ; following variables can be used in the destination string and will
  103. ; be automatically substituted:
  104. ; ${NUMBER}: The number being requested
  105. ; ${IPADDR}: The IP address to connect to
  106. ; ${SECRET}: The current 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. ;e164 => dundi-e164-canonical,0,IAX2,dundi:${SECRET}@${IPADDR}/${NUMBER},nounsolicited,nocomunsolicit,nopartial
  125. ;e164 => dundi-e164-customers,100,IAX2,dundi:${SECRET}@${IPADDR}/${NUMBER},nounsolicited,nocomunsolicit,nopartial
  126. ;e164 => dundi-e164-via-pstn,400,IAX2,dundi:${SECRET}@${IPADDR}/${NUMBER},nounsolicited,nocomunsolicit,nopartial
  127. ;digexten => default,0,IAX2,guest@lappy/${NUMBER}
  128. ;asdf =>
  129. ;
  130. ; Weights for mappings can be set a few different ways:
  131. ;
  132. ; 1) It can be set as a static number.
  133. ;testmap1 => context1,222,IAX2,guest@peer1/${NUMBER}
  134. ;
  135. ; 2) It can be an Asterisk global variable.
  136. ;testmap2 => context2,${DUNDITESTVAR},IAX2,guest@peer2${NUMBER}
  137. ;
  138. ; 3) It can be retrieved using a dialplan function. This can be extremely
  139. ; useful if you want to let an external script decide what the weight
  140. ; in a response shouuld be.
  141. ;testmap3 => context3,${SHELL(echo 123)},IAX2,guest@peer3/${NUMBER}
  142. ;
  143. ; Note than when using a global variable or dialplan function to set the
  144. ; weight for a mapping, that response caching should be disabled if you
  145. ; plan for these values to change frequently at all. If the results are
  146. ; cached, then any change in value will not take effect until the cache
  147. ; has expired.
  148. ;
  149. ;
  150. ; The remaining sections represent the peers
  151. ; that we fundamentally trust. The section name
  152. ; represents the name and optionally at a specific
  153. ; DUNDi context if you want the trust to be established
  154. ; for only a specific DUNDi context.
  155. ;
  156. ; inkey - What key they will be authenticating to us with
  157. ;
  158. ; outkey - What key we use to authenticate to them
  159. ;
  160. ; host - What their host is
  161. ;
  162. ; order - What search order to use. May be 'primary', 'secondary',
  163. ; 'tertiary' or 'quartiary'. In large systems, it is beneficial
  164. ; to only query one up-stream host in order to maximize caching
  165. ; value. Adding one with primary and one with secondary gives you
  166. ; redundancy without sacrificing performance.
  167. ;
  168. ; include - Includes this peer when searching a particular context
  169. ; for lookup (set "all" to perform all lookups with that
  170. ; host. This is also the context in which peers are permitted
  171. ; to precache.
  172. ;
  173. ; noinclude - Disincludes this peer when searching a particular context
  174. ; for lookup (set "all" to perform no lookups with that
  175. ; host.
  176. ;
  177. ; permit - Permits this peer to search a given DUNDi context on
  178. ; the local system. Set "all" to permit this host to
  179. ; lookup all contexts. This is also a context for which
  180. ; we will create/forward PRECACHE commands.
  181. ;
  182. ; deny - Denies this peer to search a given DUNDi context on
  183. ; the local system. Set "all" to deny this host to
  184. ; lookup all contexts.
  185. ;
  186. ; model - inbound, outbound, or symmetric for whether we receive
  187. ; requests only, transmit requests only, or do both.
  188. ;
  189. ; precache - Utilize/Permit precaching with this peer (to pre
  190. ; cache means to provide an answer when no request
  191. ; was made and is used so that machines with few
  192. ; routes can push those routes up a to a higher level).
  193. ; outgoing means we send precache routes to this peer,
  194. ; incoming means we permit this peer to send us
  195. ; precache routes. symmetric means we do both.
  196. ;
  197. ; Note: You cannot mix symmetric/outbound model with symmetric/inbound
  198. ; precache, nor can you mix symmetric/inbound model with symmetric/outbound
  199. ; precache.
  200. ;
  201. ;
  202. ; The '*' peer is special and matches an unspecified entity
  203. ;
  204. ;
  205. ; Sample Primary e164 DUNDi peer
  206. ;
  207. ;[00:50:8B:F3:75:BB]
  208. ;model = symmetric
  209. ;host = 64.215.96.114
  210. ;inkey = digium
  211. ;outkey = misery
  212. ;include = e164
  213. ;permit = e164
  214. ;qualify = yes
  215. ;
  216. ; Sample Secondary e164 DUNDi peer
  217. ;
  218. ;[00:A0:C9:96:92:84]
  219. ;model = symmetric
  220. ;host = misery.digium.com
  221. ;inkey = misery
  222. ;outkey = ourkey
  223. ;include = e164
  224. ;permit = e164
  225. ;qualify = yes
  226. ;order = secondary
  227. ;
  228. ; Sample "push mode" downstream host
  229. ;
  230. ;[00:0C:76:96:75:28]
  231. ;model = inbound
  232. ;host = dynamic
  233. ;precache = inbound
  234. ;inkey = littleguy
  235. ;outkey = ourkey
  236. ;include = e164 ; In this case used only for precaching
  237. ;permit = e164
  238. ;qualify = yes
  239. ;
  240. ; Sample "push mode" upstream host
  241. ;
  242. ;[00:07:E9:3B:76:60]
  243. ;model = outbound
  244. ;precache = outbound
  245. ;host = 216.207.245.34
  246. ;register = yes
  247. ;inkey = dhcp34
  248. ;permit = all ; In this case used only for precaching
  249. ;include = all
  250. ;qualify = yes
  251. ;outkey=foo
  252. ;[*]
  253. ;