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

call,event: add CALL_HOLD and CALL_RESUME events and fix call resume requests #2771

Merged
merged 2 commits into from
Oct 23, 2023

Conversation

cspiel1
Copy link
Collaborator

@cspiel1 cspiel1 commented Oct 20, 2023

This reduces complexity in the application code

  • A few simple lines in baresip can reduce the complexity in the application if a call-on-hold information should be displayed.
  • Fixes also multiple re-INVITES for resumes in a row if there is only one call.

This reduces complexity in the application code
Function uag_hold_resume() had a bug that caused multiple on-hold - resume
re-INVITES of a single call.
@cspiel1 cspiel1 changed the title call,event: add CALL_HOLD and CALL_RESUME events call,event: add CALL_HOLD and CALL_RESUME events and fix call resume requests Oct 20, 2023
@juha-h
Copy link
Collaborator

juha-h commented Oct 21, 2023 via email

@cspiel1
Copy link
Collaborator Author

cspiel1 commented Oct 23, 2023

Not sure what you mean. So here are two explanations:

  • There are multiple other code sections where the result of a bitwise operator is used as a boolean expression. Benefit: It is the shortest form. E.g. in src/video.c
./src/video.c:1279:	if (dir & SDP_SENDONLY)
  • The SDP media object where m points to may be changed by sdp_decode() in line 1834. Because the list of sdp_media is tracked by the sdp_session where call->sdp points to. The first test is true exactly if SDP_SENDONLY bit is cleared in the media direction of the audio stream. The second if the bit is set.

@juha-h
Copy link
Collaborator

juha-h commented Oct 23, 2023

Thanks for the explanation. I didn't understand that sdp_decode may change sdp_media_dir(m), i.e., that making the same call two times can give different result.

@alfredh alfredh merged commit 8c2f583 into baresip:main Oct 23, 2023
17 checks passed
@cspiel1 cspiel1 deleted the call_hold_resume_events branch October 23, 2023 07:19
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.

None yet

3 participants