-
Notifications
You must be signed in to change notification settings - Fork 778
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
Add option for dual stack IPv4&IPv6 account config #3590
Conversation
pjsip/include/pjsip/sip_transport.h
Outdated
pjsip_tpselector_config config; | ||
|
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.
- perhaps this can be categorized as criteria, so it can be moved to be inside
union u
? - also, term
config
is perhaps too broad and currently the criteria is an enum (whileconfig
is more like a struct that can be expanded in the future), so what if using term likeip_ver
instead?
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.
just a very minor proposal below.
Final testing before merging. Test environment: dual stack Mac OS SIP registration tests:
Media tests:
|
To close #2146 .
Add the following options in pjsua for SIP/media account config:
And add field
pjsua_acc_config.ipv6_sip_use
in addition to the already existingipv6_media_use
.For backward compatibility and interoperability reasons, the default settings of the fields are:
ipv6_sip_use
:PJSUA_IPV6_ENABLED_NO_PREFERENCE
, which means that for SIP transport, it will depend on the address resolution result returned by the OS (pj_getaddrinfo()
) or by the resolver. Note that this is the current behavior.ipv6_media_use
:PJSUA_IPV6_ENABLED_PREFER_IPV4
, which means that outgoing offer will still use IPv4, but it's capable of receiving IPv6 media offer without any additional modification. For interoperability reason, IPv4 preference is recommended since not all endpoints support IPv6.Note: IPv6 usage setting may not apply for ICE media transport, depending on STUN configuration. This behavior is observable before this PR. We may need to modify ICE media transport IPv6 usage spec in the future, which is beyond the scope of this PR.