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

iOS IPv6 new problem: contact from IPv6 transport combined with port from IPv4 transport #3687

Closed
ednt opened this issue Sep 6, 2023 · 1 comment

Comments

@ednt
Copy link

ednt commented Sep 6, 2023

Describe the bug

We created all possible transports, but let PJSUA decide which one to use.
(cause of IP change)

We use also a proxy.
We use CFHOST as getaddrinfo method, because apple prefer this.

Now we run into the situation, that the registration fails, because the used transport is wrong (IPv4) but the address
of IPv6 is used in contact (without []), so the contact URI is wrong.

In the contact line you can see the used port: 63621
This port is dedicated to the UDP socket reachable at 10.148.209.114:63621

But the contact address 2a02:3037:410:d113:dc5:bb37:c8c4:aae4 is from UDP socket reachable at 2a02:3037:410:d113:dc5:bb37:c8c4:aae4:51433

Steps to reproduce

Compile it for iOS create all transports, use a proxy and switch between different network protocols.

PJSIP version

2.13.1

Context

iPhone 7
iOS 15

Log, call stack, etc

06 14:26:24.850:            tcptp:52888 SIP TCP listener ready for incoming connections at 10.148.209.114:52888
06 14:26:24.856:            tcptp:52889 SIP TCP listener ready for incoming connections at [2a02:3037:410:d113:dc5:bb37:c8c4:aae4]:52889
06 14:26:24.859:           pjsua_core.c SIP UDP socket reachable at 10.148.209.114:63621
06 14:26:24.860:         udp0x10686aff0 SIP UDP transport started, published address is 10.148.209.114:63621
06 14:26:24.865:           pjsua_core.c SIP UDP socket reachable at 2a02:3037:410:d113:dc5:bb37:c8c4:aae4:51433
06 14:26:24.866:       udpv60x106856030 SIP UDP IPv6 transport started, published address is [2a02:3037:410:d113:dc5:bb37:c8c4:aae4]:51433
06 14:26:24.871:            pjsua_acc.c Adding account: id=sip:[email protected];transport=udp
06 14:26:24.873:            pjsua_acc.c Account sip:[email protected];transport=udp added with id 0
06 14:26:24.874:            pjsua_acc.c Acc 0: setting registration..
06 14:26:24.882:              sip_reg.c Invalid Contact: "<sip:xxxxxx@2a02:3037:410:d113:dc5:bb37:c8c4:aae4:63621;ob>"
06 14:26:24.883:            pjsua_acc.c Client registration initialization error: Invalid URI (PJSIP_EINVALIDURI) [status=171039]
06 14:26:24.884:            pjsua_acc.c Unable to create registration: Invalid URI (PJSIP_EINVALIDURI) [status=171039]
@ednt ednt changed the title iOS IPv6 new problem iOS IPv6 new problem: contact from IPv6 transport combined with port from IPv4 transport Sep 6, 2023
@sauwming
Copy link
Member

This seems to be a duplicate/already included in #3681, so we'll continue/combine the discussion there.

@sauwming sauwming closed this as not planned Won't fix, can't repro, duplicate, stale Sep 18, 2023
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

No branches or pull requests

2 participants