我尝试将REGISTER消息发送到I-CSCF,如下所示。 P-Charging-Vector标头添加到消息中,如下所示。我检查了发出的数据包,并删除了此标头。它似乎被SipServletRequestImpl.send()之后运行的代码删除。 另一个问题与其中的orig-ioi参数有关。它被设置为orig-ioi =“Type 1cscf@homedomain.com”,但报价将被删除,您可以在下面看到REGISTER消息。
你对这个问题有什么看法吗?这是一个已知的错误或限制吗?
代码如下:
sipFactory = (SipFactory) envCtx.lookup("sip/wae-base-sipt/SipFactory");
SipApplicationSession appSession = sipFactory.createApplicationSession();
SipServletRequest req = sipFactory.createRequest(appSession, "REGISTER", "bob@yahoo.com", "bob@yahoo.com");
String icid = java.util.UUID.randomUUID().toString();
req.addHeader("P-Charging-Vector", "icid-value" + "=\"" + icid + "@47.168.150.25\";" +"orig-ioi=\"Type 1cscf@homedomain.com\"");
其输出:
Message:
DEBUG [org.mobicents.servlet.sip.message.SipServletRequestImpl] Sending the request REGISTER sip:kk1ims1.com:5060;transport=TCP SIP/2.0
Call-ID: 754594ab40ed56ac1cfa652f88364594@10.15.3.11
CSeq: 1 REGISTER
From: <sip:u6003@kk1ims1.com>;tag=28124480_0efbfc5e_9721c6b0-76c7-4c86-a352-361f52731204
To: <sip:u6003@kk1ims1.com>
Max-Forwards: 70
Route: <sip:10.15.3.11:5065;lr;transport=udp;node_host=10.15.3.11;node_port=5180>
Route: <sip:27.14.2.1:5060;lr>
P-Charging-Vector: icid-value="18234_1374589491316@27.14.152.1";orig-ioi=Type 1cscf@homedomain.com
User-Agent: WAM 7.0
Expires: 600000
Contact: <sip:u6003@27.14.152.1:5060;domain=kk1ims1.com>;maddr=27.14.152.1;g.3gpp.icsi_ref="urn%3Aurn-7%3A3gpp-service.ims.icsi.mmtel";video;sip.instance="<urn:uuid:sip:u6003@kk1ims1.comsip:u6003@kk1ims1.com>"
Supported: path
Authorization: Digest username="u6003@kk1ims1.com",uri="sip:u6003@kk1ims1.com:5060",response="",integrity-protected=no
P-Visited-Network-ID: Leia
Require: path
Path: <sip:pcscf@27.14.152.1:5060;lr;net-orig>
Via: SIP/2.0/UDP 27.14.152.1:5060;branch=z9hG4bK9721c6b0-76c7-4c86-a352-361f52731204_0efbfc5e_649047033197297
Content-Length: 0
Packets:
10.15.3.11 (Src Port: 5180) -> 10.15.3.11 (Dst Port: ca-2 (5065)) => Header exists in packet
27.14.152.1 (Src Port: 5060) -> 27.14.2.1 (Dst Port: ca-2 (5065)) => Header does not exist in packet
使用1.2.167版本的jain-sip-ri创建PChargingVector标头。
String val1 = "icid-value=\"218ace3d-12e7-4eb6-87a2-0bc7a744743d@47.168.150.25\";orig-ioi=\"1cscf@homedomain.com\"";
Header header1 = SipFactory.getInstance().createHeaderFactory().createHeader("P-Charging-Vector", val1);
System.out.println(header1.toString());
输出:
P-Charging-Vector:icid-value =“218ace3d-12e7-4eb6-87a2-0bc7a744743d@47.168.150.25”; orig-ioi = 1cscf@homedomain.com
提前致谢
hozlem
答案 0 :(得分:0)
JSIP不喜欢第二个参数周围缺少引号。标题应该像这样传递:
P-Charging-Vector: icid-value="18234_1374589491316@27.14.152.1";orig-ioi="Type 1cscf@homedomain.com"
我不确定它是否正式要求,但JSIP要求它。当我有更多时间时,我可以看看并解决它。