Dale Worley wrote:
> On Fri, 2009-01-23 at 14:10 -0500, Beeton, Carolyn (CAR:9D60) wrote:
>> On second thought, I'm not so sure.  Putting the emergency numbers in a
>> file all their own makes it much easier to match them.  I could put a
>> tag into the authrules files to identify emergency rules, but they are
>> not guaranteed to be matched, if another rule (e.g. local dialling) is
>> "above" them and also matches.  I could duplicate the code in
>> getUserMatchContainerMatchingRequestURI to only match emergency rules,
>> but it seems to me that this would be harder to maintain than the
>> emergencyrules.xml file, which is automatically generated (and would
>> share the authrules.xsd schema).
> 
> OTOH if the outgoing number matches an earlier rule in authrules than
> the rule which identifies it as an emergency number, is it really an
> emergency number?
> 
> Ugh.  The possibility of numbers that can be matched by more than one
> rule in authrules is quite ugly, in much the same way that numbers that
> can match more than one dialplan rule is ugly.  In dialplan processing
> (mappingrules and fallbackrules), despite that the user enters the rules
> on the Dial Plans page in a clear order, mappingrules is processed
> before fallbackrules.


Unless it has been changed recently (in the proxy) only the first rule that
matches the host and dial pattern will fire. It's certainly possible to
configure other custom rules in UI that would take effect before your
emergency rule, but they will just not be treated as "emergency" for the
purpose of this feature.

> 
> In the case of recognizing emergency numbers, "what we really want" is
> to know that the outgoing URI was *generated* by a dial plan rule that
> is of type "Emergency".  In theory, there's no guarantee that we can
> determine that by examining the outgoing URI, although I suppose in
> practice, we know that because nobody would *want* to generate an
> outgoing call to an emergency number via a on-emergency dial plan rule.

That's exactly why Carolyn added the ruleType: now we have guarantee that
the specific rule in authrules is generated by the Emergency rule in the UI.

> 
> We probably ought to have sipXconfig check for dialplan rules that
> overlap in the numbers that they match or that they generate.
> 
> Dale
> 
> 

_______________________________________________
sipx-dev mailing list
[email protected]
List Archive: http://list.sipfoundry.org/archive/sipx-dev
Unsubscribe: http://list.sipfoundry.org/mailman/listinfo/sipx-dev

Reply via email to