2

I am building a SIP application using mss (mobicents sip servlets).

P-Charging-Vector has icid-value and icid-generated-at parameters.

according to rfc3455, and rfc3261 both icid-value and icid-generated-at paramaters can be in a form of : "[" IPv6address "]".

I am using jain-sip-ri version 1.2.242 and facing two issues:

1)if i am getting a SIP request with icid-value in format of "[" IPv6address "]",

for example:

P-Charging-Vector: icid-value=[2a02:ed0:1000:3033::249];orig-ioi=1223abc4;icid-generated-at=[2a02:ed0:1000:3033::249]

i am getting the following exception, and the header is removed by the sip stack:

java.text.ParseException: [C@53fad5b4
Expecting  >>>;<<< got >>>[<<<
        at gov.nist.core.LexerCore.match(LexerCore.java:287)
        at gov.nist.javax.sip.parser.ims.PChargingVectorParser.parse(PChargingVectorParser.java:81)
        at gov.nist.javax.sip.parser.StringMsgParser.processHeader(StringMsgParser.java:294)
        at gov.nist.javax.sip.parser.StringMsgParser.parseSIPMessage(StringMsgParser.java:179)
        at gov.nist.javax.sip.stack.UDPMessageChannel.processIncomingDataPacket(UDPMessageChannel.java:357)
        at gov.nist.javax.sip.stack.UDPMessageChannel.run(UDPMessageChannel.java:317)
        at java.lang.Thread.run(Thread.java:745)

2)If i am trying to generate P-Charging-Vector with icid-value , or icid-generated-at parameters in format of "[" IPv6address "]", i am getting the same Parse exception.

seems like this isn't following the rfc.

Cœur
  • 37,241
  • 25
  • 195
  • 267
eran levi
  • 133
  • 2
  • 9

1 Answers1

1

Currently some IMS header parsers are not supporting the full https://www.rfc-editor.org/rfc/rfc3455#section-5.6 syntax, in terms of "gen-value" support (including "host" as defined by RFC3261 which includes the IPv6reference definition you need). This is also true for some other IMS header (fe P-Charging-Function-Addresses...).

I have created this issue to track this deviation https://github.com/RestComm/jain-sip/issues/105. If you are interested on contributing, I would lead you on how to reuse existing code in different parsers, to enable this feature. What do you think?

regards

Community
  • 1
  • 1
Jaime Casero
  • 371
  • 2
  • 6