Permalink
Browse files

Merge remote-tracking branch 'origin/release-4.6-update-2'

  • Loading branch information...
2 parents baba350 + 37677de commit d6cb5e7050bef6f471aba962d6c5ce6afd69cff9 @ezuce-admin ezuce-admin committed Jan 25, 2013
Showing with 422 additions and 212 deletions.
  1. +1 −1 mak/build.mk.in
  2. +7 −0 mak/rpm.mk.in
  3. +6 −1 sipXconfig/bin/sipxconfig.in
  4. +16 −0 sipXconfig/etc/sipxpbx/openacd/openacdline.xml
  5. +4 −0 sipXconfig/etc/sipxpbx/sipxproxy/sipxproxy.properties
  6. +8 −0 sipXconfig/etc/sipxpbx/sipxproxy/sipxproxy.xml
  7. +2 −0 sipXconfig/etc/sipxpbx/sipxregistrar/sipxregistrar.properties
  8. +4 −48 sipXconfig/etc/sipxpbx/sipxregistrar/sipxregistrar.xml
  9. +4 −1 sipXconfig/neoconf/src/org/sipfoundry/sipxconfig/cdr/CdrManagerImpl.java
  10. +17 −11 sipXconfig/neoconf/src/org/sipfoundry/sipxconfig/cdr/CdrSearch.java
  11. +2 −2 sipXconfig/neoconf/src/org/sipfoundry/sipxconfig/freeswitch/FreeswitchExtension.java
  12. +2 −0 sipXconfig/neoconf/src/org/sipfoundry/sipxconfig/job/JobContext.java
  13. +17 −0 sipXconfig/neoconf/src/org/sipfoundry/sipxconfig/job/JobContextImpl.java
  14. +7 −0 sipXconfig/neoconf/src/org/sipfoundry/sipxconfig/openacd/OpenAcdContext.java
  15. +6 −0 sipXconfig/neoconf/src/org/sipfoundry/sipxconfig/openacd/OpenAcdExtension.java
  16. +35 −4 sipXconfig/neoconf/src/org/sipfoundry/sipxconfig/openacd/OpenAcdLine.java
  17. +1 −0 sipXconfig/neoconf/src/org/sipfoundry/sipxconfig/openacd/openacd.beans.xml
  18. +30 −2 sipXconfig/neoconf/src/org/sipfoundry/sipxconfig/registrar/RegistrarConfiguration.java
  19. +4 −0 sipXconfig/neoconf/src/org/sipfoundry/sipxconfig/registrar/RegistrarSettings.java
  20. +1 −17 sipXconfig/neoconf/src/org/sipfoundry/sipxconfig/setup/SetupMain.java
  21. +20 −0 sipXconfig/neoconf/src/org/sipfoundry/sipxconfig/speeddial/SpeedDialManagerImpl.java
  22. +2 −0 sipXconfig/neoconf/src/org/sipfoundry/sipxconfig/speeddial/speeddial.beans.xml
  23. +9 −3 sipXconfig/neoconf/test/org/sipfoundry/sipxconfig/cdr/CdrManagerImplTestIntegration.java
  24. +51 −4 sipXconfig/neoconf/test/org/sipfoundry/sipxconfig/cdr/CdrSearchTest.java
  25. +8 −1 ...fig/neoconf/test/org/sipfoundry/sipxconfig/freeswitch/config/DefaultContextConfigurationTest.java
  26. +2 −2 sipXconfig/neoconf/test/org/sipfoundry/sipxconfig/openacd/OpenAcdContextTestIntegration.java
  27. +2 −0 sipXconfig/neoconf/test/org/sipfoundry/sipxconfig/proxy/expected-proxy-config
  28. +7 −6 sipXconfig/neoconf/test/org/sipfoundry/sipxconfig/registrar/expected-registrar-config
  29. +7 −6 sipXconfig/neoconf/test/org/sipfoundry/sipxconfig/registrar/expected-registrar-config-with-plugins
  30. +1 −1 sipXconfig/web/context/WEB-INF/cdr/CdrFilter.jwc
  31. +2 −2 sipXconfig/web/src/org/sipfoundry/sipxconfig/rest/OpenAcdLinesResource.java
  32. +5 −1 sipXconfig/web/src/org/sipfoundry/sipxconfig/site/admin/commserver/BundlePanel.java
  33. +2 −2 sipXconfig/web/src/org/sipfoundry/sipxconfig/site/openacd/EditOpenAcdLine.java
  34. +0 −1 sipXportLib/include/os/shared/OsMsgQShared.h
  35. +3 −3 sipXportLib/src/os/shared/OsMsgQShared.cpp
  36. +1 −1 sipXproxy/include/sipxproxy/SipRouter.h
  37. +18 −0 sipXproxy/src/SipRouter.cpp
  38. +78 −74 sipXregistry/lib/redirect_plugins/SipRedirectorAliasDB.cpp
  39. +7 −1 sipXregistry/lib/redirect_plugins/SipRedirectorAliasDB.h
  40. +2 −1 sipXtackLib/include/net/SipTransaction.h
  41. +2 −2 sipXtackLib/src/net/SipClientWriteBuffer.cpp
  42. +19 −14 sipXtackLib/src/net/SipTransaction.cpp
View
@@ -60,7 +60,7 @@ help.{1|2|6}.dist = Build archive, typically compressed tar
%.dist : %.autoreconf %.configure %.dist_;
%.dist_ :;$(MAKE) -C $(PROJ) dist
.SECONDEXPANSION:
-%.dist-by-dep : $$(addsuffix .dist-by-dep,$$($$*_DEPS))
+$(sipx:=.dist-by-dep) $(app:=.dist-by-dep): %.dist-by-dep : $$(addsuffix .dist-by-dep,$$($$*_DEPS))
@if test -f $($(PROJ)_TAR) ; then \
x=`find $(SRC)/$(PROJ)/ -type f \( \
-not -name configure \
View
@@ -110,6 +110,13 @@ RPM_DEP = $(MOCK_RESULTS_DIR)/.dep.$(PROJ)
fi
%.rpm_ : repo-webserver
+# Added --update because otherwise previously built deps are not installed, if there are
+# no deps, this adds 4s to each rpm that's built. This time is signifigant but only
+# reasonable option at this time
+ mock $(MOCK_OPTS) \
+ --no-clean \
+ --no-cleanup-after \
+ --update
mock $(MOCK_OPTS) \
--no-clean \
--no-cleanup-after \
@@ -14,7 +14,7 @@
usage() {
cat <<USAGE
-Usage: sipxconfig [start|stop|configtest|status|setup|db commands ...]
+Usage: sipxconfig [start|stop|configtest|status|setup|db|run commands ...]
Start Web UI administration for sipXpbx and for remotely provisioned
SIP-based phones.
@@ -40,6 +40,7 @@ Options include:
configtest Run diagnostics
+ run bean args Run a spring bean that implements SystemTaskEntryPoint
Common Database commands include:
@@ -306,6 +307,10 @@ case "$1" in
shift
runTask setup ${@}
;;
+ run)
+ shift
+ runTask ${@}
+ ;;
*)
echo "Usage: $0 {start|stop|status|restart|reload|force-reload|condrestart|db|setup|reset-admin}"
Status=1
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+<!DOCTYPE model PUBLIC "-//SIPFoundry//sipXconfig//Model specification 2.0//EN"
+ "http://www.sipfoundry.org/sipXconfig/dtd/setting_2_0.dtd">
+<model>
+ <group name="openacd-line">
+ <setting name="client-identity">
+ <type><string/></type>
+ </setting>
+ <setting name="client-name">
+ <type><string/></type>
+ </setting>
+ <setting name="queue-name">
+ <type><string/></type>
+ </setting>
+ </group>
+</model>
@@ -46,6 +46,10 @@ proxy-configuration.SIPX_PROXY_MAX_FORWARDS.label=Maximum Forwards
proxy-configuration.SIPX_PROXY_MAX_FORWARDS.description=(Max-Forwards header field)Maximum number of hops a request can transit on the way to its destination.
proxy-configuration.SIPX_PROXY_STALE_TCP_TIMEOUT.label=Stale TCP Timeout
proxy-configuration.SIPX_PROXY_STALE_TCP_TIMEOUT.description=
+proxy-configuration.SIPX_PROXY_ENSURE_TCP_LIFETIME.label=Ensure TCP Lifetime
+proxy-configuration.SIPX_PROXY_ENSURE_TCP_LIFETIME.description=
+proxy-configuration.SIPX_PROXY_ENABLE_TCP_RESEND.label=Enable TCP Retransmission
+proxy-configuration.SIPX_PROXY_ENABLE_TCP_RESEND.description=Enables retransmission of SIP messages when using TCP
proxy-configuration.SIPX_PROXY_CALL_STATE.label=Call State
proxy-configuration.SIPX_PROXY_CALL_STATE.description=
proxy-configuration.SIPX_PROXY_LOG_CONSOLE.label=Log Console
@@ -81,6 +81,14 @@
<setting name="SIPX_PROXY_STALE_TCP_TIMEOUT" advanced="yes">
<type><integer/></type>
</setting>
+ <setting name="SIPX_PROXY_ENSURE_TCP_LIFETIME">
+ <type><boolean /></type>
+ <value>0</value>
+ </setting>
+ <setting name="SIPX_PROXY_ENABLE_TCP_RESEND">
+ <type><boolean /></type>
+ <value>0</value>
+ </setting>
<!-- unsure what these next 2 settings do -->
<setting name="SIPX_PROXY_LOG_CONSOLE" hidden="yes">
<type><string/></type>
@@ -88,3 +88,5 @@ registrar-config.SIP_REDIRECT.140-FALLBACK.ALLOW_UNBOUND.label=Allow Unbound
registrar-config.SIP_REDIRECT.140-FALLBACK.ALLOW_UNBOUND.description=If checked, applications that know the shared secret will be allowed to make external calls
registrar-config.SIP_REGISTRAR_ADD_DIVERSION.label=Add Diversion Headers
registrar-config.SIP_REGISTRAR_ADD_DIVERSION.description=If checked, redirection through user forwards will be preserved as diversion headers containing the original URI.
+registrar-config.SIP_REGISTRAR_EARLY_ALIAS_RESOLUTION.label=Early alias resolution
+registrar-config.SIP_REGISTRAR_EARLY_ALIAS_RESOLUTION.description=If checked, early domain alias resolution will be enabled.
@@ -95,54 +95,6 @@
<type><string/></type>
<value>^(CSCO|Cisco)</value>
</setting>
- <setting name="SIP_REDIRECT_AUTHORITY_LEVEL.090-USERPARAM" hidden="yes">
- <type><integer required="yes"/></type>
- <value>60</value>
- </setting>
- <setting name="SIP_REDIRECT_AUTHORITY_LEVEL.100-PICKUP" hidden="yes">
- <type><integer required="yes"/></type>
- <value>50</value>
- </setting>
- <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-REG" hidden="yes">
- <type><integer required="yes"/></type>
- <value>40</value>
- </setting>
- <setting name="SIP_REDIRECT_AUTHORITY_LEVEL.130-MAPPING" hidden="yes">
- <type><integer required="yes"/></type>
- <value>40</value>
- </setting>
- <setting name="SIP_REDIRECT_AUTHORITY_LEVEL.140-FALLBACK" hidden="yes">
- <type><integer required="yes"/></type>
- <value>30</value>
- </setting>
- <setting name="SIP_REDIRECT_AUTHORITY_LEVEL.150-ISN" hidden="yes">
- <type><integer required="yes"/></type>
- <value>40</value>
- </setting>
- <setting name="SIP_REDIRECT_AUTHORITY_LEVEL.160-ENUM" hidden="yes">
- <type><integer required="yes"/></type>
- <value>40</value>
- </setting>
- <setting name="SIP_REDIRECT_AUTHORITY_LEVEL.900-PRESENCE" hidden="yes">
- <type><integer required="yes"/></type>
- <value>100</value>
- </setting>
- <setting name="SIP_REDIRECT_AUTHORITY_LEVEL.997-SUBSCRIBE" hidden="yes">
- <type><integer required="yes"/></type>
- <value>100</value>
- </setting>
- <setting name="SIP_REDIRECT_AUTHORITY_LEVEL.998-TIMEOFDAY" hidden="yes">
- <type><integer required="yes"/></type>
- <value>100</value>
- </setting>
- <setting name="SIP_REDIRECT_AUTHORITY_LEVEL.999-AUTHROUTER" hidden="yes">
- <type><integer required="yes"/></type>
- <value>100</value>
- </setting>
<setting name="SIP_REDIRECT.140-FALLBACK.ALLOW_UNBOUND" advanced="yes">
<type refid="yesNo"/>
<value>N</value>
@@ -151,6 +103,10 @@
<type refid="yesNo"/>
<value>N</value>
</setting>
+ <setting name="SIP_REGISTRAR_EARLY_ALIAS_RESOLUTION" advanced="yes">
+ <type refid="yesNo"/>
+ <value>N</value>
+ </setting>
</group>
<group name="userparam" advanced="yes">
<setting name="SIP_REDIRECT.090-USERPARAM.STRIP_ALL" advanced="yes">
@@ -26,6 +26,7 @@
import java.util.Collections;
import java.util.Date;
import java.util.List;
+import java.util.Set;
import java.util.TimeZone;
import javax.xml.rpc.ServiceException;
@@ -293,7 +294,9 @@ public CdrsStatementCreator(Date from, Date to, CdrSearch search, User user, Tim
if (user != null) {
m_forUser = new CdrSearch();
m_forUser.setMode(CdrSearch.Mode.ANY);
- m_forUser.setTerm(user.getUserName());
+ Set<String> names = user.getAliases();
+ names.add(user.getName());
+ m_forUser.setTerm(names.toArray(new String[0]));
}
}
@@ -9,7 +9,11 @@
*/
package org.sipfoundry.sipxconfig.cdr;
+import static org.apache.commons.lang.StringUtils.join;
+
+import java.util.ArrayList;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
import org.sipfoundry.sipxconfig.dialplan.CallTag;
@@ -40,7 +44,9 @@
}
private Mode m_mode = Mode.NONE;
- private String m_term;
+ private String[] m_term = new String[] {
+ ""
+ };
private String m_order;
private boolean m_ascending = true;
@@ -60,11 +66,11 @@ public Mode getMode() {
return m_mode;
}
- public void setTerm(String term) {
+ public void setTerm(String[] term) {
m_term = term;
}
- public String getTerm() {
+ public String[] getTerm() {
return m_term;
}
@@ -73,25 +79,25 @@ public void setOrder(String order, boolean ascending) {
m_ascending = ascending;
}
- private void appendSearchTermSql(StringBuilder sql) {
- sql.append(" LIKE '%<sip:");
- sql.append(m_term);
- sql.append("@%>'");
+ private void appendSearchTermSql(StringBuilder sql, String call) {
+ List<String> sqlList = new ArrayList<String>();
+ for (String name : m_term) {
+ sqlList.add(call + " LIKE '%<sip:" + name + "@%>'");
+ }
+ sql.append(join(sqlList.toArray(), OR));
}
private void appendCallerSql(StringBuilder sql) {
sql.append(OPEN_PARANTHESIS);
- sql.append(CdrManagerImpl.CALLER_AOR);
- appendSearchTermSql(sql);
+ appendSearchTermSql(sql, CdrManagerImpl.CALLER_AOR);
sql.append(AND);
sql.append(CdrManagerImpl.CALLER_INTERNAL);
sql.append("=true)");
}
private void appendCalleeSql(StringBuilder sql) {
sql.append(OPEN_PARANTHESIS);
- sql.append(CdrManagerImpl.CALLEE_AOR);
- appendSearchTermSql(sql);
+ appendSearchTermSql(sql, CdrManagerImpl.CALLEE_AOR);
sql.append(AND);
appendCalleeInternalRouteSql(sql);
sql.append(CLOSED_PARANTHESIS);
@@ -19,9 +19,9 @@
import java.util.LinkedHashSet;
import java.util.Set;
-import org.sipfoundry.sipxconfig.common.BeanWithId;
+import org.sipfoundry.sipxconfig.setting.BeanWithSettings;
-public abstract class FreeswitchExtension extends BeanWithId {
+public abstract class FreeswitchExtension extends BeanWithSettings {
private String m_name;
private boolean m_enabled = true; // default enabled
private String m_description;
@@ -18,6 +18,8 @@
Serializable schedule(String name);
Serializable schedule(String name, Location location);
+ void checkAndThrowErrorOnFailedJobs();
+
void start(Serializable jobId);
void success(Serializable jobId);
@@ -15,6 +15,7 @@
import java.util.List;
import org.apache.commons.collections.buffer.CircularFifoBuffer;
+import org.sipfoundry.sipxconfig.common.UserException;
import org.sipfoundry.sipxconfig.commserver.Location;
public class JobContextImpl implements JobContext {
@@ -30,6 +31,22 @@ public void setMaxJobs(int maxJobs) {
m_maxJobs = maxJobs;
}
+ public void checkAndThrowErrorOnFailedJobs() {
+ List<Job> failed = getFailedJobs();
+ if (failed != null && failed.size() > 0) {
+ Job job = failed.get(0);
+ Throwable e = job.getException();
+ if (e != null) {
+ if (e instanceof RuntimeException) {
+ throw (RuntimeException) e;
+ }
+ throw new UserException("Failure setting up system", e);
+ } else {
+ throw new UserException(job.getErrorMsg());
+ }
+ }
+ }
+
private synchronized Job getJob(Serializable id) {
if (id instanceof Job && m_jobs.contains(id)) {
return (Job) id;
@@ -74,6 +74,13 @@
static final String SSL = "ssl";
static final String SSL_PORT = "sslprt";
+ static final String CLIENT_NAME = "clnm";
+ static final String CLIENT_ID = "clid";
+ static final String DID = "did";
+ static final String Q_NAME = "qnm";
+ static final String LINE_NAME = "linm";
+
+
OpenAcdSettings getSettings();
void saveSettings(OpenAcdSettings settings);
@@ -42,6 +42,7 @@
import org.sipfoundry.sipxconfig.freeswitch.FreeswitchCondition;
import org.sipfoundry.sipxconfig.freeswitch.FreeswitchExtension;
import org.sipfoundry.sipxconfig.freeswitch.FreeswitchFeature;
+import org.sipfoundry.sipxconfig.setting.Setting;
public class OpenAcdExtension extends FreeswitchExtension implements Replicable, DeployConfigOnEdit {
public static final String DESTINATION_NUMBER = "destination_number";
@@ -194,4 +195,9 @@ public void setAddressManager(AddressManager addressManager) {
public Collection<Feature> getAffectedFeaturesOnChange() {
return Collections.singleton((Feature) FreeswitchFeature.FEATURE);
}
+
+ @Override
+ protected Setting loadSettings() {
+ return null;
+ }
}
Oops, something went wrong.

0 comments on commit d6cb5e7

Please sign in to comment.