-
Notifications
You must be signed in to change notification settings - Fork 2.6k
feature: forward sip subscription content #3603
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
feature: forward sip subscription content #3603
Conversation
|
Thanks for your contribution, @digiboridev! Please make sure you sign our CLA, as it's a required step before we can merge this. |
lminiero
left a comment
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.
Thanks, this looks useful! A couple of notes inline.
src/plugins/janus_sip.c
Outdated
| json_t *content_type_text = json_object_get(root, "content_type"); | ||
| if(content_type_text && json_is_string(content_type_text)) | ||
| content_type = json_string_value(content_type_text); | ||
| /* Retrieve the content message */ |
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.
Indentation of this comment seems broken.
|
It looks like merging #3602 introduced a conflict here, could you take care of it? As a side note, please let me if you have questions on my previous note on validation, as I think that's the only thing that needs addressing before we can merge this too. |
Yes |
|
It looks like there's still a conflict, for the thing you fixed in #3602. Edit: nevermind that, it was Github showing me old stuff 🙈 |
lminiero
left a comment
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 added a couple of small notes.
That said, it came to my mind that, now that you added two new optional parameters, they should be documented too. You can find the existing documentation for the subscribe request around line 512, which is where we have the text that says
To do that, you need to use the \c subscribe
You'll simply need to add the two new optional parameters in the snippet that follows, before the headers line.
src/plugins/janus_sip.c
Outdated
| const char *msg_content = NULL; | ||
| json_t *msg_content_text = json_object_get(root, "content"); | ||
| if(msg_content_text && json_is_string(msg_content_text)) | ||
| msg_content = json_string_value(msg_content_text); |
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.
Indentation is broken here.
|
Looks good, thanks, merging! |
This changes just allows to make batched subscription like that: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-sip/e343a68d-45d2-476e-9145-6710dc4a5f02