No Presence Out of Lan ( Temp Solution )

Discussion in 'iOS' started by smartspotgr, Mar 21, 2016.

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

    Mar 11, 2016
    Likes Received:
    Device Info
    Phone Model: iPhone
    Generation: 5c
    Firmware Version: 9.2.1
    Jailbreak: NO
    Cydia Installed: NO

    Issue Info
    Handset: Phone
    Connection: WiFi|3G
    Server: External

    I had the same problem as many others with Timeout Messages and no Presence issue.

    I read many topics and answers and i finally understood that i have to configure at the router that hosts 3CX PBX, not only a port mapping with ports 5000 to 5000 and 5001 to 5001 ( also 5060, 5090 etc ) but ALSO I MUST configure port 80 to 5000 and 443 to 5001.

    Then everything is working fine.

    But this isn't a right solution. Since i use Abyss ( and many others ) and i have a specific setting on my PBX for use ports 5000 and 5001 about 3cx web services, i need to have ports 80 and 443 free for use with other applications.

    I have to highlight that 3CX Phone on Windows PC works fine WITHOUT port mapping ports 80 and 443. The problem appears only when i use my iphone.

    So the problem is that 3CX has to improve 3CX Phone for IOS and FIX the problem.

    If the settings for web services are set to ports 5000 and 5001, there is no reason that IOS app sticks and asks ports 80 and 443 untill a time out just because no answers are given from the router.

    I repeat that the application in Windows PC is working perfect without port mapping ports 80 and 443.

    I m sure that you can do your best and solve the problem.

    Thanks a lot

  2. complex1

    complex1 Active Member

    Jan 25, 2010
    Likes Received:

    If you are using the Abyss Web Service, forwarding ports 5000(TCP), 5001(TCP) and 5090(TCP/UDP) will be sufficient to ensure a proper working of the 3CXPhone for IOS through the Tunnel.
    If you don’t use the Tunnel then forward ports 5000, 5001, SIP and RTP.

    I have forward ports 5000, 5001, SIP, 9000-9499, 5090, 2195-2196, 5223 and 5228-5230 so when I am traveling (all over the world) I can make and receive phone calls with my iPhone without any issues. Even in countries who blocked VoIP calls. Also Presence is working fine... always.

    iPhone 5s, iOS 9.2.1, 3CXPhone for IOS v14.0.4, 3G/4G, WiFi
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. smartspotgr

    Mar 11, 2016
    Likes Received:
    Hi there,

    As i saw in your profile and from the hundrend of posts, i understand that you must be very experienced on 3CX phone system, so thank you very much for your answer.

    I read a lot of complains about no presence issue. Also i had the same problem too.

    But pls think all of them who search in a forum to find a solution ( i did the same ). They really have a problem. Else, there would be no topic or a post about no presence issue.

    My experience on networks, taught me that when a problem apears, there could be many reasons. And also there could be many ways to solve a problem or bypass it.

    My suggestion bypasses a problem that really exist ( i had already port forwarded ports 5000,5001,5070 (as 3CX sip port, also configured in 3CX System ), 5090 to server's 3CX System local IP ) and not solving it ( as i mention on the title ).

    And because in my first post, i wasn't so detailed, i will do so now.

    The problem appears because of two reasons:

    a) when the work network ( that hosts 3CX System ) and the roaming network that a mobile user temporary uses with a wifi connection ( like home wifi, a free wifi in a coffe shop etc ) are configured to use the same ip address range as for example .

    b) the app 3CX Phone has two different logic reactions for the mechanisms of sip registration ( for placing calls ) and web services registration ( for presence and more ) when registration to 3CX System on a work network is placed from a roaming network.

    Explanation of a) section.

    Usually all the dsl modems of telephone and internet carriers are preconfigured to listen to ip, less times to and even rare in .

    So none changes this address and whole business networks built in this range, again and again and again. When i have to intergrate a Voip PBX with Sip phones and Sip Gateways, i must use the same range and i cannot change the IPs of existing hardware to a new range because there will be a very big confusion with setting up again all server-client software etc.

    Even if you can change your home ip range, you surely can't change the ip range in guest networks like coffe shops.

    In my business place, we use the ip range .
    As you, I also have no problem with using 3CX Phone in my IOS device when i roam to other wifi networks.

    But in my home network i use ip range .

    I always setup on my IOS device and on my Windows PC a test account on 3CX Phone app, of every new Voip system that i install to my clients, for testing purposes.

    And guess what happens. When i login to my 3CX System ( ) everything works fine on both devices.
    When i login to my client's 3CX System ( same as in my home network ), Windows pc app works fine, IOS app registers for making calls, accepts push, but presence is not working.

    When i add a port mapping to my client's work router for port 80 mapping to 5000 and 443 mapping to 5001, then the problem is bypassed.

    And why i'm saying bypassed? Because of a wierd logic that 3CX Phone uses for registering in a 3CX System when IOS device is in a roaming network.

    Explenation of b) section.

    When i run on my IOS device the 3CX Phone app and it comes to foreground, it tries at the same time ( as specified to provisioned file ):

    1) to register for sip calls using as target address, the server's local ip address with sip port and the server's internet FQDN or static ip ( also using Tunnel if selected ).

    In this point, the app understands if the device is located in work network or to a roaming network comparing the provided ip from DHCP with the range that is described in provisioned file about server's local ip.

    If two ranges are not the same, then its easy for app to understand that it has to use the server's internet FQDN or static ip.
    If two ranges are the same, the app is trying to register to 3CX System using the server's local ip and of course because in the roaming network there is no 3CX System server, after few seconds message "Not Registered" appears on the screen.
    At once the app does a reregistration try to server's internet FQDN or static ip and in about few sec registration is succeded and message "On Hook" appears.

    2) to register for using web services of 3CX System ( for presence and more ) also using as target address, servers's local ip address or internet FQDN and as target ports port 80 & 443 ( because it can't be altered when using IIS ) and port 5000 & 5001 ( as described in provisioned file ) when using Abyss default port.

    If two ranges are not the same, the mechanism of registration is trying to register always and only to server's internet FQDN or static ip and never server's local ip.

    If two ranges are the same, then the app does something really weird and with no meaning:

    First tries to register to server's local ip and because there is no 3CX System Server in roaming network, registration to web services fails and message "Timeout" appears.

    Before launching the 3CX phone app, i setup the IOS device not to auto lock. i waitted for about 30 minutes and no retry for registration to server's web services ip appeared.

    So i pressed devices home button and app run in backgroung. Then with double press of home button i brought back the app to foreground.

    Then a reregistration process for web services begun and after some seconds registration succeed with message "Available" on the screen.

    And if nothing seems weird ( that registration was succesful only when i sent the app to background and brought it back ) lets see waht happend when i did again the same prosedure ( app to background and back in front ).

    Every time the app goes to background ( or totally closed and reopen ) the registration is executed alternately one time as target address the server's local ip and the other time as target address the server's internet FQDN or static ip, even if the last time registration was successful.

    The result is that 50% of registration procedures are successful and the other 50% are not.

    Finally the 50% of successful registration will be successful only if i do a port mapping of port 80 to 5000 and 443 to 5001 ( on work's network router ). This means that when i'm in the work network, app registers successfully to port 5000 or 5001 but when i'm in a roaming network, app refuses to use ports 5000 and 5001 for registration and uses only ports 80 and 443.

    All the above happens only when i use the IOS app and not the Windows PC app.

    For me, 3CX has to
    a) rewrite the registration procedure for web services and set the reregistration to be executed without the need of sending the app to background and back to foreground just to trigger the process

    b) solve the refusion of using port 5000 and 5001 when device is in roaming network

    c) the registration procedure for web services has to wait for succesful sip registration, copy the registered server's ip and use it always and not trying alternately server's local and internet FQDN or static ip.

    Please accept my posts as small try for product improvement and help to other users.

    Also if anything that i mentioned above it doesn't sound well or it has mistakes, please accept my apology.

    So, Thanks again for your ( and any others ) help
  4. NickD_3CX

    NickD_3CX Support Team
    Staff Member 3CX Support

    Jun 2, 2014
    Likes Received:
    This is not correct, if you installed using Abyss and the ports you chose during the installation were 5000/5001, the Provisioning Files in the Welcome Email with which you provision the 3CXPhone apps 'instruct' the apps to look at ports 5000/5001, so no port translation/remapping is not required. If you are having this issue, if I had to guess either during the installation you chose ports 80/443 or the config on the 3CXPhone apps is left over from a previous installation that had those ports.
Thread Status:
Not open for further replies.