Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

PT-38248039: fix fallbackrules evaluated prior mapping rules

  • Loading branch information...
commit 034abf4ee5c1d1d6b76d6a13b58c6edb2df87d47 1 parent 6dc0a6f
@dizzy dizzy authored
View
4 sipXconfig/etc/sipxpbx/sipxregistrar/sipxregistrar.xml
@@ -103,11 +103,11 @@
<type><integer required="yes"/></type>
<value>50</value>
</setting>
- <setting name="SIP_REDIRECT_AUTHORITY_LEVEL.110-REG" hidden="yes">
+ <setting name="SIP_REDIRECT_AUTHORITY_LEVEL.110-ALIAS" hidden="yes">
<type><integer required="yes"/></type>
<value>40</value>
</setting>
- <setting name="SIP_REDIRECT_AUTHORITY_LEVEL.120-ALIAS" hidden="yes">
+ <setting name="SIP_REDIRECT_AUTHORITY_LEVEL.120-REG" hidden="yes">
<type><integer required="yes"/></type>
<value>40</value>
</setting>
View
15 sipXconfig/neoconf/src/org/sipfoundry/sipxconfig/registrar/RegistrarConfiguration.java
@@ -87,6 +87,21 @@ void write(Writer wtr, RegistrarSettings settings, Domain domain, Location locat
KeyValueConfiguration file = KeyValueConfiguration.colonSeparated(wtr);
Setting root = settings.getSettings();
file.writeSettings(SettingUtil.filter(NO_UNDERSCORE, root.getSetting("registrar-config")));
+ file.write("SIP_REDIRECT.100-PICKUP.ORBIT_FILENAME", "$(sipx.SIPX_CONFDIR)/orbits.xml");
+ file.write("SIP_REDIRECT.130-MAPPING.MAPPING_RULES_FILENAME", "$(sipx.SIPX_CONFDIR)/mappingrules.xml");
+ file.write("SIP_REDIRECT.140-FALLBACK.MAPPING_RULES_FILENAME", "$(sipx.SIPX_CONFDIR)/fallbackrules.xml");
+ file.write("SIP_REDIRECT_HOOK_LIBRARY.090-USERPARAM", "$(sipx.SIPX_LIBDIR)/libRedirectorUserParam.so");
+ file.write("SIP_REDIRECT_HOOK_LIBRARY.100-PICKUP", "$(sipx.SIPX_LIBDIR)/libRedirectorPickUp.so");
+ file.write("SIP_REDIRECT_HOOK_LIBRARY.110-ALIAS", "$(sipx.SIPX_LIBDIR)/libRedirectorAliasDB.so");
+ file.write("SIP_REDIRECT_HOOK_LIBRARY.120-REG", "$(sipx.SIPX_LIBDIR)/libRedirectorRegDB.so");
+ file.write("SIP_REDIRECT_HOOK_LIBRARY.130-MAPPING", "$(sipx.SIPX_LIBDIR)/libRedirectorMapping.so");
+ file.write("SIP_REDIRECT_HOOK_LIBRARY.140-FALLBACK", "$(sipx.SIPX_LIBDIR)/libRedirectorFallback.so");
+ file.write("SIP_REDIRECT_HOOK_LIBRARY.150-ISN", "$(sipx.SIPX_LIBDIR)/libRedirectorISN.so");
+ file.write("SIP_REDIRECT_HOOK_LIBRARY.160-ENUM", "$(sipx.SIPX_LIBDIR)/libRedirectorENUM.so");
+ file.write("SIP_REDIRECT_HOOK_LIBRARY.997-SUBSCRIBE", "$(sipx.SIPX_LIBDIR)/libRedirectorSubscribe.so");
+ file.write("SIP_REDIRECT_HOOK_LIBRARY.998-TIMEOFDAY", "$(sipx.SIPX_LIBDIR)/libRedirectorTimeOfDay.so");
+ file.write("SIP_REDIRECT_HOOK_LIBRARY.999-AUTHROUTER", "$(sipx.SIPX_LIBDIR)/libRedirectorAuthRouter.so");
+ file.write("SIP_REGISTRAR_HOOK_LIBRARY.MWI", "$(sipx.SIPX_LIBDIR)/libRegistrarImpliedMWI.so");
file.write("SIP_REGISTRAR_AUTHENTICATE_REALM", domain.getSipRealm());
file.write("SIP_REGISTRAR_DOMAIN_NAME", domain.getName());
file.write("SIP_REGISTRAR_PROXY_PORT", proxy.getPort());
View
19 sipXconfig/neoconf/test/org/sipfoundry/sipxconfig/registrar/expected-registrar-config
@@ -12,8 +12,8 @@ SIP_REGISTRAR_MIN_EXPIRES_NATED :
SIP_REGISTRAR.MWI.UA.CISCO : ^(CSCO|Cisco)
SIP_REDIRECT_AUTHORITY_LEVEL.090-USERPARAM : 60
SIP_REDIRECT_AUTHORITY_LEVEL.100-PICKUP : 50
-SIP_REDIRECT_AUTHORITY_LEVEL.110-REG : 40
-SIP_REDIRECT_AUTHORITY_LEVEL.120-ALIAS : 40
+SIP_REDIRECT_AUTHORITY_LEVEL.110-ALIAS : 40
+SIP_REDIRECT_AUTHORITY_LEVEL.120-REG : 40
SIP_REDIRECT_AUTHORITY_LEVEL.130-MAPPING : 40
SIP_REDIRECT_AUTHORITY_LEVEL.140-FALLBACK : 30
SIP_REDIRECT_AUTHORITY_LEVEL.150-ISN : 40
@@ -23,6 +23,21 @@ SIP_REDIRECT_AUTHORITY_LEVEL.997-SUBSCRIBE : 100
SIP_REDIRECT_AUTHORITY_LEVEL.998-TIMEOFDAY : 100
SIP_REDIRECT_AUTHORITY_LEVEL.999-AUTHROUTER : 100
SIP_REDIRECT.140-FALLBACK.ALLOW_UNBOUND : Y
+SIP_REDIRECT.100-PICKUP.ORBIT_FILENAME : $(sipx.SIPX_CONFDIR)/orbits.xml
+SIP_REDIRECT.130-MAPPING.MAPPING_RULES_FILENAME : $(sipx.SIPX_CONFDIR)/mappingrules.xml
+SIP_REDIRECT.140-FALLBACK.MAPPING_RULES_FILENAME : $(sipx.SIPX_CONFDIR)/fallbackrules.xml
+SIP_REDIRECT_HOOK_LIBRARY.090-USERPARAM : $(sipx.SIPX_LIBDIR)/libRedirectorUserParam.so
+SIP_REDIRECT_HOOK_LIBRARY.100-PICKUP : $(sipx.SIPX_LIBDIR)/libRedirectorPickUp.so
+SIP_REDIRECT_HOOK_LIBRARY.110-ALIAS : $(sipx.SIPX_LIBDIR)/libRedirectorAliasDB.so
+SIP_REDIRECT_HOOK_LIBRARY.120-REG : $(sipx.SIPX_LIBDIR)/libRedirectorRegDB.so
+SIP_REDIRECT_HOOK_LIBRARY.130-MAPPING : $(sipx.SIPX_LIBDIR)/libRedirectorMapping.so
+SIP_REDIRECT_HOOK_LIBRARY.140-FALLBACK : $(sipx.SIPX_LIBDIR)/libRedirectorFallback.so
+SIP_REDIRECT_HOOK_LIBRARY.150-ISN : $(sipx.SIPX_LIBDIR)/libRedirectorISN.so
+SIP_REDIRECT_HOOK_LIBRARY.160-ENUM : $(sipx.SIPX_LIBDIR)/libRedirectorENUM.so
+SIP_REDIRECT_HOOK_LIBRARY.997-SUBSCRIBE : $(sipx.SIPX_LIBDIR)/libRedirectorSubscribe.so
+SIP_REDIRECT_HOOK_LIBRARY.998-TIMEOFDAY : $(sipx.SIPX_LIBDIR)/libRedirectorTimeOfDay.so
+SIP_REDIRECT_HOOK_LIBRARY.999-AUTHROUTER : $(sipx.SIPX_LIBDIR)/libRedirectorAuthRouter.so
+SIP_REGISTRAR_HOOK_LIBRARY.MWI : $(sipx.SIPX_LIBDIR)/libRegistrarImpliedMWI.so
SIP_REGISTRAR_AUTHENTICATE_REALM : grapefruit
SIP_REGISTRAR_DOMAIN_NAME : example.org
SIP_REGISTRAR_PROXY_PORT : 103
View
19 sipXconfig/neoconf/test/org/sipfoundry/sipxconfig/registrar/expected-registrar-config-with-plugins
@@ -12,8 +12,8 @@ SIP_REGISTRAR_MIN_EXPIRES_NATED :
SIP_REGISTRAR.MWI.UA.CISCO : ^(CSCO|Cisco)
SIP_REDIRECT_AUTHORITY_LEVEL.090-USERPARAM : 60
SIP_REDIRECT_AUTHORITY_LEVEL.100-PICKUP : 50
-SIP_REDIRECT_AUTHORITY_LEVEL.110-REG : 40
-SIP_REDIRECT_AUTHORITY_LEVEL.120-ALIAS : 40
+SIP_REDIRECT_AUTHORITY_LEVEL.110-ALIAS : 40
+SIP_REDIRECT_AUTHORITY_LEVEL.120-REG : 40
SIP_REDIRECT_AUTHORITY_LEVEL.130-MAPPING : 40
SIP_REDIRECT_AUTHORITY_LEVEL.140-FALLBACK : 30
SIP_REDIRECT_AUTHORITY_LEVEL.150-ISN : 40
@@ -23,6 +23,21 @@ SIP_REDIRECT_AUTHORITY_LEVEL.997-SUBSCRIBE : 100
SIP_REDIRECT_AUTHORITY_LEVEL.998-TIMEOFDAY : 100
SIP_REDIRECT_AUTHORITY_LEVEL.999-AUTHROUTER : 100
SIP_REDIRECT.140-FALLBACK.ALLOW_UNBOUND : N
+SIP_REDIRECT.100-PICKUP.ORBIT_FILENAME : $(sipx.SIPX_CONFDIR)/orbits.xml
+SIP_REDIRECT.130-MAPPING.MAPPING_RULES_FILENAME : $(sipx.SIPX_CONFDIR)/mappingrules.xml
+SIP_REDIRECT.140-FALLBACK.MAPPING_RULES_FILENAME : $(sipx.SIPX_CONFDIR)/fallbackrules.xml
+SIP_REDIRECT_HOOK_LIBRARY.090-USERPARAM : $(sipx.SIPX_LIBDIR)/libRedirectorUserParam.so
+SIP_REDIRECT_HOOK_LIBRARY.100-PICKUP : $(sipx.SIPX_LIBDIR)/libRedirectorPickUp.so
+SIP_REDIRECT_HOOK_LIBRARY.110-ALIAS : $(sipx.SIPX_LIBDIR)/libRedirectorAliasDB.so
+SIP_REDIRECT_HOOK_LIBRARY.120-REG : $(sipx.SIPX_LIBDIR)/libRedirectorRegDB.so
+SIP_REDIRECT_HOOK_LIBRARY.130-MAPPING : $(sipx.SIPX_LIBDIR)/libRedirectorMapping.so
+SIP_REDIRECT_HOOK_LIBRARY.140-FALLBACK : $(sipx.SIPX_LIBDIR)/libRedirectorFallback.so
+SIP_REDIRECT_HOOK_LIBRARY.150-ISN : $(sipx.SIPX_LIBDIR)/libRedirectorISN.so
+SIP_REDIRECT_HOOK_LIBRARY.160-ENUM : $(sipx.SIPX_LIBDIR)/libRedirectorENUM.so
+SIP_REDIRECT_HOOK_LIBRARY.997-SUBSCRIBE : $(sipx.SIPX_LIBDIR)/libRedirectorSubscribe.so
+SIP_REDIRECT_HOOK_LIBRARY.998-TIMEOFDAY : $(sipx.SIPX_LIBDIR)/libRedirectorTimeOfDay.so
+SIP_REDIRECT_HOOK_LIBRARY.999-AUTHROUTER : $(sipx.SIPX_LIBDIR)/libRedirectorAuthRouter.so
+SIP_REGISTRAR_HOOK_LIBRARY.MWI : $(sipx.SIPX_LIBDIR)/libRegistrarImpliedMWI.so
SIP_REGISTRAR_AUTHENTICATE_REALM : grapefruit
SIP_REGISTRAR_DOMAIN_NAME : example.org
SIP_REGISTRAR_PROXY_PORT : 103
View
18 sipXregistry/etc/sipxregistrar.cf
@@ -40,23 +40,9 @@ bundle edit_line registrar_config_contents() {
insert_lines:
any::
"$(sipx.SIPX_CFDATA)/$(sipx.location_id)/registrar-config.part"
- insert_type => "file";
- "SIP_REDIRECT.100-PICKUP.ORBIT_FILENAME : $(sipx.SIPX_CONFDIR)/orbits.xml";
- "SIP_REDIRECT.130-MAPPING.MAPPING_RULES_FILENAME : $(sipx.SIPX_CONFDIR)/mappingrules.xml";
- "SIP_REDIRECT.140-FALLBACK.MAPPING_RULES_FILENAME : $(sipx.SIPX_CONFDIR)/fallbackrules.xml";
- "SIP_REDIRECT_HOOK_LIBRARY.090-USERPARAM : $(sipx.SIPX_LIBDIR)/libRedirectorUserParam.so";
- "SIP_REDIRECT_HOOK_LIBRARY.100-PICKUP : $(sipx.SIPX_LIBDIR)/libRedirectorPickUp.so";
- "SIP_REDIRECT_HOOK_LIBRARY.110-ALIAS : $(sipx.SIPX_LIBDIR)/libRedirectorAliasDB.so";
- "SIP_REDIRECT_HOOK_LIBRARY.120-REG : $(sipx.SIPX_LIBDIR)/libRedirectorRegDB.so";
- "SIP_REDIRECT_HOOK_LIBRARY.130-MAPPING : $(sipx.SIPX_LIBDIR)/libRedirectorMapping.so";
- "SIP_REDIRECT_HOOK_LIBRARY.140-FALLBACK : $(sipx.SIPX_LIBDIR)/libRedirectorFallback.so";
- "SIP_REDIRECT_HOOK_LIBRARY.150-ISN : $(sipx.SIPX_LIBDIR)/libRedirectorISN.so";
- "SIP_REDIRECT_HOOK_LIBRARY.160-ENUM : $(sipx.SIPX_LIBDIR)/libRedirectorENUM.so";
- "SIP_REDIRECT_HOOK_LIBRARY.997-SUBSCRIBE : $(sipx.SIPX_LIBDIR)/libRedirectorSubscribe.so";
- "SIP_REDIRECT_HOOK_LIBRARY.998-TIMEOFDAY : $(sipx.SIPX_LIBDIR)/libRedirectorTimeOfDay.so";
- "SIP_REDIRECT_HOOK_LIBRARY.999-AUTHROUTER : $(sipx.SIPX_LIBDIR)/libRedirectorAuthRouter.so";
+ insert_type => "file",
+ expand_scalars => "true";
"SIP_REGISTRAR_BIND_IP : $(sipx.bind_ip)";
- "SIP_REGISTRAR_HOOK_LIBRARY.MWI : $(sipx.SIPX_LIBDIR)/libRegistrarImpliedMWI.so";
delete_lines:
any::
Please sign in to comment.
Something went wrong with that request. Please try again.