drachtio / drachtio-server

A SIP call processing server that can be controlled via nodejs applications
https://drachtio.org
MIT License
237 stars 92 forks source link

Session Timer not cleared after 488 and BYE #313

Open rhondahollis opened 12 months ago

rhondahollis commented 12 months ago

I have a scenario where our webrtc client receives an INVITE that has an unsupported SDP (fax), so it responds to the INVITE with a 488 Not Acceptable Here, followed by a BYE. However, I still see Drachtio attempting to tear down the sip dialog due to session timer not being refreshed.

After the initial INVITE, session timer is set: 2023-09-13 18:38:33.931161 SipDialog::setSessionTimer: pnb0jcou6751in8ec9dr Session expires has been set to 90 seconds and refresher is them

Then on the next INVTE, 488 is received:

2023-09-13 18:38:39.030381 recv 353 bytes from wss/[x.x.x.x]:2336 at 18:38:39.030321: SIP/2.0 488 Not Acceptable Here Via: SIP/2.0/WSS x.x.x.x:8443;branch=z9hG4bKZHUUjgyBKDpHg To: ;tag=tsqcd2mlu0 From: <sip:redacted;tag=c1X8SNpevZ5Um Call-ID: pnb0jcou6751in8ec9dr CSeq: 3247 INVITE Supported: timer,ice,replaces,outbound Content-Length: 0

2023-09-13 18:38:39.030405 nta.c:3484 agent_recv_response() nta: received 488 Not Acceptable Here for INVITE (3247) 2023-09-13 18:38:39.030502 send 358 bytes to wss/[x.x.x.x]:2336 at 18:38:39.030454: ACK sip:redacted;transport=ws;ob SIP/2.0 Via: SIP/2.0/WSS x.x.x.x:8443;branch=z9hG4bKZHUUjgyBKDpHg Max-Forwards: 70 From: <sip:redacted;tag=c1X8SNpevZ5Um To: ;tag=tsqcd2mlu0 Call-ID: pnb0jcou6751in8ec9dr CSeq: 3247 ACK Content-Length: 0

2023-09-13 18:38:54.605946 recv 510 bytes from wss/[x.x.x.x]:2336 at 18:38:54.605830: BYE sips:x.x.x.x:8443;transport=wss SIP/2.0 Via: SIP/2.0/WSS redacted;branch=z9hG4bK5995408 Max-Forwards: 69 To: <sip:redacted;tag=c1X8SNpevZ5Um From: ;tag=tsqcd2mlu0 Call-ID: pnb0jcou6751in8ec9dr CSeq: 3247 BYE Allow: INVITE,ACK,CANCEL,BYE,UPDATE,MESSAGE,OPTIONS,REFER,INFO,NOTIFY Supported: outbound Content-Length: 0

2023-09-13 18:38:54.606040 ClientController::removeDialog - after removing dialogs count is now: 563 2023-09-13 18:38:54.606637 send 323 bytes to wss/[x.x.x.x]:2336 at 18:38:54.606586: SIP/2.0 200 OK Via: SIP/2.0/WSS redacted;branch=z9hG4bK5995408;received=x.x.x.x;rport=2336 From: ;tag=tsqcd2mlu0 To: <sip:redacted;tag=c1X8SNpevZ5Um Call-ID: pnb0jcou6751in8ec9dr CSeq: 3247 BYE Content-Length: 0

023-09-13 18:40:03.931188 SipDialog::doSessionTimerHandling - tearing down sip dialog with call-id pnb0jcou6751in8ec9dr because remote peer did not refresh the session within the specified interval 2023-09-13 18:40:03.931249 nta.c:10308 outgoing_resolve() nta(0x55b7b2bd0000): transport ws is not supported 2023-09-13 18:40:03.931263 SipDialogController::notifyTerminateStaleDialog - created orq 0x55b7b2bd0000 2023-09-13 18:40:03.931283 ClientController::route_request_inside_dialog - client managing dialog has disconnected: pnb0jcou6751in8ec9dr;from-tag=tsqcd2mlu0 2023-09-13 18:40:03.931288 ClientController::removeDialog - dialog not found: pnb0jcou6751in8ec9dr;from-tag=tsqcd2mlu0