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

Improve IP address change IPv4 <-> IPv6 #3910

Merged
merged 3 commits into from
Apr 3, 2024
Merged

Conversation

sauwming
Copy link
Member

@sauwming sauwming commented Mar 28, 2024

IP address change wiki: https://docs.pjsip.org/en/latest/specific-guides/network_nat/ip_change.html

The PR contains several improvements:

  • From the old wiki (/~https://github.com/pjsip/pjproject_docs/blob/dfcca929aa5ce9ca47ce729188d0cb2daf5f0b8a/docs/source/specific-guides/network_nat/ip_change.rst): Notes: to maintain ongoing calls, update to RTP/RTCP address and update dialog’s Contact is needed using re-INVITE. However sending re-INVITE might fail when route set is still using IPv4 (e.g: Record-route returned contains IPv4). In this case, forcefully disconnect the call is recommended.
    Unfortunately this means that a lot of calls will be broken upon IP change. The proposed solution here is that if pjsip_get_dest_info() returns an address that mismatches the IP address version transport config, we revert back to using dlg->initial_dest to allow resolving the address again when sending re-INVITE.
  • To address point 4 of Registration issues with IP change scenario IPv4<->IPv6. #3012.
    Currently, our wiki recommends calling pjsua_acc_modify() followed by pjsua_handle_ip_address_change(). This causes the registration sent by pjsua_acc_modify() to fail because it still uses the old transport. The solution is to add disable_reg_on_modify field, that allows disabling sending registration upon account modification.
  • Update existing calls' transport preference upon IP address change.

@sauwming sauwming requested review from nanangizz and trengginas April 1, 2024 04:13
@sauwming sauwming self-assigned this Apr 1, 2024
@sauwming sauwming added this to the release-2.15 milestone Apr 1, 2024
@sauwming sauwming merged commit e7e7f28 into master Apr 3, 2024
35 checks passed
@sauwming sauwming deleted the ip-change-ipv4-ipv6 branch April 3, 2024 10:04
dshamaev-intermedia pushed a commit to intermedia-net/pjproject that referenced this pull request Apr 4, 2024
dshamaev-intermedia pushed a commit to intermedia-net/pjproject that referenced this pull request Apr 4, 2024
dshamaev-intermedia added a commit to intermedia-net/pjproject that referenced this pull request Apr 4, 2024
* Add missing openssl SECLEVEL=0 support (pjsip#3890)

Previous SECLEVEL support allowed for levels 1-5.
However, openssl defines levels 0-5. [1]

Recent openssl versions (3.0+) have moved previous
popular ciphers/key lengths (i.e. RSA1024withSHA1)
into level 0, so it is now a reasonable choice to use.

Add support for level 0.

[1] https://www.openssl.org/docs/man3.2/man3/SSL_CTX_set_security_level.html

* Enable Late Offer Answer Mode (LOAM) feature in the pjsua (pjsip#3869)

* Fix warnings for 32-bit compiler and misc fixes. (pjsip#3896)

* Add some missing unlocks (pjsip#3893)

* Prevent race condition in DTLS media stop (pjsip#3901)

* Fix data race reported by ThreadSanitizer in caching pool (pjsip#3897)

* Fixed Metal renderer memory leak (pjsip#3909)

* Fixed DTLS clock stoppage race (pjsip#3905)

* Improve IP address change IPv4 <-> IPv6 (pjsip#3910)

---------

Co-authored-by: naf <naf@sdf.org>
Co-authored-by: Goodicus <15110766+goodicus@users.noreply.github.com>
Co-authored-by: Amilcar Ubiera <chopin952@gmail.com>
Co-authored-by: Santiago De la Cruz <51337247+xhit@users.noreply.github.com>
Co-authored-by: sauwming <ming@teluu.com>
Co-authored-by: Nanang Izzuddin <nanang@teluu.com>
Co-authored-by: dshamaev-intermedia <105777082+dshamaev-intermedia@users.noreply.github.com>
dshamaev-intermedia added a commit to intermedia-net/pjproject that referenced this pull request Apr 5, 2024
* Add option to shutdown all transports on IP change (pjsip#3781)

* pjsua_handle_ip_change: Added missing null check for on_ip_changed_progress callback (pjsip#3830)

* Reset stored remote name in dialog (dlg->initial_dest) if transport is server. (pjsip#3783)

* Prevent immediate tsx termination upon transport error (pjsip#3805)

* Fixed issues when adding new media and deinitializing media (pjsip#3821)

* Potential issues when IPv6 is disabled (pjsip#3835)

* Improve IP address change IPv4 <-> IPv6 (pjsip#3910)

* Add some missing unlocks (pjsip#3893)

* add missing unlock (pjsip#3885)

* Retransmit 2xx response when transport is closed (pjsip#3828)

* Fixed account's route set update when modifying account (pjsip#3825)

---------

Co-authored-by: Nanang Izzuddin <nanang@teluu.com>
Co-authored-by: sauwming <ming@teluu.com>
Co-authored-by: Santiago De la Cruz <51337247+xhit@users.noreply.github.com>
Co-authored-by: Andreas Wehrmann <andreas-wehrmann@users.noreply.github.com>
Co-authored-by: Riza Sulistyo <trengginas@users.noreply.github.com>
dshamaev-intermedia added a commit to intermedia-net/pjproject that referenced this pull request Jun 12, 2024
* Add missing openssl SECLEVEL=0 support (pjsip#3890)

Previous SECLEVEL support allowed for levels 1-5.
However, openssl defines levels 0-5. [1]

Recent openssl versions (3.0+) have moved previous
popular ciphers/key lengths (i.e. RSA1024withSHA1)
into level 0, so it is now a reasonable choice to use.

Add support for level 0.

[1] https://www.openssl.org/docs/man3.2/man3/SSL_CTX_set_security_level.html

* Enable Late Offer Answer Mode (LOAM) feature in the pjsua (pjsip#3869)

* Fix warnings for 32-bit compiler and misc fixes. (pjsip#3896)

* Add some missing unlocks (pjsip#3893)

* Prevent race condition in DTLS media stop (pjsip#3901)

* Fix data race reported by ThreadSanitizer in caching pool (pjsip#3897)

* Fixed Metal renderer memory leak (pjsip#3909)

* Fixed DTLS clock stoppage race (pjsip#3905)

* Improve IP address change IPv4 <-> IPv6 (pjsip#3910)

* pjsua_acc: Fix warnings for comparison between ‘pjsua_nat64_opt’ and ‘enum pjsua_ipv6_use’ (pjsip#3915)

* Fix to ext_fmts accessed out of stack scope. (pjsip#3916)

* Add check in siprtp sample app for inactive audio media (pjsip#3927)

* Add function to initialize MediaFormat audio & video (pjsip#3925)

* Fixed incorrect SDP buffer length calculation (pjsip#3924)

* Support Push Notification in iOS sample app (pjsip#3913)

* Fixed PJSUA2 API to get/set Opus config (pjsip#3935)

* Fix bad address length check in pj_ioqueue_sendto(). (pjsip#3941)

* Fix warning of uninitialized value in fuzz-crypto (pjsip#3946)

* Print log on successful send (pjsip#3942)

* Fixed CI Mac build failure (pjsip#3947)

* Update Android JNI audio dev to use 16bit PCM only (pjsip#3945)

* Add TLS/SSL backend: Windows Schannel (pjsip#3867)

* pjsip_find_msg: Log warning if Content-Length field not found (pjsip#3960)

* Fix audiodev index (pjsip#3962)

* Fix assertion on call hangup from DTMF callback (pjsip#3970)

* Fix yaml error in github feature template (pjsip#3972)

* Fix version string in Python setup (pjsip#3976)

* Prevent pjmedia_codec_param.info.enc_ptime_denum division by zero in stream (pjsip#3975)

---------

Co-authored-by: naf <naf@sdf.org>
Co-authored-by: Goodicus <15110766+goodicus@users.noreply.github.com>
Co-authored-by: Amilcar Ubiera <chopin952@gmail.com>
Co-authored-by: Santiago De la Cruz <51337247+xhit@users.noreply.github.com>
Co-authored-by: sauwming <ming@teluu.com>
Co-authored-by: Nanang Izzuddin <nanang@teluu.com>
Co-authored-by: dshamaev-intermedia <105777082+dshamaev-intermedia@users.noreply.github.com>
Co-authored-by: CI Bot <noreply@intermedia.com>
Co-authored-by: Pau Espin Pedrol <pespin.shar@gmail.com>
Co-authored-by: Riza Sulistyo <trengginas@users.noreply.github.com>
Co-authored-by: Andreas Peldszus <andreas.peldszus@posteo.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants