Skip to content
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

Moved 180 Ringing response from core to app (menu module) #1167

Closed
wants to merge 2 commits into from
Closed

Conversation

juha-h
Copy link
Contributor

@juha-h juha-h commented Jul 24, 2024

Required by baresip/baresip#3088

@juha-h juha-h changed the title Allow 100 response code in sipsess_accept Moved 180 Ringing response from core to app (menu module) Jul 25, 2024
if (!sessp || !sock || !msg || scode < 101 || scode > 299 ||
!cuser || !ctype)
if (!sessp || !sock || !msg || (scode != 0 && scode < 100) ||
scode > 299 || !cuser || !ctype)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I am not sure with this. Why not directly use sipsess_alloc()?

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'll investigate.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sipsess_alloc() is not in re API.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@cspiel1 What is wrong with sipsess_accept()? In addition to sipsess_alloc() it does lots other stuff that would also need to be handled separately:

err = sip_dialog_accept(&sess->dlg, msg);
	if (err)
		goto out;

	hash_append(sock->ht_sess,
		    hash_joaat_str(sip_dialog_callid(sess->dlg)),
		    &sess->he, sess);

	sess->msg = mem_ref((void *)msg);

	err = sip_strans_alloc(&sess->st, sess->sip, msg, cancel_handler,
			       sess);

So I would prefer to keep the PR as it currently is. I have made tests and they all have worked fine.

Copy link
Collaborator

Choose a reason for hiding this comment

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

In my opinion sipsess_accept() should send a reply. @alfredh and @sreimers please review and decide!

Should we revert this, when we have another solution?

@juha-h
Copy link
Contributor Author

juha-h commented Jul 29, 2024 via email

@maximilianfridrich
Copy link
Contributor

maximilianfridrich commented Jul 30, 2024

The 100 Trying response was not accepted before. See response of Alfred:

please read the spec carefully regarding 100 usage and 101-199 replies:
https://datatracker.ietf.org/doc/html/rfc3261#section-21.1.1
100 Trying should only be sent by a SIP Proxy...

#808 (comment)

@juha-h
Copy link
Contributor Author

juha-h commented Jul 30, 2024 via email

@cspiel1
Copy link
Collaborator

cspiel1 commented Aug 27, 2024

@juha-h Can we close this?

@juha-h
Copy link
Contributor Author

juha-h commented Aug 27, 2024

Yes, forgot about the re PR when I closed the baresip PR.

@juha-h juha-h closed this Aug 27, 2024
@sreimers sreimers deleted the 1xx branch August 27, 2024 07:37
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.

5 participants