Freephoneline settings on FreePBX

Here you can post your own working configurations of hardware or software to share with other users who may be using the same device!
Fongo recommends Fongo Home Phone for a fully supported Home Phone system for only $4.95/mo
Forum rules
DISCLAIMER
This forum is for those users who have already purchased a configuration file with the SIP settings needed to configure any SIP compatible device.

1. Please use this forum only as a means to share your configuration advice and guides for ATA devices and SIP clients that you are using with our service.
2. For any questions relating to device configuration, please use the other forum sections or post your question directly in the device topic that your question is meant for.
3. Please title your topics with only the name and model of your device so users can easily find the information they need.
4. Preferable format for posting here is compressing your screenshots of your successfully configured device into a .zip file, and post a brief description of the configuration.

Please stay on topic
Juste
Just Passing Thru
Posts: 10
Joined: 02/29/2012

Freephoneline settings on FreePBX

Post by Juste »

Hello,

Could anyone please remind me the settings Freephoneline needs to work with Asterisk (FreePBX) ?

I tried to replicate whatever has been mentioned on this forum a few years ago, with no luck.

Thanks,
menext
One Hit Wonder
Posts: 1
Joined: 04/12/2021
SIP Device Name: Asterisk/ATA122/CISCO/GDS3710
Computer OS: FreeBSD
Router: FreeBSD

Re: Freephoneline settings on FreePBX

Post by menext »

[general]
context=unauthenticated ; default context for incoming calls
allowguest=no ; disable unauthenticated calls
srvlookup=yes ; enabled DNS SRV record lookup on outbound calls
udpbindaddr=IP.ADD ; listen for UDP requests on all interfaces
tcpenable=no ; disable TCP support
register => 1234567890:SECERETPASSWORD@voip2.freephoneline.ca:5060
acl=tellme
useragent=CISCO-TEL

[office-phone](!) ; create a template for our devices
type=friend ; the channel driver will match on username first, IP second
context=LocalSets ; this is where calls from the device will enter the dialplan
host=dynamic ; the device will register with asterisk
nat=yes ; assume device is behind NAT
; *** NAT stands for Network Address Translation, which allows
; multiple internal devices to share an external IP address.
secret=VERYBIGSECRET ; a secure password for this device -- DON'T USE THIS PASSWORD!
dtmfmode=auto ; accept touch-tones from the devices, negotiated automatically
disallow=all ; reset which voice codecs this device will accept or offer
allow=ulaw ; which audio codecs to accept from, and request to, the device
allow=alaw ; in the order we prefer


This may be very late for your answer but I am sure that others will be interested. You need to setup SIP not PJSIP. Modify your sip.conf accordingly. Below is an example that works with the proper username and password.

[freephoneline]
type=peer
secret=SECRETPASSWORD
username=1234567890
host=voip2.freephoneline.ca
fromuser=1234567890
fromdomain=YOUR.IP.ADD.OR.YOURDOMAIN
canreinvite=no
insecure=invite,port
qualify=yes
nat=force_rport,comedia
context=from-sip ; this section will be defined in extensions.conf
deny=0.0.0.0/0.0.0.0
permit=162.213.111.22/255.255.255.255
User avatar
Liptonbrisk
Technical Support
Posts: 3233
Joined: 04/26/2010
SIP Device Name: Obihai 202/2182, Groundwire
Firmware Version: various
ISP Name: FTTH
Computer OS: Windows 64 bit
Router: Asuswrt-Merlin & others

Re: Freephoneline settings on FreePBX

Post by Liptonbrisk »

Check Settings->Asterisk SIP Settings->Chan SIP Settings (Registration Times) to see if you have the following:

defaultexpiry=3600
RegisterExpiry=3600
MaxExpiry=3600
MinExpiry=3000
registertimeout=120

Settings might be within sip_general_custom.conf file
Or when using FreePBX web UI try Asterisk-->Asterisk SIP settings






This should be under Peer Details (for FPL trunk configuration with FreePBX):

keepalive=20
nat=yes
Please do not send me emails; I do not work for nor represent Freephoneline or Fongo. Post questions on the forums so that others may learn from responses or assist you. Thank you. If you have an issue with your account or have a billing issue, submit a ticket here: https://support.fongo.com/hc/requests/new. Visit http://status.fongo.com/ to check FPL/Fongo service status. Freephoneline setup guides can be found at http://forum.fongo.com/viewforum.php?f=15.
ilneofita
Just Passing Thru
Posts: 2
Joined: 08/03/2023

Re: Freephoneline settings on FreePBX

Post by ilneofita »

I modified the pjsip in order to have it worked with FPL, the modification is on git asterisk and for sure will be included in the next release
mkaye
Active Poster
Posts: 51
Joined: 05/28/2017
SIP Device Name: Freepbx
Firmware Version: v16
ISP Name: bell fiber
Computer OS: windows 11
Router: ubiquiti udmpro

pjsip settings for Freepbx17?

Post by mkaye »

chan_sip works fine
trying to convert to pjsip
can't seem to get the settings correct
created new pjsip trunk, incoming calls terminate after 30s
upgraded to Freepbx17/asterisk21 and let it convert all my chan_sip to pjsip - trunk won't register
User avatar
Liptonbrisk
Technical Support
Posts: 3233
Joined: 04/26/2010
SIP Device Name: Obihai 202/2182, Groundwire
Firmware Version: various
ISP Name: FTTH
Computer OS: Windows 64 bit
Router: Asuswrt-Merlin & others

Re: pjsip settings for Freepbx17?

Post by Liptonbrisk »

mkaye wrote: 06/24/2024 created new pjsip trunk, incoming calls terminate after 30s
Call drops due to lack of ACK.

I can't test, but have you taken a look at https://community.freepbx.org/t/incomin ... s/95369/12 or tried asking there?
That person had to set Contact User to 1FPLnumber.

https://github.com/asterisk/asterisk/pull/232
Please do not send me emails; I do not work for nor represent Freephoneline or Fongo. Post questions on the forums so that others may learn from responses or assist you. Thank you. If you have an issue with your account or have a billing issue, submit a ticket here: https://support.fongo.com/hc/requests/new. Visit http://status.fongo.com/ to check FPL/Fongo service status. Freephoneline setup guides can be found at http://forum.fongo.com/viewforum.php?f=15.
mkaye
Active Poster
Posts: 51
Joined: 05/28/2017
SIP Device Name: Freepbx
Firmware Version: v16
ISP Name: bell fiber
Computer OS: windows 11
Router: ubiquiti udmpro

Re: Freephoneline settings on FreePBX

Post by mkaye »

Contact User solved the pjsip register problem
but have the 30s call terminated problem with pjsip, not with chan_sip
User avatar
Liptonbrisk
Technical Support
Posts: 3233
Joined: 04/26/2010
SIP Device Name: Obihai 202/2182, Groundwire
Firmware Version: various
ISP Name: FTTH
Computer OS: Windows 64 bit
Router: Asuswrt-Merlin & others

Re: Freephoneline settings on FreePBX

Post by Liptonbrisk »

mkaye wrote: 07/07/2024 Contact User solved the pjsip register problem
but have the 30s call terminated problem with pjsip, not with chan_sip
gideons at https://community.freepbx.org/t/incomin ... s/95369/12 is using pjsip and Freephoneline, and the problem described isn't with registration. It's with incoming calls, which that user fixed. The subject of that thread is "Incoming Call drop after 32 seconds".
gideons wrote:I decided to give it a try and add back the Contact User.
And so as I am making the call and following the logs, what a surprise: I couldn’t believe my eyes: an ACK !
Then the call went beyond the 32 seconds."

I would try asking at the Freepbx forums and post your logs there: https://community.freepbx.org/.

Additionally, ensure SIP ALG is off in your router(s).
Please do not send me emails; I do not work for nor represent Freephoneline or Fongo. Post questions on the forums so that others may learn from responses or assist you. Thank you. If you have an issue with your account or have a billing issue, submit a ticket here: https://support.fongo.com/hc/requests/new. Visit http://status.fongo.com/ to check FPL/Fongo service status. Freephoneline setup guides can be found at http://forum.fongo.com/viewforum.php?f=15.
mkaye
Active Poster
Posts: 51
Joined: 05/28/2017
SIP Device Name: Freepbx
Firmware Version: v16
ISP Name: bell fiber
Computer OS: windows 11
Router: ubiquiti udmpro

Re: Freephoneline settings on FreePBX

Post by mkaye »

i have all my connections working with pjsip, except FPL trunk
with pjsip outgoing calls terminate after 15 min
i had fixed this with chan_sip, but i don't see any parameter in the pjsip menus to help
User avatar
Liptonbrisk
Technical Support
Posts: 3233
Joined: 04/26/2010
SIP Device Name: Obihai 202/2182, Groundwire
Firmware Version: various
ISP Name: FTTH
Computer OS: Windows 64 bit
Router: Asuswrt-Merlin & others

Re: Freephoneline settings on FreePBX

Post by Liptonbrisk »

Freephoneline uses 15 minute session timers. It's likely that ACK isn't received after the Re-INVITE.

Provided the trunk is registered, one cause might be a lost NAT association or a timeout issue.

UDP timeout adjustments are shown at viewtopic.php?p=80377#p80377.

I don't know if disabling timers would work. It's usually not advised. Possibly using timers = no
for Freephoneline's trunk endpoint might work.

You could also see if there's any difference for you between using voip2.freephoneline.ca:5060 and voip4.freephoneline.ca:6060

I'm not able to test, and people don't seem to post here often.
Is something preventing you from asking at the FreePBX community forums?
https://community.freepbx.org/
Please do not send me emails; I do not work for nor represent Freephoneline or Fongo. Post questions on the forums so that others may learn from responses or assist you. Thank you. If you have an issue with your account or have a billing issue, submit a ticket here: https://support.fongo.com/hc/requests/new. Visit http://status.fongo.com/ to check FPL/Fongo service status. Freephoneline setup guides can be found at http://forum.fongo.com/viewforum.php?f=15.
mkaye
Active Poster
Posts: 51
Joined: 05/28/2017
SIP Device Name: Freepbx
Firmware Version: v16
ISP Name: bell fiber
Computer OS: windows 11
Router: ubiquiti udmpro

Re: Freephoneline settings on FreePBX

Post by mkaye »

i had adjusted the UDP timeouts already

i don't see any option in the pjsip advanced parameters to disable timers (FreePBX17)

i agree, it seems to be not receiving the ACK after the re-invite
User avatar
Liptonbrisk
Technical Support
Posts: 3233
Joined: 04/26/2010
SIP Device Name: Obihai 202/2182, Groundwire
Firmware Version: various
ISP Name: FTTH
Computer OS: Windows 64 bit
Router: Asuswrt-Merlin & others

Re: Freephoneline settings on FreePBX

Post by Liptonbrisk »

mkaye wrote: 07/12/2024 i don't see any option in the pjsip advanced parameters to disable timers (FreePBX17)
Okay, I did a quick search, and I see this:
https://community.freepbx.org/t/disable ... ui/42059/3
dzone wrote:We were able to solve the 15-minute hangup problem by using the pjsip.endpoint_custom_post.conf file. By adding “timers=no” to the trunk, the calls stopped timing out. I wish there had been a way to configure this in the pjsip trunk settings.

pjsip.endpoint_custom_post.conf

[mytrunk](+)
timers=no

Notice the (+) after the trunk name. It appears to need that to append to the other settings FreePBX manages.
I think normally you're advised to fix whatever is causing the ACK to not be received (possible NAT issue or maybe something weird happening with the contact header), but if there's no other easy fix, then trying settings timers to no. I'm guessing because I can't test.

If it were me, I would try asking at https://community.freepbx.org/.
Please do not send me emails; I do not work for nor represent Freephoneline or Fongo. Post questions on the forums so that others may learn from responses or assist you. Thank you. If you have an issue with your account or have a billing issue, submit a ticket here: https://support.fongo.com/hc/requests/new. Visit http://status.fongo.com/ to check FPL/Fongo service status. Freephoneline setup guides can be found at http://forum.fongo.com/viewforum.php?f=15.
mkaye
Active Poster
Posts: 51
Joined: 05/28/2017
SIP Device Name: Freepbx
Firmware Version: v16
ISP Name: bell fiber
Computer OS: windows 11
Router: ubiquiti udmpro

Re: Freephoneline settings on FreePBX

Post by mkaye »

didn't fix it
my trunk is called fpl
i used [fpl](+)
User avatar
Liptonbrisk
Technical Support
Posts: 3233
Joined: 04/26/2010
SIP Device Name: Obihai 202/2182, Groundwire
Firmware Version: various
ISP Name: FTTH
Computer OS: Windows 64 bit
Router: Asuswrt-Merlin & others

Re: Freephoneline settings on FreePBX

Post by Liptonbrisk »

mkaye wrote: 07/15/2024 didn't fix it
my trunk is called fpl
i used [fpl](+)
That's unfortunate.

I see that you posted at https://community.freepbx.org/t/disable ... ui/42059/7 and, in turn, bumped a 6 year old thread. Your responses there also don't appear to be asking for help or a question, so much as making a statement (that is, it seems to me as though you're saying, "This doesn't work" and not, "This doesn't work; can someone please help me?").

Respectfully, I would suggest creating a new thread at the FreePBX community forums, posting all your trunk, endpoint, related fpl settings, and also a log showing when the Re-INVITE occurs and that no ACK is received (include the contact header too). Then, at the same time, I would ask a question (ex. What should I do to help ensure ACK is received after the Re-INVITE?). Then if no one responds, you know that no one knows the answer or that no one is otherwise willing to help.

I hope you do discover the solution or that someone responds to you with a fix somewhere. I can't test.

If ACK isn't received after 15 minutes, I usually think a firewall is blocking something or that there's a failed NAT association.
Setting qualify_frequency to 20 seconds might help, if it wasn't set to that previously. I know it used to be called "Qualify Frequency" in the GUI for PJSIP (pjsip Settings-->Advanced). Anyway, I can't test, so hopefully someone using pjsip responds to you.
Please do not send me emails; I do not work for nor represent Freephoneline or Fongo. Post questions on the forums so that others may learn from responses or assist you. Thank you. If you have an issue with your account or have a billing issue, submit a ticket here: https://support.fongo.com/hc/requests/new. Visit http://status.fongo.com/ to check FPL/Fongo service status. Freephoneline setup guides can be found at http://forum.fongo.com/viewforum.php?f=15.
Julie
Just Passing Thru
Posts: 2
Joined: 09/26/2022

Re: Freephoneline settings on FreePBX

Post by Julie »

Hello, can Liptonbrisk or mkaye share both your settings (sip and pjsip), for the trunk, extension, inbound & outbound route and the Sip Settings? It would be greatly appreciated.

Currently, I am using chan_sip. Inbound calls worked but not the outbound

Thanks
Julie
User avatar
Liptonbrisk
Technical Support
Posts: 3233
Joined: 04/26/2010
SIP Device Name: Obihai 202/2182, Groundwire
Firmware Version: various
ISP Name: FTTH
Computer OS: Windows 64 bit
Router: Asuswrt-Merlin & others

Re: Freephoneline settings on FreePBX

Post by Liptonbrisk »

I don’t use FreePBX or Asterisk.

For troubleshooting FreePBX issues, I suggest creating a new thread at https://community.freepbx.org/

For Asterisk, visit https://community.asterisk.org/
Please do not send me emails; I do not work for nor represent Freephoneline or Fongo. Post questions on the forums so that others may learn from responses or assist you. Thank you. If you have an issue with your account or have a billing issue, submit a ticket here: https://support.fongo.com/hc/requests/new. Visit http://status.fongo.com/ to check FPL/Fongo service status. Freephoneline setup guides can be found at http://forum.fongo.com/viewforum.php?f=15.
linuxgeek
One Hit Wonder
Posts: 1
Joined: 11/20/2024
SIP Device Name: linksys

Re: Freephoneline settings on FreePBX

Post by linuxgeek »

To Julie, could you share your sip settings, I can make an outbound but inbound no.
User avatar
Liptonbrisk
Technical Support
Posts: 3233
Joined: 04/26/2010
SIP Device Name: Obihai 202/2182, Groundwire
Firmware Version: various
ISP Name: FTTH
Computer OS: Windows 64 bit
Router: Asuswrt-Merlin & others

Re: Freephoneline settings on FreePBX

Post by Liptonbrisk »

I have no idea if this works and won't be testing it.
(I was forwarded this and thought it might be of interest).

I am frowning at the port forwarding recommendation, which is a potential security risk. I stopped reading after the port forwarding section.
Only port forward if you have no other choice.

OPTIONS and NOTIFY are supported by PortaSIP (used by Freephoneline), so I'm not sure why there's a note about compliance below.

I may delete this post.


A.I. generated Freephoneline Setup Guide (PJSIP)


Goal: Connect Freephoneline (using VoIP Unlock Key) to a self-hosted FreePBX system using PJSIP, aiming for full compliance with documented FPL settings. Includes custom local SIP port (Example: 53060) and manual server switching steps.
Disclaimer: This guide assumes you manage your own FreePBX server/network. Automatic server failover is not feasible with simple settings for Freephoneline; this guide uses manual switching as a fallback. Absolute compliance with 'Keep Alive Message' type may differ as PJSIP uses SIP OPTIONS for qualify.

---
Phase 1: Getting Ready (Prerequisites)
---

1. Get FPL Credentials: Have your SIP Username, SIP Password, and Phone Number from Freephoneline ready.
2. Log into FreePBX: Access your FreePBX web admin page.
3. Log into Router: Access your internet router's configuration page.
4. Disable Router SIP ALG: Find the "SIP ALG" setting in your router and DISABLE it. Save router changes. This is crucial!
5. Static IP for FreePBX: Ensure your FreePBX server has a static internal IP address. Ex.

Code: Select all

192.168.1.10
.

---
Phase 2: Telling FreePBX About Your Network (NAT Settings)
---
Purpose: Helps FreePBX work correctly from behind your router.

6. Go to SIP Settings: In FreePBX, navigate to Settings -> Asterisk SIP Settings.
7. Configure NAT/External IP: Click the General SIP Settings tab. Under NAT Settings:
  • External Address: Click "Detect Network Settings". Verify the detected IP is your public IP. If not, enter your Static IP manually if you have one.
  • Local Networks: Click "+ Add Network" and manually enter your internal network(s). Ex.

    Code: Select all

    192.168.1.0 / 255.255.255.0
    .
8. Save NAT Settings: Click Submit. (Do NOT click the red Apply Config button yet).

---
Phase 3: Setting Custom SIP Port & Firewall Rules
---
Purpose: Configure FreePBX to listen on your chosen port (ex. 53060) and allow traffic.

9. Navigate to PJSIP Settings: Go back to Settings -> Asterisk SIP Settings -> PJSIP tab.
10. Set Custom Listen Port: Under Transports, find your primary UDP transport, typically named

Code: Select all

0.0.0.0 (udp)
. Change Port to Listen On to

Code: Select all

53060
. Use your chosen port between 30000-60000.
11. Save Port Setting: Click Submit. (Do NOT click Apply Config yet).
12. Configure Router Firewall (Port Forwarding):
  • Go back to your router's configuration page, find "Port Forwarding".
  • Create rules to forward incoming UDP traffic:
    • From Port

      Code: Select all

      53060
      to your FreePBX server's internal static IP on port

      Code: Select all

      53060
      . Use your chosen port.
    • From Port Range

      Code: Select all

      10000
      -

      Code: Select all

      20000
      to your FreePBX server's internal static IP for ports

      Code: Select all

      10000
      -

      Code: Select all

      20000
      . This is for RTP audio.
  • Save the changes on your router.
13. Configure Server Firewall (If Applicable): If your FreePBX server has its own firewall, ensure it also allows incoming UDP traffic on port

Code: Select all

53060
and ports

Code: Select all

10000-20000
.

---
Phase 4: Creating the Freephoneline Trunk
---
Purpose: Connecting FreePBX to your Freephoneline account.

14. Navigate to Trunks: Go to Connectivity -> Trunks.
15. Add PJSIP Trunk: Click + Add Trunk, then select + Add SIP (pjsip) Trunk.
16. Fill General Tab:
  • Trunk Name:

    Code: Select all

    Freephoneline
  • Outbound CallerID:

    Code: Select all

    <YOUR_FPL_NUMBER>
    (Use angle brackets around your 10-digit number. For Display Name use

    Code: Select all

    "Your Name" <YOUR_FPL_NUMBER>
  • Maximum Channels:

    Code: Select all

    2
17. Fill pjsip Settings -> General Tab:
  • Username:

    Code: Select all

    YOUR_FPL_USERID
  • Secret:

    Code: Select all

    YOUR_FPL_PASSWORD
  • Authentication: Select

    Code: Select all

    Outbound
  • Registration: Select

    Code: Select all

    Send
  • SIP Server:

    Code: Select all

    voip.freephoneline.ca
    (Primary Server)
  • SIP Server Port:

    Code: Select all

    5060
    (Note: This is FPL's destination port, not your local listening port.)

    Code: Select all

    53060
  • Context:

    Code: Select all

    from-trunk
  • Transport: Select the UDP transport listening on

    Code: Select all

    53060
    . Ensure this matches Step 10.
18. Fill pjsip Settings -> Advanced Tab: (Check these carefully!)
  • Match (Permit):

    Code: Select all

    voip.freephoneline.ca,voip2.freephoneline.ca,voip4.freephoneline.ca
    (Recommended)
  • Contact User:

    Code: Select all

    YOUR_FPL_USERID
  • From Domain:

    Code: Select all

    voip.freephoneline.ca
    (Match the SIP Server field above.)
  • From User:

    Code: Select all

    YOUR_FPL_USERID
  • Client URI:

    Code: Select all

    sip:YOUR_FPL_USERID@voip.freephoneline.ca
    (Match the SIP Server field above.)
  • Server URI:

    Code: Select all

    sip:voip.freephoneline.ca
    (Match the SIP Server field above.)
  • AOR:

    Code: Select all

    sip:YOUR_FPL_USERID@voip.freephoneline.ca
    (Match the SIP Server field above.)
  • Qualify Frequency:

    Code: Select all

    20
    (Matches FPL Keep Alive Interval.)
  • Registration Expiry:

    Code: Select all

    3600
    (Matches FPL Recommendation.)
  • Registration Retry Interval:

    Code: Select all

    120
    (Matches FPL Recommendation.)
  • Session Timers:

    Code: Select all

    No
  • Rewrite Contact:

    Code: Select all

    Yes
    (This setting is important for NAT and ensuring your WAN IP is used correctly.)
  • Force rport:

    Code: Select all

    Yes
    (This setting is important for NAT and ensuring your WAN IP is used correctly.)
  • Send RPID/PAI:

    Code: Select all

    Send PAI
  • Trust RPID:

    Code: Select all

    Yes
  • DTMF Mode:

    Code: Select all

    RFC 4733
    (This is the most reliable method for touch-tones.)
  • Direct Media:

    Code: Select all

    No
    (This setting is important when behind NAT.)
19. Configure pjsip Settings -> Codecs Tab:
  • Check only

    Code: Select all

    ulaw
    and

    Code: Select all

    g729
    . Uncheck all other codecs. Ensure these are the ONLY enabled codecs as recommended by FPL.
20. Save Trunk: Click Submit. (Do NOT Apply Config yet).
21. Note on Packet Size (ptime): FPL recommends a 20ms packet size (

Code: Select all

ptime=20
). This is often the default in Asterisk. If you experience audio issues, you might need to check the global Asterisk SIP settings or PJSIP endpoint settings, but it's usually not configured directly in the trunk GUI.

---
Phase 5: Setting Up Call Routing
---
Purpose: Telling FreePBX where to send outgoing and incoming calls.

22. Navigate to Outbound Routes: Go to Connectivity -> Outbound Routes.
23. Add Outbound Route: Click + Add Outbound Route.
24. Configure Route Settings:
  • Route Name:

    Code: Select all

    FPL-Outgoing
  • Trunk Sequence for Matched Routes: Select

    Code: Select all

    Freephoneline
    (the trunk from Step 16).
25. Configure Dial Patterns: Go to the Dial Patterns tab. Add these patterns exactly, one line at a time:

Code: Select all

    [2-689]11
    *98
    NXXNXXXXXX
    1NXXNXXXXXX
    011.
    
26. Save Outbound Route: Click Submit. (Do NOT Apply Config yet).
27. Navigate to Inbound Routes: Go to Connectivity -> Inbound Routes.
28. Add Inbound Route: Click + Add Inbound Route.
29. Configure General: 30. Set Destination: Choose where incoming calls go. Ex.

Code: Select all

Extension
,

Code: Select all

Ring Group
,

Code: Select all

IVR
.
31. Save Inbound Route: Click Submit.

---
Phase 6: Applying Changes and Testing
---

32. Apply Config: Click the Apply Config button. This button is usually red and in the top-right corner. Wait for FreePBX to reload.
33. Check Registration Status:
  • GUI Method: Go to Reports -> Asterisk Info -> Registries tab. Look for your

    Code: Select all

    Freephoneline
    entry. Status should say

    Code: Select all

    Registered
    .
  • CLI Method: Log into your server via SSH, type

    Code: Select all

    asterisk -rvvv
    . At the prompt, type

    Code: Select all

    pjsip show registrations
    and press Enter. Check the status. Type

    Code: Select all

    exit
    to leave.
34. Test Outbound Calls: Dial external numbers from an internal phone.
35. Test Inbound Calls: Call your FPL number from an external phone.
36. Test DTMF: Call voicemail (

Code: Select all

*98
) or an external IVR system.

---
Phase 7: Troubleshooting - Manual Server Failover (Try If Needed)
---
Purpose: Manually switch to a different FPL server if the primary fails (

Code: Select all

voip.freephoneline.ca
).

37. If Issues Persist (ex. Registration Failed, Calls Fail):
  • Go back to Connectivity -> Trunks. Click the pencil icon to edit your

    Code: Select all

    Freephoneline
    trunk.
  • Go to the pjsip Settings -> General tab.
  • Choose ONE Alternative:
    • Option 1: Change SIP Server to

      Code: Select all

      voip2.freephoneline.ca
      . Keep SIP Server Port as

      Code: Select all

      5060
      .
    • Option 2: Change SIP Server to

      Code: Select all

      voip4.freephoneline.ca
      AND change SIP Server Port to

      Code: Select all

      6060
      .
  • Go to the pjsip Settings -> Advanced tab. IMPORTANT: Update the From Domain, Client URI, Server URI, and AOR fields to match the new SIP Server hostname you just entered. This is important!
  • Click Submit.
  • Click the red Apply Config button.
  • Wait a minute or two and re-check registration status (Step 33). Test calls again.
---
Phase 8: General Troubleshooting Tips
---
  • Registration Failed: Double-check Username/Password. Verify firewall rules (UDP

    Code: Select all

    53060
    & RTP

    Code: Select all

    10k-20k
    ). Check Logs (Reports -> Asterisk Logfiles).
  • No Audio / One-Way Audio: Check NAT settings (Step 7). Check router Port Forwarding (UDP

    Code: Select all

    53060
    &

    Code: Select all

    10k-20k
    ). Check

    Code: Select all

    Direct Media: No
    (Step 18).
  • Calls Don't Connect: Check logs. Ensure SIP ALG is OFF on router. Check Outbound Route Dial Patterns (Step 25).
---
Note on Chan SIP: This guide focuses on the recommended PJSIP driver. Similar concepts apply to the legacy chan_sip driver, but configuration fields and details differ significantly.
```
Please do not send me emails; I do not work for nor represent Freephoneline or Fongo. Post questions on the forums so that others may learn from responses or assist you. Thank you. If you have an issue with your account or have a billing issue, submit a ticket here: https://support.fongo.com/hc/requests/new. Visit http://status.fongo.com/ to check FPL/Fongo service status. Freephoneline setup guides can be found at http://forum.fongo.com/viewforum.php?f=15.
User avatar
Liptonbrisk
Technical Support
Posts: 3233
Joined: 04/26/2010
SIP Device Name: Obihai 202/2182, Groundwire
Firmware Version: various
ISP Name: FTTH
Computer OS: Windows 64 bit
Router: Asuswrt-Merlin & others

Re: Freephoneline settings on FreePBX

Post by Liptonbrisk »

**Important Note:** Chan SIP is considered legacy in FreePBX. The modern PJSIP driver (covered in the previous guide) is generally recommended for new configurations due to better NAT handling and features.

This is also an A.I. generated guide, and I won't be testing or supporting it. Use at your own risk. I would avoid port forwarding if at all possible.

I may delete this post.
-----

## **Phase 1: Getting Ready (Prerequisites)**

1. Get FPL Credentials: Have your SIP Username, SIP Password, and Phone Number from Freephoneline ready.
2. Log into FreePBX: Access your FreePBX web admin page.
3. Log into Router: Access your internet router's configuration page.
4. Disable Router SIP ALG: Find the "SIP ALG" setting in your router and DISABLE it. Save router changes. This is crucial\!
5. Static IP for FreePBX: Ensure your FreePBX server has a static internal IP address. Ex.

Code: Select all

192.168.1.10
.

-----

## **Phase 2: Telling FreePBX About Your Network (NAT Settings)**

Purpose: Helps FreePBX work correctly from behind your router.

6. Go to SIP Settings: In FreePBX, navigate to Settings -\> Asterisk SIP Settings.
7. Configure NAT/External IP: Click the General SIP Settings tab. Under NAT Settings:
  • External Address: Click "Detect Network Settings". Verify the detected IP is your public IP. If not, enter your Static IP manually if you have one.
  • Local Networks: Click "+ Add Network" and manually enter your internal network(s). Ex.

    Code: Select all

    192.168.1.0 / 255.255.255.0
    .
8. Save NAT Settings: Click Submit. (Do NOT click the red Apply Config button yet).

-----

## **Phase 3: Setting Custom SIP Port & Firewall Rules (for Chan SIP)**

Purpose: Configure FreePBX (Chan SIP) to listen on your chosen port (ex. 53060) and allow traffic.

9. Navigate to Chan SIP Settings: Go back to Settings -\> Asterisk SIP Settings -\> Chan SIP tab. (May be under a "Legacy SIP Settings" section).
10. Set Custom Bind Port: Find Bind Port (under NAT Settings / Bind Settings). Change the value to

Code: Select all

53060
. Use your chosen port between 30000-60000.
11. (Check Other Chan SIP Globals: While on this tab, you might want to ensure `Default Expiry` is `3600`. The registration retry behavior depends on `registerattempts` (default 0 = infinite) and `registertimeout` (default 20 seconds) - you cannot easily set a specific 120s retry interval like FPL recommends via these settings.
12. Save Port Setting: Click Submit. (Do NOT click Apply Config yet).
13. Configure Router Firewall (Port Forwarding):
  • Go back to your router's configuration page, find "Port Forwarding".
  • Create rules to forward incoming UDP traffic:
    • From Port

      Code: Select all

      53060
      to your FreePBX server's internal static IP on port

      Code: Select all

      53060
      . Use your chosen port.
    • From Port Range

      Code: Select all

      10000
      -

      Code: Select all

      20000
      to your FreePBX server's internal static IP for ports

      Code: Select all

      10000
      -

      Code: Select all

      20000
      . This is for RTP audio.
    [\*] Save the changes on your router.
14. Configure Server Firewall (If Applicable): If your FreePBX server has its own firewall, ensure it also allows incoming UDP traffic on port

Code: Select all

53060
and ports

Code: Select all

10000-20000
.

-----

## **Phase 4: Creating the Freephoneline Chan SIP Trunk**

Purpose: Connecting FreePBX to your Freephoneline account using Chan SIP.

15. Navigate to Trunks: Go to Connectivity -\> Trunks.
16. Add Chan SIP Trunk: Click + Add Trunk, then select + Add SIP (chan\_sip) Trunk.
17. Fill General Tab:
  • Trunk Name:

    Code: Select all

    Freephoneline-ChanSIP
  • Outbound CallerID:

    Code: Select all

    \<YOUR\_FPL\_NUMBER\>
    (Use angle brackets around your 10-digit number. For Display Name use

    Code: Select all

    "Your Name" \<YOUR\_FPL\_NUMBER\>
    )[/i]
    [\*] Maximum Channels:

    Code: Select all

    2
18. Fill sip Settings -\> Outgoing Tab:
  • Trunk Name:

    Code: Select all

    FreephonelineSIP
    (Must match PEER name below, no spaces)
  • PEER Details: (Paste the entire block below)

    Code: Select all

        type=peer
        host=voip.freephoneline.ca
        port=5060
        username=YOUR\_FPL\_USERID
        secret=YOUR\_FPL\_PASSWORD
        fromuser=YOUR\_FPL\_USERID
        fromdomain=voip.freephoneline.ca
        context=from-trunk
        transport=udp
        nat=force\_rport,comedia
        qualify=20000
        insecure=port,invite
        dtmfmode=rfc2833
        disallow=all
        allow=ulaw\&g729
        trustrpid=yes
        sendrpid=yes
        session-timers=refuse
        directmedia=no
        
    (Note:

    Code: Select all

    qualify=20000
    sets check interval to 20 seconds (in ms) matching FPL keep-alive. Adjust host/port here if manually failing over later.)[/i]
19. Fill sip Settings -\> Incoming Tab:
  • USER Context: (Leave blank or enter

    Code: Select all

    YOUR\_FPL\_USERID
    )
  • USER Details: (Leave blank)
    [\*] Register String: (Paste the line below)

    Code: Select all

    YOUR\_FPL\_USERID:[email address removed]:5060\~3600/YOUR\_FPL\_USERID
    (This explicitly sets the destination server/port and the 3600 second expiry. Adjust host/port here if manually failing over later.)
20. Save Trunk: Click Submit. (Do NOT Apply Config yet).

-----

## **Phase 5: Setting Up Call Routing**

Purpose: Telling FreePBX where to send outgoing and incoming calls.

21. Navigate to Outbound Routes: Go to Connectivity -\> Outbound Routes.
22. Add Outbound Route: Click + Add Outbound Route.
23. Configure Route Settings:
  • Route Name:

    Code: Select all

    FPL-ChanSIP-Out
  • Trunk Sequence for Matched Routes: Select

    Code: Select all

    Freephoneline-ChanSIP
    (the trunk from Step 17).
24. Configure Dial Patterns: Go to the Dial Patterns tab. Add these patterns exactly, one line at a time:

Code: Select all

    [2-689]11
    \*98
    NXXNXXXXXX
    1NXXNXXXXXX
    011\.
    
25. Save Outbound Route: Click Submit. (Do NOT Apply Config yet).
26. Navigate to Inbound Routes: Go to Connectivity -\> Inbound Routes.
27. Add Inbound Route: Click + Add Inbound Route.
28. Configure General: 29. Set Destination: Choose where incoming calls go. Ex.

Code: Select all

Extension
,

Code: Select all

Ring Group
,

Code: Select all

IVR
.
30. Save Inbound Route: Click Submit.

-----

## **Phase 6: Applying Changes and Testing**

31. Apply Config: Click the Apply Config button. This button is usually red and in the top-right corner. Wait for FreePBX to reload.
32. Check Registration Status:
  • GUI Method: Go to Reports -\> Asterisk Info -\> Registries tab. Look for your

    Code: Select all

    Freephoneline-ChanSIP
    entry. The State should say

    Code: Select all

    Registered
    .
  • CLI Method: Log into your server via SSH, type

    Code: Select all

    asterisk -rvvv
    . At the prompt, type

    Code: Select all

    sip show registry
    and press Enter. Check the state. Type

    Code: Select all

    exit
    to leave.
33. Test Outbound Calls: Dial external numbers from an internal phone.
34. Test Inbound Calls: Call your FPL number from an external phone.
35. Test DTMF: Call voicemail (

Code: Select all

\*98
) or an external IVR system.

-----

## Phase 7: Troubleshooting - Manual Server Failover (Try If Needed)

Purpose: Manually switch to a different FPL server if the primary (

Code: Select all

voip.freephoneline.ca
) fails.[/i]

36. If Issues Persist (ex. Registration Failed, Calls Fail):
  • Go back to Connectivity -\> Trunks. Click the pencil icon to edit your

    Code: Select all

    Freephoneline-ChanSIP
    trunk.
  • Go to the sip Settings -\> Outgoing tab.
  • Edit PEER Details: Change the

    Code: Select all

    host=
    and

    Code: Select all

    port=
    lines to an alternative:
    • Option 1:

      Code: Select all

      host=voip2.freephoneline.ca
      , keep

      Code: Select all

      port=5060
      . Update `fromdomain=` too.
    • Option 2:

      Code: Select all

      host=voip4.freephoneline.ca
      , change

      Code: Select all

      port=6060
      . Update `fromdomain=` too.
  • Go to the sip Settings -\> Incoming tab.
  • Edit Register String: Change the hostname and port after the `@` symbol to match the PEER details you just set. Ex:

    Code: Select all

    YOUR\_FPL\_USERID:[email address removed]:6060\~3600/YOUR\_FPL\_USERID
    .
  • Click Submit.
  • Click the red Apply Config button.
  • Wait a minute or two and re-check registration status (Step 32). Test calls again.
-----

## Phase 8: General Troubleshooting Tips
  • Registration Failed: Double-check Username/Password. Verify firewall rules (UDP

    Code: Select all

    53060
    & RTP

    Code: Select all

    10k-20k
    ). Check Logs (Reports -\> Asterisk Logfiles).
  • No Audio / One-Way Audio: Check NAT settings (Step 7). Check router Port Forwarding (UDP

    Code: Select all

    53060
    &

    Code: Select all

    10k-20k
    ). Check

    Code: Select all

    nat=force\_rport,comedia
    (Step 18). Check

    Code: Select all

    Direct Media: No
    (Step 18).
    [\*] Calls Don't Connect: Check logs. Ensure SIP ALG is OFF on router. Check Outbound Route Dial Patterns (Step 24).
Please do not send me emails; I do not work for nor represent Freephoneline or Fongo. Post questions on the forums so that others may learn from responses or assist you. Thank you. If you have an issue with your account or have a billing issue, submit a ticket here: https://support.fongo.com/hc/requests/new. Visit http://status.fongo.com/ to check FPL/Fongo service status. Freephoneline setup guides can be found at http://forum.fongo.com/viewforum.php?f=15.