Issues Connecting to Trunk

Hello everyone. I am new to asterisk and FreePBX. I set up my server, connected my soft-phone but I am having issues setting up the trunk and making calls. I made an extension and added a caller ID there. If I wanna use multiple caller IDs and have a different on for different extensions. Does that means I can leave the CID field in the trunk settings blank? I added a caller ID to the extension but still nothing. The server seems to connect to the trunk since when I make a call it tells me “the number you have dialed is not available”.

So I have a few question. What is the best way to check if your setup if connected to the trunk?
How should I type in the CID when needed? Should the country code be included? What about the ‘+’? During setup asterisk asked me for my country code and I put one, does that mean I can just enter the CID in FreePBX without the code?

I also need some help setting up incoming calls, is there anything specific I need to do? Keep in mind I am using gotrunk and already have a number ready. I am using IP verification and not credentials. I followed the gotrunk instructions for FreePBX but when dialing the number from my personal phones it hands up before making any noise… Thank you!

OK - slow down. What you said doesn’t comport with the way the system works.

Asterisk (and by extension, FreePBX) is a back to back user agent. One of the ‘backs’ is the extension interface. You connect extensions to the system and your extensions interact with Asterisk. The other ‘back’ is the trunk interface, which is connected to Asterisk through a series of routes (inbound and outbound).

The only connection between these (extensions and trunks) is that they go through Asterisk.

So, as the tutorials and wiki pages describe, the process is something like the following:

  1. Set up your extension(s) so you can communicate with the PBX.
  2. Set up a Provider Account. This can be incoming, outgoing, or both. That last bit might not seem important, but once you understand that it’s really a thing, your conceptual curtain will be lifted.
  3. Set up your trunk(s). There is an incoming and outgoing “leg” that are often handled as if they are one thing, but for simplicity, it helps to think of them as if they are a coincidence - your incoming calls can come from anywhere you have a trunk, and your outgoing calls can go anywhere you have a trunk.
  4. Set up your outgoing so that the provider gets your outbound traffic.
  5. Set up your incoming routes so that the provider’s traffic has some place to go.

Calls from your providers will come into your local trunk, regardless of the ‘flavor’ of the call. It can have any of your numbers (as assigned by your provider) and the trunk just doesn’t care.

These trunk calls are sent to the Inbound Routes. These are a series of filters that allow calls to be sent to various destinations in your system. These can include Voice Mail, Announcements, IVRs, extensions, etc. To start, you should always set up at least one inbound route that has no DID or CID settings - this is your ‘any/any’ or default inbound route. Wherever you send the call from here is where any call that doesn’t meet either the DID or CID filter on the way in.

Outbound routes work the same basic way, except from the Asterisk side. When you dial a number, it is filtered through the settings in the Outbound Route, which then connects to one or more trunks.

In the GUI there are Asterisk Reports. These will list your trunks.

Your outbound Caller ID will always be in the form “Name with or without spaces” <xxxxxxxxxxx> . Note that the quotes and angle brackets are required.

There’s no way of knowing at this point.

This is a trunk setting, and if set up correctly, it will allow the incoming calls to be processed by your inbound routes.

The file /var/log/asterisk/full will tell you what is happening at all points in all of your problematic situations.

Your phones do not connect to the trunk. They connect to Asterisk, which is managed by FreePBX. If your phones are not working, it’s not probably a problem with your setup of the extensions and the PBX than it is the trunk. Let me say that one last time - there is no connection between your ITSP and your phones except Asterisk. Think of it like Asterisk being the escrow for your data. Everything goes through Asterisk.

I’ve got this new issue now, I cannot connect the zoiper to freePBX. Asterisk console is giving me:
[2020-11-25 20:14:41] NOTICE[2992]: chan_sip.c:29053 handle_request_register: Registration from ‘sip:[email protected]:33525;transport=UDP’ failed for ‘xx.xx.194.18:60559’ - Wrong password

I am using the extension name as the user name and the proper user password. My console is also being spammed with:

[2020-11-25 20:44:12] NOTICE[2992]: chan_sip.c:16046 sip_reg_timeout: – Registration for ‘[email protected]’ timed out, trying again (Attempt #4)


There are two usernames. The first one is the UCP password, which doesn’t work with extensions. The extension username is the extension number, and there’s a password associated with the extension.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.