|
|
|
[
Permlink
| « Hide
]
Scott Lawrence - 2008-05-21 09:58
it will be confusing (and the SIP error responses will have undeciferable names in them) if you don't fix XCF-1193 at the same time.
For internal rules: do not generate permissions in mappingrules.xml (since they are interpreted there as source permissions not destination permissions), but add entries in authrules.xml
This is a change compared to what it's implemented now: for internal rules we generate mappingrules.xml permission entry but no authrules.xml entries. I added permission entries for internal rules in authrules.xml and I removed them from mappingrules.xml.
This is probably my fault: some rules do need to behave as they used to (put permission elements in mappingrules but not in authrules).
I think we have to add another switch: source vs. target permission rule. All rules (internal and not internal) are by default "target" permission rules. That means that they need "permission" elements in authrules and fallbackrules (if they are not internal) but never in mappingrules (if they are internal). Some rules are "source" permission rules. Which means that they only need "permission" elements in mappingrules. Voicemail rules are the only once I can think of that has this property. Please whenever possible add new tests instead of changing the old ones (cover all code paths: source/internal, target/internal, target/external). I added "isSourcePermission()" switch, to keep "source" permission for internal rules in mappingrules.xml.
some minor fixes to original patch, and a major fix for authrules generation - please review
Please configure custom rule and make sure that permissions actually work (iow: that you can make calls to internal destinations that have those permissions and cannot make calls to the ones that do not have them.)
http://sipxecs.sipfoundry.org/ViewVC/sipXecs?view=rev&rev=13862
XCF-2574 fix generation permissions for internal rules Add 'targetPermission' property to dialing rules. Only rules with 'targetPermission' set generate 'permission' elements in (mapping|fallback)rules.xml files. All other rules generate permission element in authrules.xml. At the moment only Voicemail related rules have 'targetPermission' set. Until this change sipXconfig used to generate mappingrules.xml permission entry but no authrules.xml entries for all internal rules, which made it impossible to configure custom internal rules that http://sipxecs.sipfoundry.org/ViewVC/sipXecs?view=rev&rev= In spite of the fact that we have no gateways we still need to match against SIP domain (and usual suspects - hostname and IP address). Also userMatch requires that we use translated (target) patterns, and not patterns dialed by the user. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||