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

    Asterisk 1.8 package

    Scheduled Pinned Locked Moved pfSense Packages
    281 Posts 59 Posters 248.4k 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.
    • D
      doktornotor Banned
      last edited by

      Dude, I have no clue why are you aiming your rants at me. You can test with 0.3.4 to see whether your "started twice on boot" issue is fixed.

      1 Reply Last reply Reply Quote 0
      • F
        Fesoj
        last edited by

        I'd like to suggest a small patch for /usr/local/etc/rc.d/asterisk.sh, actually for the sync_package_asterisk function in /usr/local/pkg/asterisk.inc.

        In line 396 in asterisk.inc add

        if [ ! -e /var/db/asterisk/astdb ] && [ -e /cf/conf/asterisk/astdb.backup ]; then
        	cp /cf/conf/asterisk/astdb.backup /var/db/asterisk/astdb
        	chown asterisk:asterisk /var/db/asterisk/astdb
        	chmod 0775 /var/db/asterisk/astdb
        fi
        

        Then add after line 408:

        	$stop .= "\n\tif [ -e /var/db/asterisk/astdb ]; then\n\t";
        	$stop .= "\tcp -f /var/db/asterisk/astdb /cf/conf/asterisk/astdb.backup\n\tfi;"
        

        The associated patch would be:

        396a397,402
        > if [ ! -e /var/db/asterisk/astdb ] && [ -e /cf/conf/asterisk/astdb.backup ]; then
        > 	cp /cf/conf/asterisk/astdb.backup /var/db/asterisk/astdb
        > 	chown asterisk:asterisk /var/db/asterisk/astdb
        > 	chmod 0775 /var/db/asterisk/astdb
        > fi
        > 
        402a409,410
        > 	$stop .= "\n\tif [ -e /var/db/asterisk/astdb ]; then\n\t";
        > 	$stop .= "\tcp -f /var/db/asterisk/astdb /cf/conf/asterisk/astdb.backup\n\tfi;"
        
        

        The additions save and restore the astdb file when Asterisk gets stopped or restarted. For convenience, I selected the /cf/conf/asterisk directory, such that it gets saved with the configuration backup command.

        The background of this patch is to make Asterisk work properly when RAM disks are used (Advanced->Miscellaneous). Asterisk itself always tries to use astdb, regardless of whether app_db, or func_db are loaded, and tries to keep track of current registrations across program invocations. Otherwise, phones have to register again before they can be used. Typical registry expiry times are 1h, so this could be a problem in larger installations. At home one would simply restart the phones, I guess.

        1 Reply Last reply Reply Quote 0
        • C
          carlm
          last edited by

          Asterisk 0.3.4 does not start from GUI

          New install of pfSense nanoBSD 2.2.5
          Restore last config from 2.2.4, which had Asterisk 0.3.1 installed
          Asterisk 0.3.4 gets installed automatically
          Asterisk does not start
          Asterisk can't be started manually from  Status->Services
          Asterisk can be started manually via ssh:
            /usr/local/etc/rc.d/asterisk.sh start

          Long story short
          –-------------------

          v0.3.1 asterisk.xml service definition defined rcfile as "asterisk"
          v0.3.4 asterisk.xml service definition defines rcfile as "asterisk.sh" : correct
          After restoring config where rcfile was "asterisk" and installing v0.3.4 (in that order), config.xml service definition still defines rcfile as "asterisk", i.e., the old service definition isn't updated when v0.3.4 is installed.

          Workaround: Edit config.xml manually, changing asterisk rcfile definition from "asterisk" to "asterisk.sh". Then delete /tmp/config.cache.
          This workaround shouldn't need to be repeated in the future.

          I don't know why config.xml isn't being updated when v0.3.4 is installed.

          1 Reply Last reply Reply Quote 0
          • D
            doktornotor Banned
            last edited by

            @carlm:

            I don't know why config.xml isn't being updated when v0.3.4 is installed.

            Because the install code is cached in various broken ways… General hint: Do not upgrade packages on pfSense <2.3; uninstall + reinstall the new version.

            1 Reply Last reply Reply Quote 0
            • N
              norbi771
              last edited by

              Hi,
              Is there any HOWTO for newbie telling how to start using the asterisk on pfsense?
              I installed the package and started it, but there are a lot of config files …

              I am complete newbie in the ASTERISK, I am just a user of PFSense. All VoIP phones I use connect to external VoIP provider, which is not very optimal.
              I would like to test asterisk and maybe in the feature instead of configure my phones to use external provider I would go for having VoIP PBX in my LAN.
              But have no idea where to start.

              Please give me some advice.

              Thanks

              1 Reply Last reply Reply Quote 0
              • F
                Fesoj
                last edited by

                You'll have to deal mostly with sip.conf and extensions.conf, only. Maybe you want to play a bit with modules.conf.

                I'd recommend
                http://www.asteriskdocs.org/en/2nd_Edition/asterisk-book-html-chunk/index.html
                to start with and I'd set up a virtual machine for initial explorations and not use the pfSense package.

                The Asterisk package for pfSense does not really have a GUI, you need to edit the configuration files manually, but the benefit is that this is much more flexible.

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

                  Hi Marcello!
                  First of all I want to thank you for this nice pfSense package. I installed it on the latest release of nanoBSD based 64Bit pfSense (embedded on a 4GB USB flash drive).

                  Currently 2 sip trunks were configured, asterisk is using the also installed siproxd (package version 1.0.9).

                  Although everything is working fine, there are warning messages in the asterisk log:

                  [2.2.6-RELEASE][admin@pfsense.sm.art]/root: asterisk -r
                  Asterisk 1.8.32.1, Copyright (C) 1999 - 2013 Digium, Inc. and others.
                  Created by Mark Spencer <markster@digium.com>
                  Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
                  This is free software, with components licensed under the GNU General Public
                  License version 2 and other licenses; you are welcome to redistribute it under
                  certain conditions. Type 'core show license' for details.
                  =========================================================================
                  Connected to Asterisk 1.8.32.1 currently running on pfsense (pid = 97717)
                  [Jan 29 17:18:36] WARNING[-1]: acl.c:719 ast_ouraddrfor: Cannot connect
                  [Jan 29 17:18:36] WARNING[-1]: acl.c:719 ast_ouraddrfor: Cannot connect
                  [Jan 29 17:26:21] WARNING[-1]: acl.c:719 ast_ouraddrfor: Cannot connect
                  [Jan 29 17:26:21] WARNING[-1]: acl.c:719 ast_ouraddrfor: Cannot connect
                  [Jan 29 17:34:07] WARNING[-1]: acl.c:719 ast_ouraddrfor: Cannot connect
                  [Jan 29 17:34:07] WARNING[-1]: acl.c:719 ast_ouraddrfor: Cannot connect
                  [Jan 29 17:41:52] WARNING[-1]: acl.c:719 ast_ouraddrfor: Cannot connect
                  [Jan 29 17:41:52] WARNING[-1]: acl.c:719 ast_ouraddrfor: Cannot connect
                  [Jan 29 17:49:37] WARNING[-1]: acl.c:719 ast_ouraddrfor: Cannot connect
                  [Jan 29 17:49:37] WARNING[-1]: acl.c:719 ast_ouraddrfor: Cannot connect
                  [Jan 29 17:57:22] WARNING[-1]: acl.c:719 ast_ouraddrfor: Cannot connect
                  [Jan 29 17:57:22] WARNING[-1]: acl.c:719 ast_ouraddrfor: Cannot connect
                  [Jan 29 18:05:07] WARNING[-1]: acl.c:719 ast_ouraddrfor: Cannot connect
                  [Jan 29 18:05:07] WARNING[-1]: acl.c:719 ast_ouraddrfor: Cannot connect
                  [Jan 29 18:12:52] WARNING[-1]: acl.c:719 ast_ouraddrfor: Cannot connect
                  [Jan 29 18:12:52] WARNING[-1]: acl.c:719 ast_ouraddrfor: Cannot connect
                  [Jan 29 18:20:37] WARNING[-1]: acl.c:719 ast_ouraddrfor: Cannot connect
                  [Jan 29 18:20:37] WARNING[-1]: acl.c:719 ast_ouraddrfor: Cannot connect
                  [Jan 29 18:28:22] WARNING[-1]: acl.c:719 ast_ouraddrfor: Cannot connect
                  [Jan 29 18:28:22] WARNING[-1]: acl.c:719 ast_ouraddrfor: Cannot connect
                  pfsense*CLI></markster@digium.com>
                  

                  Issue summary:

                  • Annoying warning message: WARNING[-1]: acl.c:719 ast_ouraddrfor: Cannot connect

                  • Exactly one message every 585 seconds for every configured sip trunk! Very mysterious fact.

                  • No IP traffic to & from asterisk during this time! (checked with wireshark and pfsense packet capturing)

                  • Is spamming the logfile over the time.

                  • Everything else is working perfect: incoming and outgoing calls are ok.

                  Does anybody also have this annoying message? Or any hints for me for further debugging? The 585 seconds must be hardcoded anywhere.

                  Thanks in advance.

                  Router Hardware: Supermicro A1SRi-2758F, 2x Kingston KVR16LSE11-4KF (4GB DDR3L SODIMM-1600 ECC),
                  Router OS: pfSense-2.4.3-RELEASE, Packages: Cron 0.3.7_2, Open-VM-Tools 10.1.0, siproxd 1.1.3_3

                  1 Reply Last reply Reply Quote 0
                  • F
                    Fesoj
                    last edited by

                    ouraddrfor() is related to IP lookup. Unless there are other errors or warnings your warning could be related to a not properly working DNS server configuration.

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

                      Mmmh. This are the only warning message I get from asterisk. DNS is properly configured. But I found a good hint in the net:

                      https://reviewboard.asterisk.org/r/2851/

                      I use siproxd as my outboundproxy. So outboundproxy is set to my local siproxd. And according to the above review asterisk does not do any DNS resolutions when outboundproxy is set. See the column "dnsmgr":

                      Connected to Asterisk 1.8.32.1 currently running on pfsense (pid = 61232)
                      pfsense*CLI> core reload
                      [Feb  3 17:36:53] NOTICE[-1]: pbx_lua.c:1530 load_or_reload_lua_stuff: Lua PBX Switch loaded.
                      [Feb  3 17:36:53] NOTICE[-1]: app_queue.c:6867 reload_queue_rules: queuerules.conf has not changed since it was last loaded. Not taking any action.
                      [Feb  3 17:36:53] NOTICE[-1]: cel_custom.c:95 load_config: No mappings found in cel_custom.conf. Not logging CEL to custom CSVs.
                      [Feb  3 17:36:54] WARNING[-1]: acl.c:719 ast_ouraddrfor: Cannot connect
                      [Feb  3 17:36:54] WARNING[-1]: acl.c:719 ast_ouraddrfor: Cannot connect
                      pfsense*CLI> sip show registry
                      Host                                    dnsmgr Username       Refresh State                Reg.Time
                      proxy.live.sipgate.de:5060              N      9999999e2@si       465 Registered           Wed, 03 Feb 2016 17:36:54
                      tel.t-online.de:5060                    N      03099999999        465 Registered           Wed, 03 Feb 2016 17:36:54
                      2 SIP registrations.
                      

                      As a test I let asterisk do its register direct without siproxd. Now there are no more "Cannot connect" warnings from ast_outaddrfor and dns resolution is set to "Y":

                      pfsense*CLI> core reload
                      [Feb  3 17:35:45] NOTICE[-1]: pbx_lua.c:1530 load_or_reload_lua_stuff: Lua PBX Switch loaded.
                      [Feb  3 17:35:45] NOTICE[-1]: app_queue.c:6867 reload_queue_rules: queuerules.conf has not changed since it was last loaded. Not taking any action.
                      [Feb  3 17:35:45] NOTICE[-1]: cel_custom.c:95 load_config: No mappings found in cel_custom.conf. Not logging CEL to custom CSVs.
                      pfsense*CLI> sip show registry
                      Host                                    dnsmgr Username       Refresh State                Reg.Time
                      proxy.live.sipgate.de:5060              Y      9999999e2@si       465 Registered           Wed, 03 Feb 2016 17:35:46
                      tel.t-online.de:5060                    Y      03099999999        465 Registered           Wed, 03 Feb 2016 17:35:46
                      2 SIP registrations.
                      

                      I think I have a catch-22 situation. Ok, I can ignore the warnings.

                      Has anyone some more ideas?

                      Router Hardware: Supermicro A1SRi-2758F, 2x Kingston KVR16LSE11-4KF (4GB DDR3L SODIMM-1600 ECC),
                      Router OS: pfSense-2.4.3-RELEASE, Packages: Cron 0.3.7_2, Open-VM-Tools 10.1.0, siproxd 1.1.3_3

                      1 Reply Last reply Reply Quote 0
                      • D
                        daereth
                        last edited by

                        Hey there, just want to give a big kudos to the package manager after some setup I was able to implement an Asterisk installation in my infrastructure right on my virtualized firewall, thanks for that!

                        I do have a small request: is there any way to get the res_srtp module included in a future release? My trunk provider supports SIP w/ TLS + SRTP so you can imagine how invaluable it would be to setup a more secured Asterisk install.

                        Cheers!

                        1 Reply Last reply Reply Quote 0
                        • M
                          matthijs
                          last edited by

                          Hi,

                          Is there a new Asterisk package comming in the near future for the Pfsense 2.3 release ?
                          No asterisk package for Pfsense 2.3 is keeping me from upgrading to this new PFsense version at the moment.

                          Kr,

                          Matthijs

                          1 Reply Last reply Reply Quote 0
                          • C
                            carlm
                            last edited by

                            @matthijs:

                            Hi,

                            Is there a new Asterisk package comming in the near future for the Pfsense 2.3 release ?
                            No asterisk package for Pfsense 2.3 is keeping me from upgrading to this new PFsense version at the moment.

                            Kr,

                            Matthijs

                            I have the same question. I'm in the same situation.

                            1 Reply Last reply Reply Quote 0
                            • rcfaR
                              rcfa
                              last edited by

                              @carlm:

                              @matthijs:

                              Hi,

                              Is there a new Asterisk package comming in the near future for the Pfsense 2.3 release ?
                              No asterisk package for Pfsense 2.3 is keeping me from upgrading to this new PFsense version at the moment.

                              Kr,

                              Matthijs

                              I have the same question. I'm in the same situation.

                              Probably would require a full redo, particularly since the version of asterisk used by the old packages is, well, old, too.
                              Rather would see freeswitch…

                              1 Reply Last reply Reply Quote 0
                              • T
                                tdi
                                last edited by

                                Is anyone working on asterisk for 2.3 ?

                                1 Reply Last reply Reply Quote 0
                                • P
                                  Pawel
                                  last edited by

                                  HI, I need a working package asterisk11 or asterisk13 in pfsense 2.3 to work with new GUI.
                                  If anyone can help?

                                  1 Reply Last reply Reply Quote 0
                                  • F
                                    Fesoj
                                    last edited by

                                    There is no such package, but you can install the standard Asterisk packages from the regular FreeBSD 10.3 repository.

                                    Due to the complexity and diversity of Asterisk's configuration, a GUI might not really be helpful. A simple GUI always implies some assumptions on the usage of Asterisk.

                                    1 Reply Last reply Reply Quote 0
                                    • kklouzalK
                                      kklouzal
                                      last edited by

                                      I agree, aside from giving the user multiple large text boxes for them to hand craft their particular needs out it would be very difficult to create a generic web gui for configuration. I'm not opposed to large text boxes though ;)

                                      1 Reply Last reply Reply Quote 0
                                      • P
                                        Pawel
                                        last edited by

                                        Thanks for reply.

                                        I install the standard Asterisk packages from the regular FreeBSD 10.3 repository:

                                        pkg add http://pkg.freebsd.org/freebsd:10:x86:32/latest/All/gsm-1.0.13_2.txz
                                        pkg add http://pkg.freebsd.org/freebsd:10:x86:32/latest/All/libpri-1.4.15.txz
                                        pkg add http://pkg.freebsd.org/freebsd:10:x86:32/latest/All/mpfr-3.1.4.txz
                                        pkg add http://pkg.freebsd.org/freebsd:10:x86:32/latest/All/mpc-1.0.3.txz
                                        pkg add http://pkg.freebsd.org/freebsd:10:x86:32/latest/All/gcc-4.8.5_2.txz
                                        pkg add http://pkg.freebsd.org/freebsd:10:x86:32/latest/All/binutils-2.25.1_3,1.txz
                                        pkg add http://pkg.freebsd.org/freebsd:10:x86:32/release_3/All/gcc-ecj-4.5.txz
                                        pkg add http://pkg.freebsd.org/freebsd:10:x86:32/latest/All/gcc-4.8.5_2.txz
                                        pkg add http://pkg.freebsd.org/freebsd:10:x86:32/latest/All/openr2-1.3.3.txz
                                        pkg add http://pkg.freebsd.org/freebsd:10:x86:32/latest/All/postgresql93-client-9.3.13_2.txz
                                        pkg add http://pkg.freebsd.org/freebsd:10:x86:32/latest/All/sqlite-2.8.17_3.txz
                                        pkg add http://pkg.freebsd.org/freebsd:10:x86:32/latest/All/mpg123-1.23.6.txz
                                        pkg add http://pkg.freebsd.org/freebsd:10:x86:32/latest/All/png-1.6.23.txz
                                        pkg add http://pkg.freebsd.org/freebsd:10:x86:32/latest/All/libslang2-2.3.0.txz
                                        pkg add http://pkg.freebsd.org/freebsd:10:x86:32/latest/All/newt-0.52.19.txz
                                        pkg add http://pkg.freebsd.org/freebsd:10:x86:32/latest/All/dahdi-2.4.0rc5_6.txz
                                        pkg add http://pkg.freebsd.org/freebsd:10:x86:32/latest/All/e2fsprogs-libuuid-1.43.1_1.txz
                                        pkg add http://pkg.freebsd.org/freebsd:10:x86:32/latest/All/lua51-5.1.5_9.txz
                                        pkg add http://pkg.freebsd.org/freebsd:10:x86:32/latest/All/jansson-2.7_3.txz
                                        pkg add http://pkg.freebsd.org/freebsd:10:x86:32/latest/All/libgpg-error-1.24.txz
                                        pkg add http://pkg.freebsd.org/freebsd:10:x86:32/latest/All/libgcrypt-1.7.2.txz
                                        pkg add http://pkg.freebsd.org/freebsd:10:x86:32/latest/All/freetds-1.00.1,1.txz
                                        pkg add http://pkg.freebsd.org/freebsd:10:x86:32/latest/All/libogg-1.3.2_1,4.txz
                                        pkg add http://pkg.freebsd.org/freebsd:10:x86:32/latest/All/libvorbis-1.3.5,3.txz
                                        pkg add http://pkg.freebsd.org/freebsd:10:x86:32/latest/All/mysql56-client-5.6.30.txz
                                        pkg add http://pkg.freebsd.org/freebsd:10:x86:32/latest/All/speexdsp-1.2.r3_1.txz
                                        pkg add http://pkg.freebsd.org/freebsd:10:x86:32/latest/All/speex-1.2.r2,1.txz
                                        pkg add http://pkg.freebsd.org/freebsd:10:x86:32/latest/All/radiusclient-0.5.6_3.txz
                                        pkg add http://pkg.freebsd.org/freebsd:10:x86:32/latest/All/libtasn1-4.9.txz
                                        pkg add http://pkg.freebsd.org/freebsd:10:x86:32/latest/All/tpm-emulator-0.7.4_1.txz
                                        pkg add http://pkg.freebsd.org/freebsd:10:x86:32/latest/All/trousers-0.3.13.txz
                                        pkg add http://pkg.freebsd.org/freebsd:10:x86:32/latest/All/p11-kit-0.23.2.txz
                                        pkg add http://pkg.freebsd.org/freebsd:10:x86:32/latest/All/gnutls-3.4.14.txz
                                        pkg add http://pkg.freebsd.org/freebsd:10:x86:32/latest/All/iksemel-1.4_7.txz
                                        pkg add http://pkg.freebsd.org/freebsd:10:x86:32/latest/All/portaudio-19.20140130_5.txz
                                        pkg add http://pkg.freebsd.org/freebsd:10:x86:32/latest/All/pjsip-2.5.1_1.txz
                                        pkg add http://pkg.freebsd.org/freebsd:10:x86:32/latest/All/jbigkit-2.1_1.txz
                                        pkg add http://pkg.freebsd.org/freebsd:10:x86:32/latest/All/jpeg-turbo-1.4.2.txz
                                        pkg add http://pkg.freebsd.org/freebsd:10:x86:32/latest/All/tiff-4.0.6_2.txz
                                        pkg add http://pkg.freebsd.org/freebsd:10:x86:32/latest/All/spandsp-0.0.6.txz
                                        pkg add http://pkg.freebsd.org/freebsd:10:x86:32/latest/All/asterisk13-13.10.0.txz

                                        nano /etc/rc.conf
                                        asterisk_enable="YES"

                                        REBOOT SYSTEM

                                        Asterisk work perfectly.
                                        I connect Telephone and Intercom, voices work.

                                        Now I'm working on a simple GUI to pfSense 2.3 and config editor to more configuration.
                                        In attachment first screen from work.

                                        One question, how to add asterisk to autostart on pfsense?

                                        ast.png
                                        ast.png_thumb

                                        1 Reply Last reply Reply Quote 0
                                        • F
                                          Fesoj
                                          last edited by

                                          asterisk_enable="YES"
                                          

                                          This does not work as expected. A simple method to autostart Asterisk is to install the package "shellcmd" and add an entry for Asterisk.

                                          PS: I am also working on a GUI interface. Currently I am exploring the ARI interface to see what could make sense inside pfSense.

                                          1 Reply Last reply Reply Quote 0
                                          • D
                                            dj_mistral
                                            last edited by

                                            Ok, I managed to install all required packages. And also installed shellcmd pfSense-package.
                                            What is the correct command for Shellcmd to start Asterisk13 on boot ?

                                            Ps. Thanks for all the info so far !! Nice topic !

                                            EDIT:

                                            on the command "asterisk -vvvgc" I get:

                                            Asterisk 13.16.0, Copyright (C) 1999 - 2014, Digium, Inc. and others.
                                            Created by Mark Spencer <markster@digium.com>
                                            Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
                                            This is free software, with components licensed under the GNU General Public
                                            License version 2 and other licenses; you are welcome to redistribute it under
                                            certain conditions. Type 'core show license' for details.
                                            =========================================================================
                                            [ Initializing Custom Configuration Options ]
                                              == Parsing '/usr/local/etc/asterisk/extconfig.conf': Found
                                              == Parsing '/usr/local/etc/asterisk/asterisk.conf': Found
                                            XSLT support not found. XML documentation may be incomplete.
                                            Unable to open Asterisk database '/var/db/asterisk/astdb.sqlite3': unable to open database file
                                            ASTdb initialization failed.  ASTERISK EXITING!</markster@digium.com>
                                            
                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.