Status: New
Owner: ----
Labels: Type-Defect Priority-Medium Component-Sip-Servlets MSS-2.1.0.FINAL
Roadmap-Fix
New issue 202 by [email protected]: Content of proxy branches responses
cannot be modified
http://code.google.com/p/sipservlets/issues/detail?id=202
What steps will reproduce the problem?
1.Create a proxy branch for an INVITE request
2.Get the response and try to modify the content.
What is the expected output? What do you see instead?
An exception is rised
at
org.mobicents.servlet.sip.proxy.ProxyImpl.sendFinalResponse(ProxyImpl.java:763)
[sip-servlets-impl-2.0.0.FINAL.jar:2.0.0.FINAL]
at
org.mobicents.servlet.sip.proxy.ProxyImpl.onFinalResponse(ProxyImpl.java:638)
[sip-servlets-impl-2.0.0.FINAL.jar:2.0.0.FINAL]
at
org.mobicents.servlet.sip.proxy.ProxyBranchImpl.onResponse(ProxyBranchImpl.java:614)
[sip-servlets-impl-2.0.0.FINAL.jar:2.0.0.FINAL]
at
org.mobicents.servlet.sip.core.dispatchers.ResponseDispatcher$1.dispatch(ResponseDispatcher.java:446)
[sip-servlets-impl-2.0.0.FINAL.jar:2.0.0.FINAL]
... 13 more
Caused by: java.lang.IllegalStateException: Message already sent or
incoming message
at
org.mobicents.servlet.sip.message.SipServletResponseImpl.checkMessageState(SipServletResponseImpl.java:760)
[sip-servlets-impl-2.0.0.FINAL.jar:2.0.0.FINAL]
at
org.mobicents.servlet.sip.message.SipServletMessageImpl.setContent(SipServletMessageImpl.java:1316)
[sip-servlets-impl-2.0.0.FINAL.jar:2.0.0.FINAL]
at
com.medooze.mediaproxy.MediaProxyServlet.doInviteResponse(MediaProxyServlet.java:150)
What version of the product are you using? On what operating system?
mss 2.0.0
Please provide any additional information below.
The problem is that the checkMessageState(); is returning true for
proxyBranch responses as :
@Override
protected void checkMessageState() {
if(isMessageSent || getTransaction() instanceof
ClientTransaction) {
throw new IllegalStateException("Message already
sent or incoming message");
}
}
It seems weird to be able to modify the content of a outgoing proxy branch
request as the request is cloned, but it is not possible to do the same in
the response of the branch. Is this intentional? I understand that the
original request could not be modified outside of the proxy branch because
there was no meaning to know if the request was going to be proxied or not,
but in the response there is a public boolean isBranchResponse()that could
be used for that purpose.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
---
You received this message because you are subscribed to the Google Groups "mobicents-all-issues-changes" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.