Configuring SIP trunk

VitalPBX Community Support General Discussion Configuring SIP trunk

  • Post
    toerlemans
    Participant

    Hi,

    Last few days I have been working on configuring my first VitalPBX environment. Everything seems to work well internally but configuring the SIP trunk seems to be a disaster.

    Since I couldn’t find a good guide to get me through the I based my configuration for the peer and user setting on examples for Freepbx and Asterisk. I tried to configure it with the Text Mode and the normal mode but nothing seems to work when it comes to outgoing and incoming traffic.

    The SIP trunk provider is a Dutch company called Fieber and I have been in touch with them to test the SIP trunk by using the tool X-lite. Adding the register string in X-lite was enough get the SIP trunk working on my PC (to make sure that’s not the issue) but ofcourse it didn’t work in VitalPBX yet.

    Beside the configuration of the SIP trunk within VitalPBX I also configured the inbound and outbound routes, connected them to the trunk, set the pattern with a dot (.) for testing purposes and configured the failover destination to my own test phone (that works internally) but all of this didn’t make any differents.

    Log files don’t show a lot. When calling from outside towards the public phone numbered attached to the SIP trunk (which works with X-lite) the line gets instantly dropped without any logs to fall back on. Calling from a test phone (internal) towards another (different) public number results in some log files but no real information beside the extension name of the test phone and the public number I am trying to call.

    Something that came up earlier today while reading the VitalPBX forums was the SIP registration within Reports -> PBX Reports -> Status. Even while having the SIP trunk configured it doesn’t show up in the SIP Registrations list. (I guess this isn’t how it’s supposed to work?)

    A few things to add:
    – VitalPBX server is accessible from the outside.
    – IP and port numbers for our connection with Fieber (SIP trunk supplier) have been checked.
    – Firewall and intrusion detection on VitalPBX have been tested as well.

    VitalPBX version: 2.1.1-1
    Asterisk: 13.23.1

    I am able to share more detailed information (trunk settings, log files, etc.) if required.

    Regards,
    Thijs

    0
Viewing 9 replies - 1 through 9 (of 9 total)
  • Replies
    Up
    0
    Down

    How are you authenticating the Trunks, with user and name? or using a specific IP Address?

    The trunk is registered? The peer is shown as OK?

    0
    toerlemans
    Participant
    Up
    0
    Down
    Posted by: mrivera

    How are you authenticating the Trunks, with user and name? or using a specific IP Address?

    The trunk is registered? The peer is shown as OK?

    Yes, Fieber is using username + password (secret) in combination with hostname for authentication. (Also tried a specific IP address provided by Fieber while testing this.)

    The screenshots below will show you my current environment (SIP Trunk, outbound, inbound and SIP registrations). The thing I noticed is that PBX reports shows that the SIP registration is empty (like I haven’t configured anything at all).

    SIP Trunk
    Outbound route
    Inbound route
    PBX Reports – Registrations

    The SIP trunk works fine in combination with other tools like X-lite. (Tested inbound and outbound routes.)

    Incoming call through X-Lite

    I assume that the SIP trunk should be visible in the PBX reports before it’s able to work? (And if that’s the case, why isn’t it showing up with the current configuration?)

    0
    Up
    0
    Down

    Did you apply changes after creating the trunk?

    0
    toerlemans
    Participant
    Up
    0
    Down
    Posted by: mrivera

    Did you apply changes after creating the trunk?

    Seems like I might have forgotten it once or twice while testing. Reconfigured my previous steps once more and now outbound is working.

    Inbound still seems to be a problem but can’t find the problem yet.

    Log files show the following error:
    [2019-02-19 16:02:21] NOTICE[5136][C-000002fa] chan_sip.c: Failed to authenticate device “31135420XXX” <sip:31135420XXX@motto.nl:5080>;tag=as7dada0ab

    (Removed the last 3 numbers from public phone number.)

    The SIP registry should be fine now (tested it with asterisk -rx “sip show registry”) and enabled the “allow guest” feature in the SIP settings but without any result.

    Also disabled Firewall and Intrusion Detection for testing purposes but didn’t make any differents.

    0
    Up
    0
    Down

    Try changing the parameter “insecure” from “Not Used” to “Port, Invite”

    0
    toerlemans
    Participant
    Up
    0
    Down

    Tried insecure on “Not Used” in combination with allow guest but that resulted in a lot of incoming calls from random IPs which are not related to ours. Enabled intrusion detection again but even after having those IPs blacklisted they still were able to get calls through.

    Error for public number the same (failed to authenticate) but also found this error on the line above:
    [2019-02-20 15:57:35] WARNING[5131][C-00000cdb] chan_sip.c: username mismatch, have <MHC_outgoing>, digest has <XXXXXX>

    (XXXXXX is equal to the username I received from my SIP trunk provider)

    It might not be related but the log files themselves don’t seem to work that well either. I have to run chmod on a daily basis to grant myself permissions on the log files because they reset.

    0
    Up
    0
    Down

    May you share a full call log of an Incoming call?

    0
    toerlemans
    Participant
    Up
    0
    Down

    The full log file only generates the 2 lines below when I am trying to make an incoming call:

    [2019-02-22 09:33:18] WARNING[5131][C-00004272] chan_sip.c: username mismatch, have , digest has <235XXX>
    [2019-02-22 09:33:18] NOTICE[5131][C-00004272] chan_sip.c: Failed to authenticate device “31135420XXX” <sip:31135420XXX@motto.nl:5080>;tag=as03dbc3e3

    0
    Up
    0
    Down

    Looks like a wrong configuration in your trunk

    0
Viewing 9 replies - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.