-
Notifications
You must be signed in to change notification settings - Fork 4
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
Updated with helper methods and better SIP URI parsing #2
base: master
Are you sure you want to change the base?
Conversation
Hi Kyle I am currently abroad on vacation. I will have a look at the PR during the Best Regard On Wednesday, 20 July 2016, Kyle Kurz [email protected] wrote:
|
No worries. I have my own fork that I'm using for now. Just figured I'd share my adjustments. |
That is perfect. I am really happy someone else is looking at the code. Johan On Thursday, 21 July 2016, Kyle Kurz [email protected] wrote:
|
…tion from previous commit, -DANDROID is only required if you're targetting the Android OS, lol
* upstream/master: Update README.md
Sorry for the delay on this one. I am leaning towards not merging it for the following reasons:
Thanks for the submission nevertheless, I will go through the details and see if there is something I can cherry pick. |
…buffer that has enough space
@johanlantz You're welcome to pull in any/none of my changes. We're using my fork in our production stuff. This latest set of changes comes off the fact that when you replace IPv4 -> IPv6, you're doing a pj_memcpy to a buffer that may not be as long as the data you want to print, eventually smashing the stack. I went ahead and modified the IPv6 -> IPv4 direction too, as we were having trouble with the exceptions as a way to know when the scanner found the requested item. For your comments on find_addr_start, it's not just proxies. You need to replace IPv6 on any SIP URI (if not going through a proxy, at least), and certainly a registration attempt will include a user field. I've not been able to find a way to synthesize an address on Android yet. This works for our environment and your module will just fail to replace on Android right now, so adding the option to set it seemed like the right way to handle it. Like I said, feel free to not merge in anything you want, I'm maintaining what works for us in my fork. |
Thanks for the feedback, I will keep that in mind. This is the first time I revise the code in almost a year so I am a bit rusty. Android is complicated. I thought it would have improved over time but it seems there is no clear solution. It is good that your workaround is functional and for a system which uses the same IP for media as signalling I think it is a correct solution. For systems having more than one media endpoint, the only obvious solution I see is for that system to inject a fqdm in the sdp and assign a domain name to each media endpoint. In theory that should work as well. Leaving this thread open for others to reference for the moment since everyone seems to have different challenges depending on their system. |
There was some duplicated code that I was adjusting and you weren't handling URIs that contained a user (sip:user@host), so I pulled the address start and finish detection out into separate functions that could be called from both pj_nat64_get_hostname_from_proxy_string and pj_nat64_resolve_and_replace_hostname_with_ip_if_possible. I also changed the end lookup to not require an explicit port. It still fails to find the end if you don't have either a port OR a transport listed explicitly. I'll be working on that next probably.