sipcapture/hepfix.js

WARN could not find a valid CSeq in packet

alby-235 opened this issue · 5 comments

Im using oracle sbc to originate this traffic, for some reason the CSeq line does not appear to be terminated.

2021-05-12T17:30:08-04:00 WARN could not find a valid CSeq in packet
"SIP/2.0 200 OK\r\nVia: SIP/2.0/UDP ...:5060;branch=z9hG4bKkju2cl009gd2dgq58rn0;received=...\r\nCall-ID: 97311fc32e40429e3b0361c1957d5fbc0200o0g6p3200@...\r\nTo: sip:ping@...\r\nFrom: sip:ping@...;tag=30528f7f58da7664c49cb2144eaa67760o0g6p3\r\nCSeq: 223474 "
nodeID: 2017, protoType: 1, version: 2, protocol: 17, length: 289, flow: ...:5060->...:5160

Hey @alby-235 as mentioned in the other ticket, hepfix does not manipulate or add/remove newlines from messages. So this appears to be an issue of the malformed SIP message sender which remains as-is to the next hop - evidently the SBC is ok with it (or even generates it? not sure since there are no details to work with) but as you can surely confirm from any other valid message, a double newline terminator is required as per standard.

You could of course hack the code to add a double new-line when missing from SIP packets being encapsulated if you wish to, its a simple change but it can potentially affecting performance quite a lot.

i have opened a ticket with Oracle lets see what they say, as far as i know there is no way of changing the structure of the sip messages.

i set the config on hepfix to debug, here it looks like it recognizes the new line after the cseq

{ type: 'HEP',
version: 3,
payload_type: 'SIP',
captureId: 2017,
capturePass: 'oracme',
ip_family: 2,
protocol: 17,
proto_type: 1,
srcIp: '...',
dstIp: '...',
srcPort: 5060,
dstPort: 5060,
correlation_id: '06ccbe888c3952b8f859c1d4b48b91010200o0ims1100@...',
time_sec: 1620920702,
time_usec: 844 }
Sending HEP3 Packet to ...:9060...
258: SINGLE-MESSAGE
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.99.150.3:5060;branch=z9hG4bKol6nd3106o5hunsa9hp0;received=...
Call-ID: 06ccbe888c3952b8f859c1d4b48b91010200o0ims1100@...
To: sip:ping@...
From: sip:ping@***.***.***.***;tag=33c9751b6b0f343cbb6fc62ebbd65a3e0o0ims1
CSeq: 223609 OPTIONS
Content-Length: 0

@alby-235 please do not include us or our project in your tickets, we want no affiliation or contact with Oracle and their lawyers

i will not, thank you for your help!