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.

Solved Installing a remote SPA3102 behind a NAT router

Discussion in '3CX Phone System - General' started by GABRIELBM, Feb 20, 2018.

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

    Joined:
    Feb 16, 2018
    Messages:
    7
    Likes Received:
    0
    Hello

    I have installed a 3cx server on Amazon AWS.

    We are using a Linksys SPA3102, not in the same network of 3cx server (obviously).
    We define a Sip Trunk (Gateway Device) in 3CX server using the remote FQDN and SIP port (5063) of the SPA3102 (and the adequates ports forwarded in the remote site) and this trunk registers ok.

    Ports forwarded.png

    Inbound calls received by PSTN line of SPA3102 are transferred ok to the SIP trunk and can be attended by extensions defined en 3CX server. It works fine.

    The issue is with outbound calls, we define an outbound rule and calls originated in an extension dials ok, because in sip phone displays connected but no sound is heard and PSTN line is idle. After 30 seconds call ends.

    Could anyone help me?

    Thanks in advance
    Best Regards

    Gabriel
     

    Attached Files:

  2. leejor

    leejor Well-Known Member

    Joined:
    Jan 22, 2008
    Messages:
    11,101
    Likes Received:
    329
    You are on the right track, but, the issue, I suspect, is the remote router(make/settings?) that the 3102 is behind. Remote gateways are not really supported in 3CX (without using VPN), but you might try a few things.
    As a test, you could connect the 3102 direct to the internet (have it pick up a public IP), to see if the audio issue is resolved. the 3102 does have a built in router, that could be used at the remote site in place of the existing router, depending on what else is in use there. You could also try a different router altogether , sometimes the simpler, the better, at least for testing.
    Forwarding any voice ports used, to the local IP of the 3102 may also work, but might interfere with other services at the remote location.

    Calling T:Line:10000>>27101343@[Dev:sip:10000@172.16.0.5:5063]

    [Line:10000>>27101343] is terminated: Cause: BYE from 167.57.85.97:5063

    Why are there two different IPs associated with port 5063 (the remote port of the 3102?)
    Is STUN enabled on the 3102?
     
    #2 leejor, Feb 20, 2018
    Last edited: Feb 20, 2018
  3. GABRIELBM

    Joined:
    Feb 16, 2018
    Messages:
    7
    Likes Received:
    0
    ok leejor thanks!!

    I'm not sure if it is a pure audio problem. Why? Because PSTN Status (while outbound call is in progress) is idle.
    I don't know if SPA3102 PSTN line tries to make a call.

    To test:

    1) Trying o connect directly is not possible for the moment (at least in working days).

    2) Forwarding voice ports could be an option, but what are the "voice ports" there are many ports already forwarded. I don't know which ports should be forwarded. Can you help me?

    There are two ips, 172.16.0.5 is the wan port of SPA3102 and 167.57.85.97 is the external ip of the router (remember the 5063 is forwarded using nat).

    STUN is not enabled, Should I use it? I don't know how to use it.

    Best regards and thank you !!!
     

    Attached Files:

  4. leejor

    leejor Well-Known Member

    Joined:
    Jan 22, 2008
    Messages:
    11,101
    Likes Received:
    329
    This may be the problem, or at least one of them. When "dealing with" the 3102, 3CX should only have the public IP of the 3102. It should have that (167.57.85.97 the public IP of the remote router) in the 3CX trunk settings (that you put in), but also appears to know the local IP of the gateway. I can only assume that it has this from the initial registration.
    This suggests that STUN is not enabled. You will need to turn on STUN, in the 3102 so that the 3102 knows only the public IP (and port), and uses that in the registration message. the 3CX Activity Log should not show any entries with the local IP of the gateway.

    STUN settings are under the SIP tab / NAT support Parameters

    You can put in a valid STUN server (one of the 3CX ones, or one of your choice), and enable STUN. If the location has a static public IP, then that can be put in the EXT IP field.

    I don't have access (at the moment) to the 3102 I've used remotely (when on holiday), but here is a link to the Cisco site.

    https://sbkb.cisco.com/CiscoSB/GetA..._SPA3102_Phone_Adapters.xml&pid=2&converted=0

    If you don't plan on using line 1 on the 3102 you should set the option to disable if you haven't done so.
     
    #4 leejor, Feb 20, 2018
    Last edited: Feb 20, 2018
  5. GABRIELBM

    Joined:
    Feb 16, 2018
    Messages:
    7
    Likes Received:
    0
    OK leejor excelent!!
    Configuring a STUN server and NAT considerations works FINE!!
    Thanks a lot!!!
     
  6. GABRIELBM

    Joined:
    Feb 16, 2018
    Messages:
    7
    Likes Received:
    0
    Hello,
    Now I'm trying to connect SPA3102 as an analog extension of the 3cx system.
    How can I do to define this kind of extension in the Extension tab in 3CX console?
    I defined Line 1 SIP port in 5063

    Regards.
    Gabriel
     
  7. leejor

    leejor Well-Known Member

    Joined:
    Jan 22, 2008
    Messages:
    11,101
    Likes Received:
    329
    Be aware that as you add more devices, behind a router, you run the risk of one way audio depending on the router at that location. Just a warning, doesn't mean that it will happen, but it can.

    In 3CX you simply have to create a new extension. make note of the password assigned by 3CX, or create your own. In the line 1 tab, you will datafill the server information, the same as the PSTN tab, but, using the extension settings (number/password) where applicable. You may want to customize the dialplan for the line so dialled digits route to 3CX without delay.

    There are settings, in the 3102 that allows interaction between the PSTN line and the phone, which is not necessarily desired., but, as I recall in the settings you posted, I didn't see an issue.

    In the extension settings, in 3CX. don't forget to allow it to register from outside the local network.
     
    #7 leejor, Mar 1, 2018
    Last edited: Mar 1, 2018
  8. GABRIELBM

    Joined:
    Feb 16, 2018
    Messages:
    7
    Likes Received:
    0
    Thank you leejor. it works fine.
    SPA3102 works both as a gateway and as an analog telephone.

    Best regards.
     
Thread Status:
Not open for further replies.