Status: New
Owner: ----
Labels: Type-Defect Priority-Medium Component-Sip-Servlets MSS-3.0.0.FINAL
Roadmap-Fix
New issue 245 by [email protected]: Impossible to add address
parameter to From Header
http://code.google.com/p/sipservlets/issues/detail?id=245
From section "4.1.2 The From and To Header Fields" of "SIP Servlet
Specification, version 1.1"
This specification allows modifications to all parts of the From and To
headers except the tag parameter. From and To headers are still considered
system headers with respect to the tags (tag parameters). Containers should
preserve any changes to the From and To headers in mid-dialog and use the
updated ones for any subsequent requests in the dialog.
What steps will reproduce the problem?
1. I need to add "epid" parameter to From header of my request as described
in http://msdn.microsoft.com/en-us/library/dd921411%28v=office.12%29.aspx
In that case it should looks like:
From: <sip:[email protected]>;tag=33975904fc;epid=01010101
2. My test code:
java.util.Properties jndiProps = new java.util.Properties();
javax.naming.Context initCtx = new javax.naming.InitialContext(jndiProps);
javax.naming.Context envCtx =
(javax.naming.Context)initCtx.lookup("java:comp/env");
javax.servlet.sip.SipFactory sipFactory =
(javax.servlet.sip.SipFactory)envCtx.lookup("sip/ClickToCallAsyncApplication/SipFactory");
javax.servlet.sip.SipApplicationSession sipApplicationSession =
sipFactory.createApplicationSession();
javax.servlet.sip.SipServletRequest sipReq =
sipFactory.createRequest(sipApplicationSession,
"INVITE",
"sip:[email protected]",
"sip:192.168.1.100:5064");
sipReq.getFrom().setDisplayName("Test name");
sipReq.getFrom().setParameter("epid", "00112233");
final Address address =
sipFactory.createAddress(sipFactory.createURI("sip:[email protected]"));
address.setParameter("epid", "bzz");
sipReq.addAddressHeader("TestAddress", address, true);
out.print("" + address);
sipReq.send();
What is the expected output?
From: "Test name"
<sip:[email protected]>;tag=86901113_73cd66e0_518a13bd-7399-4293-842a-9fb70f614456;epid=00112233
What do you see instead?
INVITE sip:192.168.1.100:5064 SIP/2.0
Call-ID: [email protected]
CSeq: 1 INVITE
From: "Test name"
<sip:[email protected]>;tag=86901113_73cd66e0_518a13bd-7399-4293-842a-9fb70f614456
To: <sip:192.168.1.100:5064>
Max-Forwards: 70
Contact: <sip:[email protected]:5080>
Via: SIP/2.0/UDP
127.0.0.1:5080;branch=z9hG4bK518a13bd-7399-4293-842a-9fb70f614456_73cd66e0_22374187304547
TestAddress: <sip:[email protected]>;epid=bzz
Route:
<sip:127.0.0.1:5080;transport=udp;lr;directive=NEW;previousappname=ClickToCallAsyncApplication;previousappid=518a13bd-7399-4293-842a-9fb70f614456>
Content-Length: 0
What version of the product are you using? On what operating system?
mss-3.0.0-SNAPSHOT-apache-tomcat-7.0.42-1311060029.zip from
https://mobicents.ci.cloudbees.com/job/Mobicents-SipServlets-Release/
Please provide any additional information below.
As you can see additional parameters correctly added to "TestAddress"
header, but it was removed for "From" header.
--
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.