Solved 3CX Iphone app does not connect with 4/5G network v20A

Status
Not open for further replies.

gregober1

SOHO User
Joined
Mar 28, 2024
Messages
15
Reaction score
3
We have a 3CX v20 with a simple setting (1 main number, 4 SDA).

3CX APP on I-phones can receive call "ok" when we are on the LAN (connected through WiFi) or when we are on other networks connected through WiFi.
But as soon as we get on a 4/5G network, the connectivity button turns grey and no call can be received.

I am not sure why exactly… It used to work with v.18 -- and not anymore.

Any clue or advise ?
 
Does the firewall checker pass?

The tunnel port and the https port need to be available externally.
 
  • Like
Reactions: OlegR_3CX
@gregober1
Sounds like a networking issue here.,
Once the firewall checker passes the test, let us know how it goes.
 
There is absolutely not pb with ports.
NetworkPorts:
  • SIP:5060
  • SIPS:5061
  • Tunnel:5090
  • Media:9000-10999
  • HTTP:80
  • HTTPS:443

Everything is opened as it should.
We receive calls, we can make calls, but when we roam outside of a WiFi (wether on our LAN or on other WiFi Network), it does not connect -- presence icon on top right becomes grey…
 
Did the firewall checker come back clean and green?

Does your 3CX server use IPv6?

Do you know if the same issue happens on Android 3CX Apps?

Does the presence indicator eventually turn green or always stay grey?
 
  • Like
Reactions: Kevin@voxtelesys
Did the firewall checker come back clean and green?
Yes all ports are opened and everything is green on the panel
Does your 3CX server use IPv6?
Yes, we have dual stack implemented.
Do you know if the same issue happens on Android 3CX Apps?
IDK - we don't use Android
Does the presence indicator eventually turn green or always stay grey?
The presence indicator turns green every time I am on a WiFI network, and greys when I roam to 4/5G network - and of course I can also access the admin panel and receive call from there.
 
Last edited:
Are you using a 3cx fqdn or a custom fqdn with a let’s encrypt cert? If so did you add the intermediate and root certificates for the CA?

Are you also able to access the webclient of this system, from the same iPhones browser, using mobile data?
 
Yes, we have dual stack implemented.
This is likely the issue. We have run into this before. My guess is that on mobile data you are making use of IPv6, whereas on WIFI networks, it is IPv4 only.
Over the past few months it appears Apple and Google have added IPv6 endpoints for Google Firebase and Apple Push (Where you get notified of an incoming call).

Android App: nslookup firebaseinstallations.googleapis.com
IOS App: nslookup api.push.apple.com

A few options:
- Disable IPv6 in /etc/network/interfaces
- Comment out all "ip6" in /etc/nftables.conf
- Modify /etc/nftables.conf to be compatible with icmpv6. You can test before and after the edit with ping -6 firebaseinstallations.googleapis.com

To make it IPv6 compatible;
Move this section,
Code:
       ip daddr 224.0.1.75 counter accept comment "Accept SIP Multicast"

        fib daddr type broadcast drop comment "Drop other broadcast"

        fib daddr type multicast drop comment "Drop other multicast"

        fib daddr type anycast drop comment "Drop other anycast"

        ip daddr 224.0.0.0/4 drop comment "Drop DVMRP"[

Underneath this section.
Code:
        # ICMPv4
        ip protocol icmp icmp type {
            echo-reply,  # type 0
            destination-unreachable,  # type 3
            time-exceeded,  # type 11
            parameter-problem,  # type 12
        } accept comment "Accept ICMP"

        ip protocol icmp icmp type echo-request limit rate 1/second accept comment "Accept max 1 ping per second"

        # ICMPv6
        icmpv6 type {echo-request,nd-neighbor-solicit,nd-neighbor-advert,nd-router-solicit,
             nd-router-advert,mld-listener-query,destination-unreachable,
             packet-too-big,time-exceeded,parameter-problem} accept

        ip6 nexthdr icmpv6 icmpv6 type echo-request limit rate 1/second accept comment "Accept max 1 ping per second"

If you are further interested, see http://shouldiblockicmp.com/

If you are Linux savvy, here are some instructions.
cp /etc/nftables.conf /etc/nftables.backup nano /etc/nftables.conf nft -c -f /etc/nftables.conf systemctl restart nftables

So you should have something like this:
(Keep in mind I have not tested what is below, I have only tested our custom ruleset.)
Code:
#!/usr/sbin/nft -f
# vim:set ts=4:
# You can find examples in /usr/share/nftables/.
# Default NFTables V20
# Clear all prior state
flush ruleset
# Basic IPv4/IPv6 stateful firewall for server/workstation.
table inet filter {
    chain input {
        type filter hook input priority 0; policy drop;
        iifname lo accept comment "Accept any localhost traffic"
        ct state { established, related } accept comment "Accept traffic originated from us"

        ct state invalid drop comment "Drop invalid connections"
        tcp dport 113 reject with icmpx type port-unreachable comment "Reject AUTH to make it fail fast"
        # 3CX PhoneSystem specific
        tcp dport { 80,443,5000,5001,5015,5060,5061,5090 } ct state new counter accept comment "Accept 3CX PhoneSystem TCP ports"
                udp dport { 69,5060,5090,7000-10999 } counter accept comment "Accept 3CX PhoneSystem UDP ports"
        # Other services specific
        udp dport { 137,138 } counter accept comment "Accept NetBIOS"
        tcp dport { 139,445 } counter accept comment "Accept TCP/IP MS Networking"
        # SSH Bruteforce blacklist
        tcp dport ssh ct state new limit rate 15/minute accept comment "Avoid brute force on SSH"
        # ICMPv4
        ip protocol icmp icmp type {
            echo-reply,  # type 0
            destination-unreachable,  # type 3
            time-exceeded,  # type 11
            parameter-problem,  # type 12
        } accept comment "Accept ICMP"
        ip protocol icmp icmp type echo-request limit rate 1/second accept comment "Accept max 1 ping per second"
        # ICMPv6
        icmpv6 type {echo-request,nd-neighbor-solicit,nd-neighbor-advert,nd-router-solicit,
             nd-router-advert,mld-listener-query,destination-unreachable,
             packet-too-big,time-exceeded,parameter-problem} accept
        ip6 nexthdr icmpv6 icmpv6 type echo-request limit rate 1/second accept comment "Accept max 1 ping per second"
        # Block *cast packets we haven't already accepted
        ip daddr 224.0.1.75 counter accept comment "Accept SIP Multicast"
        fib daddr type broadcast drop comment "Drop other broadcast"
        fib daddr type multicast drop comment "Drop other multicast"
        fib daddr type anycast drop comment "Drop other anycast"
        ip daddr 224.0.0.0/4 drop comment "Drop DVMRP"
    }
    chain forward {
        type filter hook forward priority 0; policy drop;
    }
    chain output {
        type filter hook output priority 0; policy accept;
    }
}

In my opinion if you don't require IPv6, the easiest solution is to disable IPv6.

I hope this provides you some direction. Let us know how it goes.
 
Last edited:
Are you using a 3cx fqdn or a custom fqdn with a let’s encrypt cert? If so did you add the intermediate and root certificates for the CA?
I am using xxxxxx.3cx.fr AFAICT the cert looks ok is valid and browser are happy with it.
Are you also able to access the webclient of this system, from the same iPhones browser, using mobile data?
I am able to access the webclient from the phone, connected through 5G, but it will randomly say that "can not open the page because no secure connexion can be established". But if I reload the page it will go through…

Isn't there a pb with IPv6 and certs ?
Because from the log in the 3cx, I can only see connexion made from the IPv4 of the telco operator -- and I know they are using dual stack…
 
Do you have IPV6 enabled on the 3cx side under the admin console > settings > network section? And does the 3cx system machine have a valid dual-stack IPV6 configuration on the Nic?

You can also enable the verbose logging on the 3cx mobile app from the settings section within the app and then close the app, join your mobile data network, and re-open the app.

Check if the status box is grey (no presence). If it says ready for calls, then it is connecting via the tunnel towards the 3cx system. You need to check what ports 5001 is being blocked. Maybe the firewall is dropping packets, some security services are enabled, or SSL inspection is not allowing the connection.

If both the status boxes are grey and not ready for calls, then both TCP port 5001 (if this is your https port) and tunnel connection are not possible.

In both cases, send the log from the app to your email and check through it for any clues.
 
Last edited:
This is likely the issue. We have run into this before. My guess is that on mobile data you are making use of IPv6, whereas on WIFI networks, it is IPv4 only.
Over the past few months it appears Apple and Google have added IPv6 endpoints for Google Firebase and Apple Push (Where you get notified of an incoming call).

Android App: nslookup firebaseinstallations.googleapis.com
IOS App: nslookup api.push.apple.com

A few options:
- Disable IPv6 in /etc/network/interfaces
- Comment out all "ip6" in /etc/nftables.conf
- Modify /etc/nftables.conf to be compatible with icmpv6. You can test before and after the edit with ping -6 firebaseinstallations.googleapis.com

To make it IPv6 compatible;
Move this section,
Code:
       ip daddr 224.0.1.75 counter accept comment "Accept SIP Multicast"

        fib daddr type broadcast drop comment "Drop other broadcast"

        fib daddr type multicast drop comment "Drop other multicast"

        fib daddr type anycast drop comment "Drop other anycast"

        ip daddr 224.0.0.0/4 drop comment "Drop DVMRP"[

Underneath this section.
Code:
        # ICMPv4
        ip protocol icmp icmp type {
            echo-reply,  # type 0
            destination-unreachable,  # type 3
            time-exceeded,  # type 11
            parameter-problem,  # type 12
        } accept comment "Accept ICMP"

        ip protocol icmp icmp type echo-request limit rate 1/second accept comment "Accept max 1 ping per second"

        # ICMPv6
        icmpv6 type {echo-request,nd-neighbor-solicit,nd-neighbor-advert,nd-router-solicit,
             nd-router-advert,mld-listener-query,destination-unreachable,
             packet-too-big,time-exceeded,parameter-problem} accept

        ip6 nexthdr icmpv6 icmpv6 type echo-request limit rate 1/second accept comment "Accept max 1 ping per second"

If you are further interested, see http://shouldiblockicmp.com/

If you are Linux savvy, here are some instructions.
cp /etc/nftables.conf /etc/nftables.backup nano /etc/nftables.conf nft -c -f /etc/nftables.conf systemctl restart nftables

So you should have something like this:
(Keep in mind I have not tested what is below, I have only tested our custom ruleset.)
Code:
#!/usr/sbin/nft -f
# vim:set ts=4:
# You can find examples in /usr/share/nftables/.
# Default NFTables V20
# Clear all prior state
flush ruleset
# Basic IPv4/IPv6 stateful firewall for server/workstation.
table inet filter {
    chain input {
        type filter hook input priority 0; policy drop;
        iifname lo accept comment "Accept any localhost traffic"
        ct state { established, related } accept comment "Accept traffic originated from us"

        ct state invalid drop comment "Drop invalid connections"
        tcp dport 113 reject with icmpx type port-unreachable comment "Reject AUTH to make it fail fast"
        # 3CX PhoneSystem specific
        tcp dport { 80,443,5000,5001,5015,5060,5061,5090 } ct state new counter accept comment "Accept 3CX PhoneSystem TCP ports"
                udp dport { 69,5060,5090,7000-10999 } counter accept comment "Accept 3CX PhoneSystem UDP ports"
        # Other services specific
        udp dport { 137,138 } counter accept comment "Accept NetBIOS"
        tcp dport { 139,445 } counter accept comment "Accept TCP/IP MS Networking"
        # SSH Bruteforce blacklist
        tcp dport ssh ct state new limit rate 15/minute accept comment "Avoid brute force on SSH"
        # ICMPv4
        ip protocol icmp icmp type {
            echo-reply,  # type 0
            destination-unreachable,  # type 3
            time-exceeded,  # type 11
            parameter-problem,  # type 12
        } accept comment "Accept ICMP"
        ip protocol icmp icmp type echo-request limit rate 1/second accept comment "Accept max 1 ping per second"
        # ICMPv6
        icmpv6 type {echo-request,nd-neighbor-solicit,nd-neighbor-advert,nd-router-solicit,
             nd-router-advert,mld-listener-query,destination-unreachable,
             packet-too-big,time-exceeded,parameter-problem} accept
        ip6 nexthdr icmpv6 icmpv6 type echo-request limit rate 1/second accept comment "Accept max 1 ping per second"
        # Block *cast packets we haven't already accepted
        ip daddr 224.0.1.75 counter accept comment "Accept SIP Multicast"
        fib daddr type broadcast drop comment "Drop other broadcast"
        fib daddr type multicast drop comment "Drop other multicast"
        fib daddr type anycast drop comment "Drop other anycast"
        ip daddr 224.0.0.0/4 drop comment "Drop DVMRP"
    }
    chain forward {
        type filter hook forward priority 0; policy drop;
    }
    chain output {
        type filter hook output priority 0; policy accept;
    }
}

In my opinion if you don't require IPv6, the easiest solution is to disable IPv6.

I hope this provides you some direction. Let us know how it goes.
Thx a lot for this help.

I am now connected correctly on the 5G !

I have taken the simple path and got rid of IPv6 (which is sad, because the latency that we have with IPv6 is quite fantastic).
The latency that we have with IPv4 is also excelent !

Anyway, had to re-provision my account and everthing is now "ok" and "green".
Thanks a lot - excellent support. Congratulation.
 
Status
Not open for further replies.

Latest Posts

Forum statistics

Threads
111,953
Messages
589,915
Members
164,850
Latest member
masvty