Skip to content

Using sipCallID to map the inviteState and the challenge data between… #418

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

Merged
merged 6 commits into from
Jul 21, 2025

Conversation

nishadmusthafa
Copy link
Contributor

… sip auth invites

We were using the from number and that ran into issues when there were simultaneous calls from the same from number

… sip auth invites

We were using the from number and that ran into issues when there were simultaneous calls from the same from number
@nishadmusthafa nishadmusthafa requested a review from a team as a code owner July 18, 2025 22:46
@nishadmusthafa nishadmusthafa requested a review from dennwc July 18, 2025 22:47
@nishadmusthafa nishadmusthafa removed request for a team and dennwc July 19, 2025 00:46
@nishadmusthafa nishadmusthafa requested a review from dennwc July 19, 2025 01:02
log = log.WithValues("inviteStateFrom", from)
// Extract SIP Call ID for tracking in-progress invites
sipCallID := ""
if h := req.CallID(); h != nil {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should require CallID parameter the same way as we do with From header.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually thought about that. But I was wondering if we should do that at the sipgo level(if it isn't already being done) when parsing the invite. Invite without sipcallID won't be valid at all right ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It may be done on the dialog level of sipgo, but for us it looks like it can still be nil. I was thinking that we could add it to the call structure or just get the header earlier and pass it along. We do a similar check for other headers.

@@ -266,12 +271,19 @@ func (s *Server) processInvite(req *sip.Request, tx sip.ServerTransaction) (retE
cc.Processing()
}

// Extract SIP Call ID directly from the request
sipCallID := ""
if h := req.CallID(); h != nil {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, we should require CallID to be set.

@nishadmusthafa nishadmusthafa merged commit 5cc1f17 into main Jul 21, 2025
6 checks passed
@nishadmusthafa nishadmusthafa deleted the fix-for-failed-auths branch July 21, 2025 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants