Dismiss Notice
We would like to remind you that we’re updating our login process for all 3CX forums whereby you will be able to login with the same credentials you use for the Partner or Customer Portal. Click here to read more.

3CX Push Failure, All Ports are Open, "UnAuthorized" Error

Discussion in 'Android' started by Nanogeek, Mar 29, 2016.

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

    Joined:
    Jan 28, 2016
    Messages:
    8
    Likes Received:
    0
    Good Morning,

    This problem has given me quite a bit of headache, because I can't for the life of me figure out the problem.

    Push is ENABLED in the extension. The following ports are open:

    3CX-HTTP 80 TCP
    3CX-HTTPS 443 TCP
    3CX-SIP Protocol 5060 BOTH
    3CX-Tunnel Protocol 5090 BOTH
    3CX-Media Server (RTP) 9000:9255 UDP
    3CX-External Media Tr... 9256:9500 UDP
    3CX-PUSH 5228:5230 TCP

    If I have the phone unlocked, and 3CX open on the screen. It receives the call. If I switch to a different page (phone unlocked) 3CX is in the header and says "Push Enabled - Ready for Calls" but does not ring what so ever. This behavior occurs both on 4g and Wireless.

    I've also attempted (Very quickly) to turn off the firewall at the server and router. No change.

    I went into the logs, and looked at 3xcDialer. I noticed this particular snippet:

    Code:
    16/03/29 09:08:24.010|200001| Err|10|0017|: *!* Exception catched at Android Push sender:
    System.Net.WebException: The remote server returned an error: (401) Unauthorized.
       at System.Net.HttpWebRequest.GetResponse()
       at Dialer.PushClient.PushAndroid(CallData c, Int32 reason)
    16/03/29 09:08:24.419|200001| Err|10|0014|: *!* Exception catched at Android Push sender:
    System.Net.WebException: The remote server returned an error: (401) Unauthorized.
       at System.Net.HttpWebRequest.GetResponse()
       at Dialer.PushClient.PushAndroid(CallData c, Int32 reason)
    This seems really strange that it says not authorized. For what its worth, I went in and deleted the PUSH project from Google, re-created, resent provision e-mail to the phone, and it still didn't work. Even re-installed 3CX App on the phone.

    Any ideas? I'm sure I'm missing something simple here...
     
  2. leejor

    leejor Well-Known Member

    Joined:
    Jan 22, 2008
    Messages:
    11,115
    Likes Received:
    329
    The log would seem indicate an incorrect entry somewhere. Did you have 3CX create a new provisioning file (after changing the Google Push account) before sending (again) to the phone?
    You can review the file, if it is sent to a regular email account as well, by opening with notepad. Have a look at the GCMSENDERID, that should be the project ID
     
  3. Nanogeek

    Joined:
    Jan 28, 2016
    Messages:
    8
    Likes Received:
    0
    Just reviewed the provisioning file, and it does indeed match the current project number. But yes, I did send a new provisioning file.

    The bad thing is, I've setup another 3CX system about 2 months ago, using roughly the same hardware, and never had an issue. This one has be stumped.
     
  4. NickD_3CX

    NickD_3CX Support Team
    Staff Member 3CX Support

    Joined:
    Jun 2, 2014
    Messages:
    1,379
    Likes Received:
    84
    In the Management Console, in the PUSH settings is the Project Number alphanumerical or only numerical? In the Google Developer Console you see the whole Project ID however the Project Number is only the last part of the ID as highlighted bellow.
    [​IMG]
     

    Attached Files:

    #4 NickD_3CX, Mar 30, 2016
    Last edited by a moderator: Feb 20, 2017
  5. Nanogeek

    Joined:
    Jan 28, 2016
    Messages:
    8
    Likes Received:
    0
    NickD,

    It's only numerical. I went to the front of the dashboard to actually get the number (Where it lists only the project number).

    I'm still stumped on this. Does anyone need more logs?
     
  6. Nanogeek

    Joined:
    Jan 28, 2016
    Messages:
    8
    Likes Received:
    0
    Also,

    The numbers at the end of the project ID are different than the Project Number. (Project number is much longer, but still numerical). I was under the impression that 3CX needed the Number, not ID. That's how I configured it the first time a couple months ago, and it worked fine.

    FWIW, I tried replacing Project Number with the last numerical digits in Project ID, but no go. Still says failure.
     
  7. Nanogeek

    Joined:
    Jan 28, 2016
    Messages:
    8
    Likes Received:
    0
    Whelp,

    I fixed it. Wish I could say it was a satisfactory fix, but nope. Seems as if it was a bug. I had previously hosted a project on this developer account, so my Google Cloud Messaging API was already enabled. I decided to simply disable and then re-enable it, on a whim.

    BOOM. Everything fricken works as it should now. No fricken clue why. God bless Google.....
     
  8. MrKoen

    Joined:
    Jul 3, 2009
    Messages:
    61
    Likes Received:
    0
    Same issue here but unfortunately not the same way to resolution.

    Code:
    17/06/03 09:40:41.323|100000| Inf|30|0001|: ** Dialer: Plugin initialization Started **
    
    17/06/03 09:40:41.367|100018| Inf|50|0001|: Update PUSH client for Extn.18: Allowed, regid = xxxxx
    17/06/03 09:40:41.380|100019| Inf|50|0001|: PUSH client for Extn.18: Registering
    17/06/03 09:40:41.387|100001| Inf|30|0001|: ** Dialer: Plugin Started **
    17/06/03 09:41:17.338|200002| Trc|75|0004|: Ins: Call(1) [Dialing] DN=17 IP=(null) EP=18
    Attached: [sip_displayname=xxxx;lookup_displayname=xxxx;tag3cx=xxxx;chid=xxxx;prevCall=0;prevLeg=0;extnumber=18;devcontact=sip:17@xxxxx:3038;rinstance=xxxx;ob]
    17/06/03 09:41:17.496|200002| Trc|75|0004|: Ins: Call(1) [Ringing] DN=18 IP=17 EP=17
    Attached: [chid=xxxx;prevCall=0;prevLeg=0;extnumber=17;devcontact=sip:18@xxxx:5488;rinstance=xxxx;lookup_displayname=xxxx]
    17/06/03 09:41:17.897|200001| Err|10|0010|: *!* Exception catched at Android Push sender:
    System.Net.WebException: The remote server returned an error: (401) Unauthorized.
       at System.Net.HttpWebRequest.GetResponse()
       at Dialer.PushClient.PushAndroid(CallData c, Int32 reason)
    Anyone got a clue how to troubleshoot this? 3CX PBX v14 SP 3.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. YiannisH_3CX

    YiannisH_3CX Support Team
    Staff Member 3CX Support

    Joined:
    May 10, 2016
    Messages:
    7,400
    Likes Received:
    535
    Looks like you are receiving an unauthorised error back from google. In that case you should re-create your push project and once that is done you need to send new welcome emails to your mobile clients.
    https://www.3cx.com/docs/configuring-google-push/
     
Thread Status:
Not open for further replies.