Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failure parsing OPTIONS message #7

Open
davehorton opened this issue Oct 26, 2022 · 2 comments
Open

failure parsing OPTIONS message #7

davehorton opened this issue Oct 26, 2022 · 2 comments
Labels
good first issue Good for newcomers

Comments

@davehorton
Copy link
Contributor

I've seen this from time to time

Error: failed to parse sip message
    at new SipMessage (/home/admin/apps/sbc-sip-sidecar/node_modules/drachtio-srf/lib/sip-parser/message.js:13:25)
    at DrachtioAgent._onMsg (/home/admin/apps/sbc-sip-sidecar/node_modules/drachtio-srf/lib/drachtio-agent.js:555:20)
    at WireProtocol.emit (node:events:527:28)
    at WireProtocol.emit (node:domain:475:12)
    at WireProtocol.processMessageBuffer (/home/admin/apps/sbc-sip-sidecar/node_modules/drachtio-srf/lib/wire-protocol.js:270:12)
    at WireProtocol._onData (/home/admin/apps/sbc-sip-sidecar/node_modules/drachtio-srf/lib/wire-protocol.js:304:14)
    at Socket.emit (node:events:527:28)
    at Socket.emit (node:domain:475:12)
    at addChunk (node:internal/streams/readable:315:12)
    at readableAddChunk (node:internal/streams/readable:285:11) unable to parse incoming message: OPTIONS sip:[email protected] SIP/2.0^M
Via: SIP/2.0/UDP 192.241.204.38:32836;branch=DGWKZR.0879634396;rport=32836;alias^M
From: sip:[email protected]:32836;tag=79133487^M
To: sip:[email protected]^M
Call-ID: [email protected]^M
CSeq: 1 OPTIONS^M
Contact: sip:[email protected]:32836^M
Content-Length: 0^M
Max-Forwards: 20^M
User-Agent: rkNLoahi^M
Accept: text/plain^M
^M
@davehorton
Copy link
Contributor Author

This is probably an issue with the underlying drachtio-srf library, since that is the code that is actually failing to parse the incoming message. However, I would suggest we proceed in the following fashion:

  • first, create a new test case in this repo, which sends that specific OPTIONS message (it can be copied from above, and a new sipp scenario file can be created from it under /test/scenarios)
  • verify that the test case fails currently -- it should fail with the above parsing error
  • now dive into the drachtio-srf code and figure out why the parser there is having trouble with it
  • submit a PR to drachtio server with a fix and a test case
  • after acceptance, update this project to use the new drachtio-srf release, verify the test case created in step 1 now works

@davehorton davehorton added the good first issue Good for newcomers label Oct 28, 2022
@vcidst
Copy link

vcidst commented Nov 4, 2022

Looks similar to drachtio/drachtio-srf#122

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants