FreePBX
Es gibt zwei Möglichkeiten, FreePBX zu registrieren: basierend auf Registrierung oder basierend auf IP-Adresse.
FreePBX-Registrierung
Diese Anleitung setzt voraus, dass Sie eine saubere Installation von FreePBX durchgeführt haben. Zuerst rufen wir die Account-ID und das zugehörige Passwort für den VoIP-Trunk aus dem Portal ab. Diese Anleitung basiert auf der Registrierung des Trunks. Dieses Setup ist ideal für Internetleitungen, bei denen sich die externe IP-Adresse ändert.
Wichtig ist ein guter Router mit deaktiviertem SIP ALG. Unsere Erfahrungen mit verschiedenen Routern sind in der Router-Kompatibilitätsliste aufgeführt. Die Firewall-Einstellungen finden Sie auf der Seite Allgemeine Firewall-Einstellungen. Weitere Informationen zu einer erfolgreichen VoIP-Implementierung finden Sie auf der folgenden Seite.
Konfiguration
Portal
- Melden Sie sich im Portal an.
- Gehen Sie unter „Verwaltung" zu „VoIP-Trunk" und klicken Sie auf das Symbol „Ändern" neben dem VoIP-Trunk.
- In der Übersicht sehen Sie die „Account-ID" und das zugehörige „Passwort". Notieren Sie sich diese.
Allgemeine Trunk-Einstellungen
- Melden Sie sich bei Ihrem FreePBX-Server an und klicken Sie im Bereich „Connectivity" auf „Trunks".
- Klicken Sie dann auf „+ Add Trunk" und wählen Sie „+ Add SIP (chan_pjsip) Trunk".
- Geben Sie unter „General" folgende Informationen ein:
- 'Trunk Name': SIP Trunk
- 'Outbound CallerID': <Telefonnummer im +31-Format>
- Klicken Sie auf den Tab „pjsip Settings":
- Geben Sie die „Account-ID" in das Feld „Trunk Name" ein.
- Geben Sie das zugehörige Passwort für die „Account-ID" in das Feld „Secret" ein.
- Geben Sie „ha.voys.nl" in das Feld „SIP Server" ein.
- Geben Sie „5060" oder „6060" in das Feld „SIP Server Port" ein. Beide Ports sind auf unserer Seite aktiv. Falls 5060 nicht funktioniert, können Sie 6060 verwenden.
Lassen Sie die übrigen Einstellungen, die nicht behandelt wurden, unverändert.
Klicken Sie auf den Tab „Dialed Manipulation Rules":
- Geben Sie „X." in das Feld „Match Pattern" ein.
Click on the "Advanced" tab under "pjsip Settings":
- Select 'RFC 4733' for 'DTMF'.
- Select 'Yes' for 'Trust RPID/PAI'.
- Select 'Send P-AssertedIdentity header' for 'Send RPID/PAI'.
Leave the remaining settings that have not been addressed as they are.
- Click on "Submit".
Setting Up Incoming Numbers
- Go to "Connectivity" and then "Inbound Routes".
- Click on '+ Add Inbound Route'.
- Enter the following:
- Description: <Name of incoming route>
- DID Number: <Number in +31 format>
- To test the connection, set "Set Destination" to "Terminate Call" and "Put caller on hold forever".
- Click "Submit", then click "Apply Config" at the top.
When you now dial the number, you will hear hold music.
Adding an Account
To add a phone account, click on "Applications" and then "Extensions".
Next, click "+ Add Extension" and select, for example, "Add New PJSIP Extension".
- In "User Extension", enter the internal number of the phone, e.g., 201.
- In "Display Name", enter the name of the user, e.g., Jan Jansen.
- Under "Outbound CID", enter the number that the user should display when making outbound calls.
- Click "Submit" and then "Apply Config".
You can now register the account on a phone. The username is the "User Extension," and the password is what is listed under "Secret." The server to connect to is the IP address of your PBX.
Making Outbound Calls
To make outbound calls, you need an "Outbound Route." In the "Outbound Route," you set the number to dial and the trunk you wish to use.
- Go to "Connectivity" and then "Outbound Routes."
- Click "+ Add Outbound Route."
- Enter "default" for "Route Name."
- Under "Trunk Sequence for Matched Routes," select "SIP Trunk."
Under the "Dial Patterns" section, enter "X." (X followed by a dot) in the "Match Pattern" field. This ensures that all outbound calls will go through this trunk.
- Click "Submit" and then click "Apply Changes" at the top.
You can now make outbound calls with your VoIP phone. To receive calls, update the "Inbound Route" to your extension.
Encrypted Calling
It is possible to encrypt both incoming and outgoing calls.
To enable this, you need to make some changes in both the portal and FreePBX.
Portal
- Log in to the portal.
- Go to "VoIP Trunk" under "Management" and click the 'edit' icon next to the VoIP trunk.
- Click on "Advanced (SIP) Settings" on the left.
- Check "Force Encryption" under the "Advanced (SIP) Settings".
- A pop-up will appear, and in the pop-up, click "Continue".
- At the bottom of the page, click "Save".
FreePBX
Activating TLS
- Click on "Settings" and then select "Asterisk SIP Settings."
- Next, select the "SIP Settings [chan_pjsip]" tab.
- Change the "Certificate Manager" to 'default'.
- Change the "SSL Method" to 'tlsv1_2'.
- Set "Verify Server" to 'No'.
- Set "tls - 0.0.0.0 - All" to 'Yes'.
- Click "Submit", and then click "Apply Changes" at the top.
- Under the "Connectivity" section, click on "Trunks."
- Click the 'edit' icon next to the VoIP trunk.
- Click on the "pjsip Settings" tab.
- Change 'SIP Server' to 'sip.encryptedsip.com'.
- Change 'SIP Server Port' to '5061'.
- Select '0.0.0.0-tls' for 'Transport'. (If you don't see this option, TLS is not properly activated; please repeat the TLS activation steps.)
- Click "Submit", and then click "Apply Changes" at the top.
In version 16.0.40.7, TLS doesn't work immediately. You need to restart the server to activate it. To do this, go to 'Admin' -> 'System Admin', then click on 'Power Options' on the right and select 'Reboot'.
More Information
More information and documentation can be found on the FreePBX wiki.
FreePBX IP-Adresse
This guide assumes that you have performed a clean installation of FreePBX. In the online management interface, you will find the Account ID and your password. The Custom Proposition only allows you to create a trunk, whereas this option is not available with the Complete Proposition due to the FUP (Fair Use Policy). This guide assumes that the platform delivers calls to a specific IP address and port. If your PBX is behind a router, it is necessary to create a port forward for port 5060. Ensure that you only accept traffic from the network 195.35.114.0/23 and 2a06:2a80::/29 (IPv6).
If you have a dynamic WAN address, it is better to use registration, see FreePBX (Registration). However, a trunk based on IP is preferred due to Asterisk's fail-over method.
It is important to have a good router with SIP ALG disabled. Our experiences with various routers are listed in the Router Compatibility List. Firewall settings can be found on the General Firewall Settings page. More information about a successful VoIP implementation can be found on the following page.
Configuration
Step 1 - General Trunk Settings
This guide assumes that you have performed a clean installation of FreePBX. First, we will retrieve the Account ID and password for the VoIP trunk from the portal, and set a static IP in the VoIP trunk settings.
Note: A static IP address is required for this configuration.
Portal
- Log in to the portal.
- Go to "VoIP Trunk" under "Management" and click the 'edit' icon next to the VoIP trunk.
- In the overview, you will find the "Account ID" and the corresponding "Password". Note these down.
- Then, click on "Advanced (SIP) Settings" on the left.
- Enter your IP address in the "Static Hostname" field.
- Enter the appropriate port in the "Static Port" field, typically '5060'.
- Set the "Caller ID Header" to "P-Asserted-Identity SIP Header".
- Click "Save" at the bottom of the page.
General Trunk Settings
- Log in to your FreePBX server and click on "Trunks" under the "Connectivity" section.
- Click "+ Add Trunk" and select "+ Add SIP (chan_pjsip) Trunk."
- Enter the following information under General:
- 'Trunk Name': SIP Trunk
- 'Outbound CallerID': <Phone number in +31 format>
- Click on the "pjsip Settings" tab:
- Enter the 'Account ID' in the 'Username' field.
- Enter the password for the corresponding Account ID in the 'Secret' field.
- Set 'Registration' to 'None'.
- Enter 'ha.voys.nl' in the 'SIP Server' field.
- Enter 5060 or 6060 in the 'SIP Server Port' field. Both ports are active on our side, so if 5060 doesn’t work, you can use 6060.
Leave the remaining settings that have not been addressed as they are.
Click on the "Dialed Manipulation Rules" tab:
- Enter 'X.' in the 'Match Pattern' field.
- Click on the "Advanced" tab under "pjsip Settings":
- Select 'RFC 4733' for 'DTMF'.
- Enter the 'Account_ID' in the 'Contact User' field.
- Set 'Trust RPID/PAI' to 'Yes'.
- Select 'Send P-Asserted-Identity header' for 'Send RPID/PAI'.
- Click "Submit".
Leave the remaining settings that have not been addressed as they are.
Setting Up Incoming Numbers
- Go to "Connectivity" and then "Inbound Routes."
- Click 'Add Inbound Route.'
- Enter the following:
- Description: <Name of the incoming route>
- DID Number: <Number in +31 format>
- To test the connection, set "Set Destination" to "Terminate Call" and "Put caller on hold forever."
- Click "Submit", and then click "Apply Config" at the top.
When you now dial the number, you will hear hold music.
Adding an Account
To add a phone account, click on "Applications" and then "Extensions."
Next, click "+ Add Extension" and select "Add New SIP [chan_pjsip] Extension."
- In "User Extension", enter the internal number of the phone, e.g., 201.
- In "Display Name", enter the name of the user, e.g., Jan Jansen.
- Under "Outbound CID", enter the number that the user should display when making outbound calls.
- Click "Submit" and then "Apply Config."
You can now register the account on a phone. The username is the "User Extension" and the password is what is listed under "Secret." The server to connect to is the IP address of your PBX.
Making Outbound Calls
To make outbound calls, you need an "Outbound Route." In the "Outbound Route," you define the number to dial and the trunk you want to use.
- Go to "Connectivity" and then "Outbound Routes."
- Click "+ Add Outbound Route."
- Enter "default" for "Route Name."
- Under "Trunk Sequence for Matched Routes," select "SIP Trunk."
Under the "Dial Patterns" section, enter "X." (X followed by a dot) in the "Match Pattern" field. This ensures that all outbound calls will go through this trunk.
- Click "Submit", and then click "Apply Changes" at the top.
You can now make outbound calls with your VoIP phone. To receive calls, update the "Inbound Route" to your extension.
Encrypted Calling
It is possible to encrypt both incoming and outgoing calls.
To enable this, you need to make some changes in both the portal and FreePBX.
Portal
- Log in to the portal.
- Go to "VoIP Trunk" under "Management" and click the 'edit' icon next to the VoIP trunk.
- Click on "Advanced (SIP) Settings" on the left.
- Check "Force Encryption" under the "Advanced (SIP) Settings".
- A pop-up will appear, and in the pop-up, click "Continue."
- You will now see that the "Transport Protocol" is set to TLS.
- Click "Save" at the bottom of the page.
FreePBX
Activating TLS
- Click on "Settings" and then select "Asterisk SIP Settings."
- Next, select the "SIP Settings [chan_pjsip]" tab.
- Change the "Certificate Manager" to 'default'.
- Change the "SSL Method" to 'tlsv1_2'.
- Set "Verify Server" to 'No'.
- Set "tls - 0.0.0.0 - All" to 'Yes'.
- Click "Submit", and then click "Apply Changes" at the top.
- Under the "Connectivity" section, click on "Trunks."
- Click the 'edit' icon next to the VoIP trunk.
- Click on the "pjsip Settings" tab.
- Change 'SIP Server' to 'sip.encryptedsip.com'.
- Change the 'SIP Server Port' to '5061'.
- Select '0.0.0.0-tls' for 'Transport'. (If this option is not available, TLS has not been correctly activated; please repeat the TLS activation steps.)
- Click "Submit", and then click "Apply Changes" at the top.
In version 16.0.40.7, TLS does not work immediately. You need to restart the server to activate it. To do this, go to 'Admin' -> 'System Admin', then click on 'Power Options' on the right and click 'Reboot'.
More Information
More information and documentation can be found on the FreePBX wiki.