How to import Asterisk config in FreePBX?

Hi Guys,

I’m pretty new to work with freepbx, i have the following sip trunk config from my provider, but i can’t get it work on FreePBX. How can i convert that config to freepbx?

I need a working sip trunk for inbound and outbound (pjsip based)

Kind regards
Niels

This is a very strange way for a provider to transmit their requirements.

I would start with a very simple trunk configuration and troubleshoot from there. Unless you have some special requirement, using one trunk for both incoming and outgoing should be fine.

CM seems to assume that numbers in your system start with the country code, but without a leading + (they add it in the outbound header logic). Following that model and with these assumptions:

Main number with CM: 31202345678
Username: 11112222
Password: abcdefgh

Try these trunk settings; leave all other settings at defaults:

General tab:
Trunk Name: CM
Outbound CallerID: 31202345678

PJSIP Settings → General:
Username: 11112222
Secret: abcdefgh
SIP Server: 31.169.63.1
SIP Server Port: 5060

PJSIP Settings → Advanced:
From Domain: 31.169.63.1
From User: 11112222
Match (Permit): 188.95.185.98,188.95.185.99,188.95.185.110,31.169.58.10,31.169.58.11

PJSIP Settings → Codecs:
Check only alaw and g729.

With luck, you’ll be able to register and receive calls. If without the special header, CM defaults to your main number, you should also be able to make calls. If not, see

Note that the standard header for this purpose is P-Preferred-Identity, but the CM documentation shows Preferred-Identity. Ask them which is correct, or try it both ways.

If you still have trouble, at the Asterisk command prompt type
pjsip set logger on
make a failing call (or registration attempt if it doesn’t register), paste the Asterisk log for the attempt at pastebin.freepbx.org and post the link here.

Also, describe any router/firewall between the PBX and the internet, as well as any VoIP-related settings in it.

1 Like

Many many thanks!!! i’ll will try your settings, and let you know of it’s working!

Your are a master!!! It’s working!!!

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