Remote extension changes from public ip to private ip

Discussion in '3CX Phone System - General' started by netelligence, May 19, 2016.

Thread Status:
Not open for further replies.
  1. netelligence

    Joined:
    Sep 24, 2012
    Messages:
    30
    Likes Received:
    0
    Greetings,

    Using Yealink T46 and T41 phones. I am having an issue in a few cases where after having setup a remote extension it will register with the public ip address of the router and the assigned port that we've provisioned the phone with. Ex. 69.123.123.123:5079. After a while (not sure if it is hours or days) some of the phones will show with their private ip address. Ex. 192.168.44.55:5079. The logs will show also messages to/from the private ip address. When this happens, the audio on the phones no longer works. Calls will ring in, but only one side will have audio.

    What would be causing this? How does the phone inform the server of its ip address? And why would it be doing it wrong? After a reboot of the phone, the phone will show the public IP address and all is well again.

    Thanks,
    Netelligence
     
  2. leejor

    leejor Well-Known Member

    Joined:
    Jan 22, 2008
    Messages:
    10,360
    Likes Received:
    226
    Perhaps a STUN setting? NOT being enabled?
     
  3. netelligence

    Joined:
    Sep 24, 2012
    Messages:
    30
    Likes Received:
    0
    The phones are being autoprovisioned. The setting on 3cx is remote extension. I've verified on the phones that that it is set to use STUN. And like I said, all works until at some random moment the IP changes to the local IP.

    Thanks,
    Netelligence
     
  4. netelligence

    Joined:
    Sep 24, 2012
    Messages:
    30
    Likes Received:
    0
    Upon further inspection, I've been wiresharking the site and there is a difference between the phones that work and the ones that don't. Namely in the SIP Register event, in both the Via and Contact fields the IP address is wrong.

    Contact: <sip:121@10.1.10.96:5067>

    So when the phone is sending its register message, why would it put the local IP Address rather than the Public IP address even though it is set to STUN. And why does this happen intermittently? When the phone is rebooted, it works fine again.

    Thanks for any insight.

    Thanks,
    Netelligence
     
  5. leejor

    leejor Well-Known Member

    Joined:
    Jan 22, 2008
    Messages:
    10,360
    Likes Received:
    226
    I'm certainly not an expert on Yealink as I haven't used one, so someone else, familiar with the sets is more than welcome to "chime" in any time.

    When the set is re-booted, is it downloading a configuration file, or simply resetting?

    I'm wondering if there isn't something in the network that is causing a STUN request to return a local IP (just a wild guess).

    Did this just start, for no reason, or has it been going on for a while? Is there any sort of pattern, to the sets affected (firmware load?), or the time of day that this happens? Were there any changes (new equipment, or upgrades) made to your network recently?
     
  6. complex1

    complex1 Active Member

    Joined:
    Jan 25, 2010
    Messages:
    752
    Likes Received:
    38
    Hi,

    I have a few questions:
    - Are the Yealink phones running the same firmware?
    - Have you factory reset all the phones?
    - Did you checked if SIP ALG is disabled in the router?
    - Is the router running the latest available firmware?

    Workaround: if you have one way audio issues then enable “PBX delivers audio” in 3CX
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. netelligence

    Joined:
    Sep 24, 2012
    Messages:
    30
    Likes Received:
    0
    Thanks for all the ideas.

    To answer everyone's questions...
    I believe when the phones restart, they check the server to see if there is a new configuration file and if not simply reset.

    In my opinion, that seems to be the problem. Somehow it is making a STUN request and getting the local IP or not making a STUN request at all and just sending the local IP in the Register SIP Header.

    I have multiple clients and at these 3 client sites where I am seeing this, it has happened since the beginning. At first I saw it as an interesting annoyance that didn't seem to cause problems, however it is appearing that when this happens to the phones that are responsible for taking incoming calls from the outside, that it wreaks havoc on the inbound call. Other phones with this issue seem to work fine so long as they are not taking the inbound call initially. So it makes me think what is different with these 3 clients than the reset? 2 of the 3 are behind Cisco routers as their gateway and the other is simply behind a cable modem as it's gateway. My other clients where I don't see this problem are behind pfSense firewalls as their gateways.

    Yes, all are on the same firmware -- the newest one that 3cx downloads automatically from within v14

    These are brand new phones straight out of the box. Issue has been present from day 1.

    On these 3 sites, I don't have access to the router. However, after realizing the difference between these clients and the ones that work (as noted above), I am wondering if the routers are the problem. I will try to investigate this ALG issue. Would be easier if I controlled the router.

    Not sure. As noted, I don't get to control the router at these sites.

    Since these are remote extensions and the PBX is in the "Cloud", then PBX will always deliver audio for outside calls.

    Thanks again. Any further insight is greatly appreciated.

    Thanks,
    Netelligence
     
  8. leejor

    leejor Well-Known Member

    Joined:
    Jan 22, 2008
    Messages:
    10,360
    Likes Received:
    226
    This may very well be something to look at if the sets having an issue also have this in common.
     
  9. NickD_3CX

    NickD_3CX Support Team
    Staff Member 3CX Support

    Joined:
    Jun 2, 2014
    Messages:
    1,247
    Likes Received:
    61
    From my experience, this is usually caused by 2 things:
    - SIP ALG
    or
    - STUN Settings. Specifically either the phone has not been setup to have a STUN server and look up its IP, or I have seen other cases where the phone sends a Classic STUN request to 'learn' its Public IP, but that request is intercepted by the router which tells the phone its Local IP.

    What you could do to check the 2nd case is start capturing on the phone using the builtin Yealink option, force the phone to perform a new registration, then open the capture with wireshark and use the 'classicstun' filter. This should show you the phones STUN request and the response, what it contains and where it is coming from.
     
  10. ZenMasta

    ZenMasta New Member

    Joined:
    Mar 10, 2010
    Messages:
    174
    Likes Received:
    0
    Are the sip ports unique on all the phones? Any chance there are duplicates?
     
Thread Status:
Not open for further replies.