MayamaTakeshi / sip-lab

A node module that helps to write SIP functional tests
3 stars 2 forks source link

Occasionally options.js fails with 'Cannot respond to our own request' #103

Open MayamaTakeshi opened 4 weeks ago

MayamaTakeshi commented 4 weeks ago
11:47:00.360  Match successful
11:47:00.360  Trying to set uas_req_id
11:47:00.360  
11:47:00.360  wait (options.js:40) got expected event:
11:47:00.360    {
    event: 'non_dialog_request',
    request_id: 1,
    transport_id: 1,
    msg: 'OPTIONS sip:bob@127.0.0.1:5061 SIP/2.0\r\n' +
  'Via: SIP/2.0/UDP 127.0.0.1:5060;rport;branch=z9hG4bKPj866b5b56-6613-452c-a70f-47ecf9f991f1\r\n' +
  'Max-Forwards: 70\r\n' +
  'From: <sip:alice@test1.com>;tag=b033d2cb-53be-4aa8-988f-4f3f2af010e4\r\n' +
  'To: <sip:bob@test1.com>\r\n' +
  'Contact: <sip:sip-lab@127.0.0.1:5060>\r\n' +
  'Call-ID: 58e21d7f-284c-4d3c-8f69-2f76f41c39b2\r\n' +
  'CSeq: 42325 OPTIONS\r\n' +
  'X-MyHeader1: aaa\r\n' +
  'X-MyHeader2: bbb\r\n' +
  'Content-Length:  0\r\n' +
  '\r\n'
  }
11:47:00.360  All expected events received
11:47:00.360  wait (options.js:40) finished
pjw_request_respond: request_id=1 json={"code":200,"reason":"OK","headers":{"X-SomeHeader1":"ccc","X-SomeHeader2":"ddd"}}

Error: Cannot respond to our own request
    at Object.respond (/home/takeshi/src/git/MayamaTakeshi/sip-lab/index.js:53:45)
    at test (/home/takeshi/src/git/MayamaTakeshi/sip-lab/samples/options.js:56:17)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
samples/options.js failed
MayamaTakeshi commented 4 weeks ago

Same issue as #48. The root cause probably is the same.