Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Asterisk ON pfSense2.0.1

    Scheduled Pinned Locked Moved NAT
    34 Posts 3 Posters 23.7k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • B
      blietaer
      last edited by

      Hey!

      I am glad to help!
      Still using this configuration, and it just rocks (for 6 IP phones and 2 analog/ATA)  :-*

      Yes, the PACKAGESITE is by default wrong: I'll find it back for you.  :-\

      My post is blocked?  ;D
      Is it because of the lamer intervention?
        ???

      1 Reply Last reply Reply Quote 0
      • marcellocM
        marcelloc
        last edited by

        Try from my repo, I've compiled asterisk 1.8.8.1 to run on pfsense.

        amd64
        pkg_add -r http://e-sac.siteseguro.ws/packages/amd64/8/All/asterisk18-1.8.8.1.tbz

        i386
        pkg_add -r  http://e-sac.siteseguro.ws/packages/8/All/asterisk18-1.8.8.1.tbz

        to fix PACKAGESITE var to use 8.1 package repo, use

        amd64
        setenv PACKAGESITE "http://ftp-archive.freebsd.org/pub/FreeBSD-Archive/ports/amd64/packages-8.1-release/Latest/"

        i386
        setenv PACKAGESITE "http://ftp-archive.freebsd.org/pub/FreeBSD-Archive/ports/i386/packages-8.1-release/Latest/"

        Treinamentos de Elite: http://sys-squad.com

        Help a community developer! ;D

        1 Reply Last reply Reply Quote 0
        • R
          robi
          last edited by

          Thanks marcelloc, I'll try your bins too.

          Meanwhile, did anybody try this nice little AsteriskGUI from FIVN?
          http://www.fivn.com/products/asterisk.html

          It runs on basic routers with dd-wrt, so I guess it shouldn't have any problems with a full-blown pfSense…

          1 Reply Last reply Reply Quote 0
          • R
            robi
            last edited by

            No success  >:(

            /etc/rc.conf_mount_rw
            
            pkg_add -r  http://e-sac.siteseguro.ws/packages/8/All/asterisk18-1.8.8.1.tbz
            
            

            I got various errors:

            /var: write failed, filesystem is full
            lib/perl5/5.12.4/unicore/mktables.lst: Seek failed
            ...
            lib/perl5/5.12.4/warnings/register.pm: Seek failed
            tar: (Empty error message)
            tar: Error exit delayed from previous errors.
             Done.
            ...
            tar: lib/perl5/5.12.4/warnings/register.pm: Cannot stat: No such file or directory
            tar: Error exit delayed from previous errors.
            Removing stale symlinks from /usr/bin...
                Skipping /usr/bin/perl
                Skipping /usr/bin/perl5
            Done.
            ...
            WARNING: Failed to create /usr/local/etc/sasldb2
            
            

            etc…

            Disk usage was at 10% on Dashboard when first errors came up. At finish 16%, and no /usr/local/etc/rc.d/asterisk....

            Any ideas?

            1 Reply Last reply Reply Quote 0
            • R
              robi
              last edited by

              df -h:

              Filesystem           Size    Used   Avail Capacity  Mounted on
              /dev/ufs/pfsense0    1.8G    266M    1.4G    16%    /
              devfs                1.0K    1.0K      0B   100%    /dev
              /dev/md0              38M     92K     35M     0%    /tmp
              /dev/md1              58M    7.8M     45M    15%    /var
              /dev/ufs/cf           49M    452K     45M     1%    /cf
              devfs                1.0K    1.0K      0B   100%    /var/dhcpd/dev
              

              thus I don't understand the message /var: write failed, filesystem is full

              1 Reply Last reply Reply Quote 0
              • marcellocM
                marcelloc
                last edited by

                There is a post in forum that jimp explains how to fix this smal partition used during package install, I'll try to find it and post here.

                Here is the post:
                http://forum.pfsense.org/index.php/topic,44953.msg234429.html#msg234429

                shortcut to solution:

                /etc/rc.conf_mount_rw
                setenv PKG_TMPDIR /root/
                pkg_add -r http://e-sac.siteseguro.ws/packages/8/All/asterisk18-1.8.8.1.tbz
                /etc/rc.conf_mount_ro
                
                

                Also, I think this topic should be moved to packages.

                Treinamentos de Elite: http://sys-squad.com

                Help a community developer! ;D

                1 Reply Last reply Reply Quote 0
                • R
                  robi
                  last edited by

                  Thanks, I found it myself, and it seems to install fine now! I'm going on with config tests…

                  1 Reply Last reply Reply Quote 0
                  • R
                    robi
                    last edited by

                    Alright! It installed smoothly.

                    Next question is, how to make it start at boot?

                    adding 'asterisk_enable="YES"' to the the /etc/rc.conf.local (or /etc/defaults/rc.conf) doesn't start it at boot.
                    (copied /usr/local/etc/rc.d/asterisk to /etc/rc.d/asterisk.sh)

                    1 Reply Last reply Reply Quote 0
                    • marcellocM
                      marcelloc
                      last edited by

                      Edit startup script and change values from NO to YES.  :)

                      Treinamentos de Elite: http://sys-squad.com

                      Help a community developer! ;D

                      1 Reply Last reply Reply Quote 0
                      • R
                        robi
                        last edited by

                        Which startup script?

                        /etc/rc.conf.local  <-doesn't work
                        /etc/rc.conf  <-gets deleted every time I reboot

                        1 Reply Last reply Reply Quote 0
                        • marcellocM
                          marcelloc
                          last edited by

                          asterisk script /usr/local/etc/rc.d/asterisk

                          Reference:
                          http://forum.pfsense.org/index.php/topic,2996.0.html

                          Treinamentos de Elite: http://sys-squad.com

                          Help a community developer! ;D

                          1 Reply Last reply Reply Quote 0
                          • R
                            robi
                            last edited by

                            Cool, thanks.

                            I'm used to debian…  :-\

                            1 Reply Last reply Reply Quote 0
                            • marcellocM
                              marcelloc
                              last edited by

                              Can you test and feedback if asterisk is working with no issues like one-way-audio?

                              Treinamentos de Elite: http://sys-squad.com

                              Help a community developer! ;D

                              1 Reply Last reply Reply Quote 0
                              • R
                                robi
                                last edited by

                                I'm on to it. But before that, I notice stupid errors like this:

                                [Jan 25 14:45:34] WARNING[22801]: db.c:115 dbinit: Unable to open Asterisk database '/var/db/asterisk/astdb': No such file or directory
                                [Jan 25 14:45:34] WARNING[22801]: db.c:592 ast_db_gettree: Database unavailable
                                [Jan 25 14:45:35] WARNING[22801]: db.c:115 dbinit: Unable to open Asterisk database '/var/db/asterisk/astdb': No such file or directory
                                [Jan 25 14:45:35] WARNING[22801]: db.c:592 ast_db_gettree: Database unavailable
                                [Jan 25 14:45:35] WARNING[22801]: pbx_spool.c:772 load_module: Unable to create queue directory /var/spool/asterisk/outgoing -- outgoing spool disabled
                                [Jan 25 14:45:35] WARNING[22801]: db.c:115 dbinit: Unable to open Asterisk database '/var/db/asterisk/astdb': No such file or directory
                                [Jan 25 14:45:35] WARNING[22801]: db.c:115 dbinit: Unable to open Asterisk database '/var/db/asterisk/astdb': No such file or directory
                                [Jan 25 14:45:35] WARNING[22801]: db.c:115 dbinit: Unable to open Asterisk database '/var/db/asterisk/astdb': No such file or directory
                                [Jan 25 14:45:35] WARNING[22801]: db.c:115 dbinit: Unable to open Asterisk database '/var/db/asterisk/astdb': No such file or directory
                                [Jan 25 14:45:35] WARNING[22801]: db.c:592 ast_db_gettree: Database unavailable
                                [Jan 25 14:45:35] WARNING[22801]: db.c:115 dbinit: Unable to open Asterisk database '/var/db/asterisk/astdb': No such file or directory
                                [Jan 25 14:45:35] WARNING[22801]: db.c:592 ast_db_gettree: Database unavailable
                                

                                Is there any way to disable astdb… I'm using v1.4 in production, that one doesn't have this problem. I need to hunt this down before any further testing.

                                Remember, I'm on nanobsd...

                                1 Reply Last reply Reply Quote 0
                                • marcellocM
                                  marcelloc
                                  last edited by

                                  /var is flushed every boot, it's on ram.

                                  You need to change db file location to /usr for example.

                                  Treinamentos de Elite: http://sys-squad.com

                                  Help a community developer! ;D

                                  1 Reply Last reply Reply Quote 0
                                  • R
                                    robi
                                    last edited by

                                    @marcelloc:

                                    You need to change db file location to /usr for example.

                                    But that's read-only at run-time, isn't it? On nanoBsd.

                                    1 Reply Last reply Reply Quote 0
                                    • marcellocM
                                      marcelloc
                                      last edited by

                                      Yes, it is.

                                      You will have to find a way to create or copy/backup db on asterisk startup and shutdown

                                      Treinamentos de Elite: http://sys-squad.com

                                      Help a community developer! ;D

                                      1 Reply Last reply Reply Quote 0
                                      • R
                                        robi
                                        last edited by

                                        Since my asterisk setup is quite simple, no database used really, I redirected everything that needs to be written to /tmp, don't mind if that's lost at reboot. Hope that workaround will be suitable.

                                        1 Reply Last reply Reply Quote 0
                                        • R
                                          robi
                                          last edited by

                                          I didn't bind Asterisk to any interface. It binds to all, so no firewall settings are required at all.

                                          Phones connect through LAN, telco providers connect through WAN. Asterisk itself routes the SIP/RTP traffic.

                                          1 Reply Last reply Reply Quote 0
                                          • marcellocM
                                            marcelloc
                                            last edited by

                                            So, It's working as expected(sip gateway/proxy/server) with no audio issues?

                                            Treinamentos de Elite: http://sys-squad.com

                                            Help a community developer! ;D

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.