Skip to content

Commit cd4ef64

Browse files
Hoan HLjaimecasero
Hoan HL
authored andcommitted
zendesk #34016, cannot modify contact header.
1 parent 3748d35 commit cd4ef64

File tree

5 files changed

+326
-377
lines changed

5 files changed

+326
-377
lines changed

containers/sip-servlets-as7/src/main/java/org/mobicents/servlet/sip/startup/SipStandardContext.java

-28
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,6 @@ public class SipStandardContext extends StandardContext implements CatalinaSipCo
128128
// application session is 3 minutes
129129
private static int DEFAULT_LIFETIME = 3;
130130

131-
// default quotable params that their values need to be quoted.
132-
private static final String DEFAULT_QUOTABLE_PARAMS = "vendor, model, version, cnonce, nextnonce,"
133-
+ "nonce, code, oc-algo, cid, text, domain, opaque, qop, realm, response, rspauth, uri, username";
134-
135131
// The key to get configurable timer serive pool size
136132
private static final String TIMER_SERVICE_POOL_SIZE = "org.restcomm.servlets.sip.TIMER_SERVICE_THREADS";
137133

@@ -318,32 +314,8 @@ protected void initInternalApplicationComponents() throws LifecycleException {
318314
proxyTimerService = new ProxyTimerServiceImpl(applicationName);
319315
}
320316
}
321-
this.getServletContext().setAttribute("org.restcomm.servlets.sip.QUOTABLE_PARAMETER",
322-
getQuotableParams());
323-
this.getServletContext().setAttribute("org.restcomm.servlets.sip.REQUEST_TERMINATED_REASON",
324-
this.getServletContext().getInitParameter("org.restcomm.servlets.sip.REQUEST_TERMINATED_REASON"));
325317
}
326318

327-
/**
328-
*
329-
* @return a list of known params that their values need to be quoted.
330-
*/
331-
private List<String> getQuotableParams(){
332-
List<String> retValue = new ArrayList<String>();
333-
String quotableParameters = this.getServletContext().getInitParameter("org.restcomm.servlets.sip.QUOTABLE_PARAMETER");
334-
if (quotableParameters == null){
335-
quotableParameters = DEFAULT_QUOTABLE_PARAMS;
336-
}
337-
String[] parameters = quotableParameters.split(",");
338-
for (int i = 0; i < parameters.length; i++){
339-
String param = parameters[i].trim();
340-
if (param != null && !param.isEmpty() && !retValue.contains(param)){
341-
retValue.add(param);
342-
}
343-
}
344-
return retValue;
345-
}
346-
347319
/**
348320
* @throws Exception
349321
*/

containers/tomcat-7/src/main/java/org/mobicents/servlet/sip/startup/SipStandardContext.java

-28
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,6 @@ public class SipStandardContext extends StandardContext implements CatalinaSipCo
134134
// application session is 3 minutes
135135
private static int DEFAULT_LIFETIME = 3;
136136

137-
// default quotable params that their values need to be quoted.
138-
private static final String DEFAULT_QUOTABLE_PARAMS = "vendor, model, version, cnonce, nextnonce,"
139-
+ "nonce, code, oc-algo, cid, text, domain, opaque, qop, realm, response, rspauth, uri, username";
140-
141137
// The key to get configurable timer serive pool size
142138
private static final String TIMER_SERVICE_POOL_SIZE = "org.restcomm.servlets.sip.TIMER_SERVICE_THREADS";
143139

@@ -307,32 +303,8 @@ protected void initInternalApplicationComponents() throws LifecycleException {
307303
proxyTimerService = new ProxyTimerServiceImpl(applicationName);
308304
}
309305
}
310-
this.getServletContext().setAttribute("org.restcomm.servlets.sip.QUOTABLE_PARAMETER",
311-
getQuotableParams());
312-
this.getServletContext().setAttribute("org.restcomm.servlets.sip.REQUEST_TERMINATED_REASON",
313-
this.getServletContext().getInitParameter("org.restcomm.servlets.sip.REQUEST_TERMINATED_REASON"));
314306
}
315307

316-
/**
317-
*
318-
* @return a list of known params that their values need to be quoted.
319-
*/
320-
private List<String> getQuotableParams(){
321-
List<String> retValue = new ArrayList<String>();
322-
String quotableParameters = this.getServletContext().getInitParameter("org.restcomm.servlets.sip.QUOTABLE_PARAMETER");
323-
if (quotableParameters == null){
324-
quotableParameters = DEFAULT_QUOTABLE_PARAMS;
325-
}
326-
String[] parameters = quotableParameters.split(",");
327-
for (int i = 0; i < parameters.length; i++){
328-
String param = parameters[i].trim();
329-
if (param != null && !param.isEmpty() && !retValue.contains(param)){
330-
retValue.add(param);
331-
}
332-
}
333-
return retValue;
334-
}
335-
336308
/**
337309
* @throws Exception
338310
*/

containers/tomcat-8/src/main/java/org/mobicents/servlet/sip/startup/SipStandardContext.java

-28
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,6 @@ public class SipStandardContext extends StandardContext implements CatalinaSipCo
140140
// application session is 3 minutes
141141
private static int DEFAULT_LIFETIME = 3;
142142

143-
// default quotable params that their values need to be quoted.
144-
private static final String DEFAULT_QUOTABLE_PARAMS = "vendor, model, version, cnonce, nextnonce,"
145-
+ "nonce, code, oc-algo, cid, text, domain, opaque, qop, realm, response, rspauth, uri, username";
146-
147143
// The key to get configurable timer serive pool size
148144
private static final String TIMER_SERVICE_POOL_SIZE = "org.restcomm.servlets.sip.TIMER_SERVICE_THREADS";
149145

@@ -312,30 +308,6 @@ protected void initInternalApplicationComponents() throws LifecycleException {
312308
proxyTimerService = new ProxyTimerServiceImpl(applicationName);
313309
}
314310
}
315-
this.getServletContext().setAttribute("org.restcomm.servlets.sip.QUOTABLE_PARAMETER",
316-
getQuotableParams());
317-
this.getServletContext().setAttribute("org.restcomm.servlets.sip.REQUEST_TERMINATED_REASON",
318-
this.getServletContext().getInitParameter("org.restcomm.servlets.sip.REQUEST_TERMINATED_REASON"));
319-
}
320-
321-
/**
322-
*
323-
* @return a list of known params that their values need to be quoted.
324-
*/
325-
private List<String> getQuotableParams(){
326-
List<String> retValue = new ArrayList<String>();
327-
String quotableParameters = this.getServletContext().getInitParameter("org.restcomm.servlets.sip.QUOTABLE_PARAMETER");
328-
if (quotableParameters == null){
329-
quotableParameters = DEFAULT_QUOTABLE_PARAMS;
330-
}
331-
String[] parameters = quotableParameters.split(",");
332-
for (int i = 0; i < parameters.length; i++){
333-
String param = parameters[i].trim();
334-
if (param != null && !param.isEmpty() && !retValue.contains(param)){
335-
retValue.add(param);
336-
}
337-
}
338-
return retValue;
339311
}
340312

341313
/**

0 commit comments

Comments
 (0)