[sr-dev] [kamailio/kamailio] nathelper: test sdp c line and sip source ip address is matched. (#2045)

Daniel-Constantin Mierla notifications at github.com
Tue Aug 27 12:39:54 CEST 2019


As I looked at the entire diff -- do not change the formatting of existing code/docs files when adding a new features. Now the diff has a lot of changes in the xml doc files making hard to spot what was changed. Patches to fix existing indentation and whitespaces are more than welcome, but must be dedicated commits/pull requests. It can stay here, but have in mind for the future.

I think further clarifications are needed, because there can be many c= lines in SDP and you return -1 with the first one when IPs matches, but maybe before or after that c= line it is a mismatch (e.g., audio session matches, video session mismatches). How should this be considered?

You can leave it like now, just explain in the docs.

Or, an idea, you can add one (or two) variable(s) to count the c= lines that match (and those that mismatch). Then at the end of the function you test if matches is same value as the number of sessions and return different value if all matched, or there was some partial matches, or no matches.

Also, I think there should be like return -2 (or other negative value) if SDP fails to be parsed, to be able to differentiate between error and match.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/2045#issuecomment-525244952
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20190827/fd24af79/attachment.html>


More information about the sr-dev mailing list