-
Notifications
You must be signed in to change notification settings - Fork 86
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
Conversation
… sip auth invites We were using the from number and that ran into issues when there were simultaneous calls from the same from number
…'t be an issue in the tests
log = log.WithValues("inviteStateFrom", from) | ||
// Extract SIP Call ID for tracking in-progress invites | ||
sipCallID := "" | ||
if h := req.CallID(); h != nil { |
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.
We should require CallID parameter the same way as we do with From header.
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.
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 ?
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.
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 { |
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.
Same here, we should require CallID to be set.
… sip auth invites
We were using the from number and that ran into issues when there were simultaneous calls from the same from number