Scott Lawrence wrote:
> I'm looking at XX-5178, which requires a settings change in the
> registrar from
>
> SIP_REDIRECT.999-AUTHROUTER.SIPX_PROXY : 10.1.1.11:5060;transport=tcp
>
> to
>
> SIP_REDIRECT.999-AUTHROUTER.SIPX_PROXY : example.com;transport=tcp
>
> that is - changing from the proxy ip address and port to the domain name
> (so that in an HA configuration either proxy can be used).
>
> The attached patch seems as though it aught to do the right thing, but
> fails the sipXconfig unit test because it doesn't actually replace the
> value of ${domain.name} specified by the registrar-config.vm template.
>
>
It's not a unit test problem. In order for ${domain.name} to work Velocity
would need 'domain' in its context. And in order to inject something in
Spring bean you need a setter not just .beans.xml change.
Nice theory though ;-)
There is a simpler way of getting domainName in the cofig file - every
service already implements SipxService.getDomainName and it's used already
in this file. So I just changed the Velocity expression.
Let me know if this is what you need.
D.
From 0685d1c40ea4b53594df53f700dcbcf1f106b9ae Mon Sep 17 00:00:00 2001
From: Damian Krzeminski <[email protected]>
Date: Fri, 11 Dec 2009 09:58:58 -0500
Subject: [PATCH] XX-5178 registrar config changes
Use domain name instead of host:port for 999-AUTHROUTER.SIPX_PROXY
replace:
SIP_REDIRECT.999-AUTHROUTER.SIPX_PROXY : 10.1.1.11:5060;transport=tcp
with:
SIP_REDIRECT.999-AUTHROUTER.SIPX_PROXY : example.com;transport=tcp
---
.../neoconf/etc/sipxregistrar/registrar-config.vm | 2 +-
.../expected-registrar-config-with-openfire | 2 +-
.../expected-registrar-config-without-openfire | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/sipXconfig/neoconf/etc/sipxregistrar/registrar-config.vm
b/sipXconfig/neoconf/etc/sipxregistrar/registrar-config.vm
index eecd862..7e9cb23 100644
--- a/sipXconfig/neoconf/etc/sipxregistrar/registrar-config.vm
+++ b/sipXconfig/neoconf/etc/sipxregistrar/registrar-config.vm
@@ -74,7 +74,7 @@ SIP_REDIRECT_AUTHORITY_LEVEL.998-TIMEOFDAY : 100
# AuthRouter is always last.
SIP_REDIRECT_HOOK_LIBRARY.999-AUTHROUTER :
@sipxpbx.lib.dir@/libRedirectorAuthRouter.so
SIP_REDIRECT_AUTHORITY_LEVEL.999-AUTHROUTER : 100
-SIP_REDIRECT.999-AUTHROUTER.SIPX_PROXY :
${location.address}:${proxyService.sipPort};transport=tcp
+SIP_REDIRECT.999-AUTHROUTER.SIPX_PROXY :
$!{registrarService.domainName};transport=tcp
# See HaSetup.pdf for how to use the following
SIP_REGISTRAR_XMLRPC_PORT : 5077
diff --git
a/sipXconfig/neoconf/test/org/sipfoundry/sipxconfig/service/expected-registrar-config-with-openfire
b/sipXconfig/neoconf/test/org/sipfoundry/sipxconfig/service/expected-registrar-config-with-openfire
index 167e9e8..da34401 100644
---
a/sipXconfig/neoconf/test/org/sipfoundry/sipxconfig/service/expected-registrar-config-with-openfire
+++
b/sipXconfig/neoconf/test/org/sipfoundry/sipxconfig/service/expected-registrar-config-with-openfire
@@ -67,7 +67,7 @@ SIP_REDIRECT_AUTHORITY_LEVEL.998-TIMEOFDAY : 100
# AuthRouter is always last.
SIP_REDIRECT_HOOK_LIBRARY.999-AUTHROUTER :
@sipxpbx.lib.dir@/libRedirectorAuthRouter.so
SIP_REDIRECT_AUTHORITY_LEVEL.999-AUTHROUTER : 100
-SIP_REDIRECT.999-AUTHROUTER.SIPX_PROXY : 192.168.1.1:5060;transport=tcp
+SIP_REDIRECT.999-AUTHROUTER.SIPX_PROXY : example.org;transport=tcp
# See HaSetup.pdf for how to use the following
SIP_REGISTRAR_XMLRPC_PORT : 5077
diff --git
a/sipXconfig/neoconf/test/org/sipfoundry/sipxconfig/service/expected-registrar-config-without-openfire
b/sipXconfig/neoconf/test/org/sipfoundry/sipxconfig/service/expected-registrar-config-without-openfire
index 15f7280..ba043d5 100644
---
a/sipXconfig/neoconf/test/org/sipfoundry/sipxconfig/service/expected-registrar-config-without-openfire
+++
b/sipXconfig/neoconf/test/org/sipfoundry/sipxconfig/service/expected-registrar-config-without-openfire
@@ -61,7 +61,7 @@ SIP_REDIRECT_AUTHORITY_LEVEL.998-TIMEOFDAY : 100
# AuthRouter is always last.
SIP_REDIRECT_HOOK_LIBRARY.999-AUTHROUTER :
@sipxpbx.lib.dir@/libRedirectorAuthRouter.so
SIP_REDIRECT_AUTHORITY_LEVEL.999-AUTHROUTER : 100
-SIP_REDIRECT.999-AUTHROUTER.SIPX_PROXY : 192.168.1.1:5060;transport=tcp
+SIP_REDIRECT.999-AUTHROUTER.SIPX_PROXY : example.org;transport=tcp
# See HaSetup.pdf for how to use the following
SIP_REGISTRAR_XMLRPC_PORT : 5077
--
1.6.0.6
_______________________________________________
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/