📄 routing.sgml
字号:
<sect>Routing Configuration<p>The following sections in the config file can be used to configure how calls are routed.<sect1>Section [RoutingPolicy]<label id="routingpolicy"><p>This section explains how the various possible routingpolicies within the gatekeeper work.The incoming call requests can be routed using a numberof routing providers:<itemize><item><tt/explicit/<newline><p>The destination is explicitly specified in the routingrequest.<item><tt/internal/<newline><p>The classical rule; search the destination inRegistrationTable<item><tt/parent/<newline><p>Route the call using information sent by the parent GK inreply to an ARQ the gatekeeper will send.<item><tt/neighbor/<newline><p>Route the call using neighbors by exchanging LRQ messages<item><tt/dns/<newline><p>The destination is resolved from DNS, provided it isresolvable<item><tt/vqueue/<newline><p>Use the virtual queue mechanism and generate a RouteRequestevent to let an external application do the routing(can only be used OnARQ)<item><tt/numberanalysis/<newline><p>Provides support for overlapped digit sending for ARQ messages.<item><tt/enum/<newline><p>ENUM (RFC3761) is a method to use DNS lookup to convertreal IDD E164 numbers into H323 dialing information. The serversit looks up by default are <tt/e164.org/ and <tt/apra.org/.To specify your own server you have to specify an environmentalvariable PWLIB_ENUM_PATH with the address of your preferredenum servers separated by a semicolon (;). (PWLIB_ENUM_PATH is supported starting with PWLib 1.8.0; 1.7.5.2 (Pandora) doesn't support it.)</itemize><p>Default configuration for routing policies is as follows:<descrip><quote><tt>[RoutingPolicy]<newline>default=explicit,internal,parent,neighbor</tt></quote></descrip><p>If one policy does not match, the next policy is tried.These policies can be applied to a number of routing request types,and routing input data. The different types are:ARQ, LRQ, Setup and Facility (with the callForwarded reason)There is also the general routing policy, which is kind of adefault for the other types.<descrip><tag/Example:/<quote><tt>[RoutingPolicy]<newline>h323_ID=dns,internal<newline>002=neighbor,internal<newline>Default=internal,neighbor,parent</tt></quote></descrip>When one of the messages is received which calls for a routingdecision, all calls to an alias of the h323_ID type will beresolved using DNS. If DNS fails to resolve the alias, it ismatched against the internal registration table. If a call isrequested to an alias starting with 002, first the neighboursare checked and then the internal registration table. If therequested alias is not an h323_ID or an alias starting with002, the default policy is used by querying the internalregistration table, then the neighbours, and if that fails theparent.For the ARQ, LRQ, Setup and Facility messages one would use the[RoutingPolicy::OnARQ], [RoutingPolicy::OnLRQ],[RoutingPolicy::OnSetup] and [RoutingPolicy::OnFacility] sectionsusing the syntax explained above.<descrip><tag/Example:/<quote><tt>[RoutingPolicy::OnARQ]<newline>default=numberanalysis,internal,neighbor</tt></quote></descrip><sect1>Section [RasSrv::RewriteE164]<label id="rewrite"><p>This section defines the rewriting rules for dialedDigits (E.164 number).<descrip><tag/Format:/<tt>[!]original-prefix=target-prefix</tt><p>If the number is beginning with <tt/original-prefix/,it is rewritten to <tt/target-prefix/.If the `<tt/!/' flag precedes the <tt/original-prefix/, the sense is invertedand the target-prefix is prepended to the dialed number. Special wildcardcharacters (<tt/'.'/ and <tt/'%'/) are available.<tag/Example:/<tt/08=18888/<p>If you dial <tt/08345718/, it is rewritten to <tt/18888345718/.<tag/Example:/<tt/!08=18888/<p>If you dial <tt/09345718/, it is rewritten to <tt/1888809345718/.</descrip>Option:<itemize><item><tt/Fastmatch=08/<newline>Default: <tt>N/A</tt><p>Only rewrite dialDigits beginning with the specified prefix.</itemize><sect1>Section [RasSrv::GWRewriteE164]<label id="gwrewrite"><p>This section describes rewriting the dialedDigits E.164 number depending onthe gateway a call has come from or is being sent to. This allows for moreflexible manipulation of the dialedDigits for routing etc. In combinationwith the <ref id="rewrite" name="RasSrv::RewriteE164"> you can have triplestage rewriting:<tscreen><verb>Call from "gw1", dialedDigits 0867822 | | VInput rules for "gw1", dialedDigits now 550867822 | | VGlobal rules, dialedDigits now 440867822 | | VGateway selection, dialedDigits now 440867822, outbound gateway "gw2" | | VOutput rules for "gw2", dialedDigits now 0867822 | | VCall to "gw2", dialedDigits 0867822</verb></tscreen><descrip><tag/Format:/<tt>gw-alias=in|out=[!]original-prefix=target-prefix[;in|out...]</tt><p>If the call matches the gateway, the direction and begins with<tt/original-prefix/ it is rewritten to <tt/target-prefix/.If the `<tt/!/' flag precedes the <tt/original-prefix/, the sense is inverted.Special wildcard characters (<tt/'.'/ and <tt/'%'/) are available.Multiple rules for the same gateway should be seperated by ';'.<tag/Example:/<tt/gw1=in=123=321/<p>If a call is received from "gw1" to <tt/12377897/, it is rewritten to <tt/32177897/before further action is taken.</descrip><sect1>Section [Endpoint::RewriteE164]<p>Once you specify prefix(es) for your gatekeeper endpoint, the parentgatekeeper will route calls with <bf/dialedDigits/ beginning with that prefixes.The child gatekeeper can rewrite the destination according to the rulesspecified in this section. By contrast, when an internal endpoint callsan endpoint registered to the parent gatekeeper, the source will berewritten reversely.<descrip><tag/Format:/<tt/external prefix=internal prefix/</descrip>For example, if you have the following configuration,<tscreen><verb> [Parent GK] ID=CitronGK / \ / \ / \ / \ [Child GK] [EP3] ID=ProxyGK E164=18888200 Prefix=188886 / \ / \ / \ [EP1] [EP2] E164=601 E164=602</verb></tscreen>With this rule:<tscreen><verb>188886=6</verb></tscreen>When EP1 calls EP3 by <tt/18888200/, the CallingPartyNumber in the Q.931 Setupwill be rewritten to <tt/18888601/. Conversely, EP3 can reach EP1 and EP2by calling <tt/18888601/ and <tt/18888602/, respectively. In consequence, anendpoint registered to the child GK with prefix '<tt/6/' will appearas an endpoint with prefix '<tt/188886/', for endpoints registered tothe parent gatekeeper.The section does not relate to the section<ref id="rewrite" name="RasSrv::RewriteE164">,though the later will take effect first.<sect1>Section [Routing::NumberAnalysis]<label id="numberanalysis"><p>This section defines rules for the <tt/numberanalysis/ routing policy.The policy checks a dialed number for minimum and/or maximum number of digitsand sends ARJ, if neccessary (number of digits is out of range), to supportoverlapped digit sending.<descrip><tag/Format:/<tt>prefix=MIN_DIGITS[:MAX_DIGITS]</tt><p>If the number matches the <tt/prefix/, it is verified to consist of at least<tt/MIN_DIGITS/ digits and (if MAX_DIGITS is present) at most <tt/MAX_DIGITS/digits. Special wildcard characters (<tt/!/, <tt/'.'/ and <tt/'%'/) are available.If the number is too short, an ARJ is send with <tt/rejectReason/ set to <tt/incompleteAddress/.If the number is too long, an ARJ is send with <tt/rejectReason/ set to <tt/undefinedReason/.Prefix list is searched from the longest to the shortest prefix for a match.<tag/Example:/<tscreen><verb>[RoutingPolicy::OnARQ]default=numberanalysis,internal[Routing::NumberAnalysis]0048=1248=10.=6:20</verb></tscreen><p>Calls to destinations starting with 0048 require at least 12 digits,to 48 - 10 digits and to all other at least 6 and at most 20 digits.</descrip><sect1>Section [RewriteCLI]
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -