Pjsip transport: How to use IPv4+IPv6 Combined?

according to the pjsip documentation https://wiki.asterisk.org/wiki/display/AST/PJSIP+Transport+Selection, it is not recommended to use a wildcard [::] but to use fixed IPv6 addresses and fixed IPv4 addresses instead.

However, I cannot use a fixed IPv6 address since my ISP assigns a new IPv6 prefix at each reconnect.

Trying to use the wildcard [::], I end up with ONLY IPv6 registering. Even if I specify a IPv4 only SIP-server address.


retry_interval = 20
max_retries = 10
contact_user = SipgateUser
expiration = 120

type = auth

Trying to register, I receive the message:

Unfortunately PJSIP really just does not allow it. You really do need to have separate specific transports.

Rosch, an IPv4/IPv6 Dual Stack enabled Asterisk/res_pjsip and registering that to an IPv4-only (or even an IPv6) trunk should work, at least it does here since yesterday. However, you have to use the current source code of Asterisk 13 and then configure it with its bundled PJProject:
git clone --branch 13 http://gerrit.asterisk.org/asterisk
cd ./asterisk
sudo ./contrib/scripts/install_prereq
./configure --with-pjproject-bundled
sudo make install
or you wait until Asterisk 13.12.0. What must be written to pjsip.conf, can be found in issue report ASTERISK-26309… I am going to propose an update to your referenced Wiki article, when Asterisk 13.12.0 is released. If you face an issues, please, report as soon as possible so this can be investigated and go into the source code before Asterisk 13.12.0 is released. If feasible, please, try not just sipgate but easybell and DUStel as well.