-
Notifications
You must be signed in to change notification settings - Fork 70
fix(sip): send 487 Request Terminated after OK (CANCEL) for pending INVITE #372
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
base: main
Are you sure you want to change the base?
fix(sip): send 487 Request Terminated after OK (CANCEL) for pending INVITE #372
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for a PR! It looks good, except that inviteTx
must be accessed under a mutex only.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #372 +/- ##
==========================================
- Coverage 65.25% 62.56% -2.69%
==========================================
Files 51 32 -19
Lines 6588 6321 -267
==========================================
- Hits 4299 3955 -344
- Misses 1915 1992 +77
Partials 374 374 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@dennwc thanks for the suggestion. Fixed it. |
@mubashiroliyantakath you also need to check if the INVITE already got final response and in this case send BYE to terminate the session instead of 487. @dennwc livekit/sip does not support sip signaling and requires deep changes. also i believe sipgo lib already cover some cases by its own - no need to implement it on such low level |
5178728
to
17ddfb2
Compare
@zusrut although you are right about sipgo supporting dialogs, we do use an older version of it. We need to migrate to a newer version before we can rely on it. |
@dennwc any other change you expect to be made before this can be merged? or any concerns? |
…NVITE When a CANCEL is received for an INVITE that hasn't been answered, the SIP gateway now correctly sends a 487 response to the original INVITE. This ensures proper SIP transaction termination and avoids issues where upstream proxies (e.g., Brekeke) keep the call in an INVITE state due to the missing final response.
17ddfb2
to
6463a66
Compare
When a CANCEL is received for an INVITE that hasn't been answered, the SIP gateway now correctly sends a 487 response to the original INVITE. This ensures proper SIP transaction termination and avoids issues where upstream proxies (e.g., Brekeke) keep the call in an INVITE state due to the missing final response.
closes #371