On Fri, 2010-05-07 at 10:24 -0400, Mossman, Paul (Paul) wrote: > Scott wrote: > > Here's the real catch that's also actually confused by the > > current UI: transformation rules (mappingrules.xml) are > > searched first, and only the first match is applied; > > Can you confirm what "and only the first match is applied" means? > > I think you mean that once a transformation is made, the INVITE > immediately spirals back into the system (before any lower > transformation rules are considered for match.) It could then match > an extension (User, Hunt Group, etc.) But if it doesn't match and > extension, then transformation rules will be checked again, and there > could be another match. It if doesn't mach a transformation rule, > then routing rules will be checked. Is that right?
Ok... one level deeper :-) What really happens is that the Redirector plugins are called in the order configured in the registrar configuration (see [1]). A redirector looks at the request and may return contacts to which it should be sent (there is yet another level of detail of course, but this is good enough for now). There is a redirector that looks up aliases, one that looks up registrations, one for pickup operations, and so on. Two of the later ones are the one that evaluate mappingrules.xml and the one that evaluated fallbackrules.xml. Both of those return only the result of the first match they find. The fallbackrules redirector (which contains all rules that route to gateways) will not return any contacts at all unless no previous redirector has added a contact. So if a call matched an alias or a registration or some transformation rule in mappingrules, then no gateway rule is applied. > > routing rules (fallbackrules.xml) are searched _only_ if no > > other mechanism has provided a way to route the call. > > But, "only the first match is applied" is true for routing rules too > right? The difference is that if a routing rule (fallbackrules.xml) > matches, the INVITE will not spiral back into the system. (It will > either go out on of the Gateways, or be rejected due to permissions.) > Is that right? Yes. > > The current > > UI lets you mix them up, so that it looks as though a rule > > with a gateway in it takes precedence (is higher in the list) > > over a transformation rule, but that's not how it really works. > > Understood. We need to make the actual behaviour apparent in the UI. > > > -Paul > [email protected] > [1] http://wiki.sipfoundry.org/display/xecsdev/Redirectors _______________________________________________ sipx-dev mailing list [email protected] List Archive: http://list.sipfoundry.org/archive/sipx-dev Unsubscribe: http://list.sipfoundry.org/mailman/listinfo/sipx-dev sipXecs IP PBX -- http://www.sipfoundry.org/
