Asterisk 1.8 package



  • Note to users upgrading from pfSense v2.0.x:

    Asterisk package was converted to PBI, thus the system file locations for it have been changed. That means that the asterisk.conf file on the 2.0.x and 2.1 will have different [directories] sections. Please revise the directory paths on the fresh install of Asterisk on v2.1, and correct them manually before restoring the configuration from 2.0.x.

    On simpler scenarios, where only SIP protocol is used, the first approach to upgrade Asterisk would be to actually install it fresh on a v2.1 box, and replace sip.conf and extensions.conf files with the previous ones. All the other config files can be left in their default state if you didn't modify them earlier.



  • @robi:

    Work is in progress just now with modifications to address these issues.

    Actually paths will be corrected on the file system to point to writable locations (as /usr/pbi/…. is not writable on NanoBSD), symlinks will be used and Asterisk configuration files will be updated accordingly on first install.

    Please be patient, soon the update will be available in the packages list.

    Thanks robi for the quick answer :)

    @robi:

    Package update v0.3 should be online soon.

    If you already installed asterisk package on v2.1, I suggest to start from scratch by creating a fresh install of pfSense, or at least uninstall the complete Asterisk package, remove these directories by hand, reboot and reinstall Asterisk package:

    Spool directory:             /var/spool/asterisk
    Log directory:               /var/log/asterisk
    Run/Sockets directory:       /var/run/asterisk
    ASTDB:                       /var/db/asterisk/astdb
    

    i'll have to reinstall my setup from scratch on 2.1 cause my HDD is failing

    if i have little time, i'll post the name of the file and what to temporary modify as a workaround until the package is completely updated.

    you do a great job here folks :)

    thanks



  • It's already done, devs from pfSense need to pull it in to the servers…



  • @robi:

    It's already done, devs from pfSense need to pull it in to the servers…

    awsome !!

    i'll wait and test it :)

    thanks



  • is the last update Asterisk 1.8 pkg v0.3 broken for you ?

    • does'nt want to start via web GUI (via status -> service or via Asterisk command page).
    • asterisk log page is broken (parse error)
    • it start manually but extension won't register (no modification in conf file from 1.8 pkg v0.2)

    EDIT :
    nevermind for extension not registering

    BUT
    still need to start manually via shell ( asterisk -C /usr/pbi/asterisk-amd64/etc/asterisk/asterisk.conf )

    and log page is missing a ")" on line 70



  • Yes, I've fixed them yesterday evening, pushed them to the server, still waiting to be pulled in.



  • Hi roby,

    I've tested it on 2.1 and code was not working correctly.

    I did some changes and at least on 2.1 it's working fine now.

    Check if it's ok on nanobsd too.



  • It's broken again, sent you a PM with the reason why.



  • @robi:

    It's broken again, sent you a PM with the reason why.

    Can you check again with latest changes?



  • The Asterisk package works now with pfSense 2.1. both full setup and NanoBSD.

    It includes a web interface for issuing basic or custom commands to asterisk console, calls log, system log, configuration files editing option, configuration directory backup and restore option.

    By default when installed on pfSense it's preconfigured for SIP operation, and has got two demo extensions, 301 and 302 which allow testing with real IP phones or softphones through the LAN interface.



  • hello
    tell here how to install chan-dongle? https://code.google.com/p/asterisk-chan-dongle/ ?

    PF 2.1
    Asterisk Services 1.8 pkg v0.3.1 Asterisk is an open source framework for building communications applications.
    Asterisk turns an ordinary computer into a communications server.



  • You need to compile it on freebsd 8.3



  • How cool… One could use Asterisk to place directly mobile calls through a supported 3G modem.



  • @robi:

    How cool… One could use Asterisk to place directly mobile calls through a supported 3G modem.

    Yes. I've tested it on linux and it works. The problem I had way with usb power supply for multiple 3g modem and power boot sequence some times.



  • Hi Marcelloc,

    First, thanks for your great work again…
    I was running a FreePBX server behind Pfsense, however it seems there are some NAT problem and I can't find any solution for that.
    Then I tried your Asterisk package, it works perfect  :D. The only question is it's difficult for me to edit the configurations... :-[
    I read your post and you have installed Asterisk-gui successful before, I am now sure it's still working for latest pfsense 2.1?
    Can I ask you to post a guide here?

    Thanks



  • I've not tested it on 2.1 yet and freebsd port is still pending.



  • @zlyzwy:

    Hi Marcelloc,

    First, thanks for your great work again…

    It's mainly a robi work. I just did some small modifications  ;)



  • @zlyzwy:

    The only question is it's difficult for me to edit the configurations… :-[
    [/quote]

    if it is only to modify the config file directly, you can do it this way (if you use windows) :

    • enable SSH in "System" -> "Advanced" - > "Admin Access" and check "Enable Secure Shell"
    • use WINCSP to access the files in /conf/asterisk/

    that's the way i modify my conf files for asterisk.

    I hope the GUI will be ported soon. :) Will be good to have a complete GUI to manage configuration.



  • Why don't you use edit configuration tab? ???



  • I am running the Asterisk 1.8 package on pfsense 2.1 and have the following issues:

    Everytime I reboot pfsense the following (demo) configuration text is added to sip.conf

    ==>

    [301]
    ;demo extension for pfSense
    type=friend
    defaultuser=301
    insecure=port,invite
    secret=1234
    regexten=301
    host=dynamic
    context=default

    [302]
    ;demo extension for pfSense
    type=friend
    defaultuser=302
    insecure=port,invite
    secret=1234
    regexten=302
    host=dynamic
    context=default

    <==

    Everytime I reboot pfsense my call history is lost
    Everytime I reboot pfsense my Asterisk log file is empty
    Everytime I reboot pfsense my personal voicemail message is gone

    Are there any sollutions to my above problems

    Thanks in advance

    Kr,

    Matthijs



  • What pfsense version are you using?



  • Like I said I am using pfsense 2.1 :)



  • @matthijs:

    Like I said I am using pfsense 2.1 :)

    i386, amd64, nanobsd?



  • O sorry

    2.1-RELEASE (i386)
    built on Wed Sep 11 18:16:44 EDT 2013
    FreeBSD 8.3-RELEASE-p11



  • PBX Core settings
    –---------------
      Version:                    1.8.19.0
      Build Options:              LOADABLE_MODULES
      Maximum calls:              Not set
      Maximum open file handles:  Not set
      Verbosity:                  0
      Debug level:                0
      Maximum load average:        0.000000
      Startup time:                21:41:43
      Last reload time:            21:41:43
      System:                      FreeBSD/8.3-RELEASE-p3 built by root on i386 2012-12-19 14:50:46 UTC
      System name:               
      Entity ID:                  xxx
      Default language:            en
      Language prefix:            Enabled
      User name and group:        /
      Executable includes:        Disabled
      Transcode via SLIN:          Enabled
      Internal timing:            Enabled
      Transmit silence during rec: Disabled
      Generic PLC:                Enabled

    • Subsystems
        -------------
        Manager (AMI):              Disabled
        Web Manager (AMI/HTTP):      Disabled
        Call data records:          Enabled
        Realtime Architecture (ARA): Disabled

    • Directories
        -------------
        Configuration file:         
        Configuration directory:    /conf/asterisk
        Module directory:            /usr/pbi/asterisk-i386/lib/asterisk/modules
        Spool directory:            /var/spool/asterisk
        Log directory:              /var/log/asterisk
        Run/Sockets directory:      /var/run/asterisk
        PID file:                    /var/run/asterisk/asterisk.pid
        VarLib directory:            /usr/pbi/asterisk-i386/share/asterisk
        Data directory:              /usr/pbi/asterisk-i386/share/asterisk
        ASTDB:                      /var/db/asterisk/astdb
        IAX2 Keys directory:        /usr/pbi/asterisk-i386/share/asterisk/keys
        AGI Scripts directory:      /usr/pbi/asterisk-i386/share/asterisk/agi-bin



  • any news or suggestions ?  ::)



  • Not sure about voicemail but I keep logs and cdr after reboot. Still using 301/302 but no changes to them and 303+ externals are fine, no re-addition of demo extensions.

    Working nicely on fresh 2.1 with raid1 (shouldn't matter). I have 2 lans on LAN and OPT1 and set localnet for both to pfsense's IP on those nets. Also doing 1:1 on WAN VIP to OPT2 so thinking of trying to get SIP to pass through tot that on a theoretical setup where pfsense handles some lans and passes an external IP to another lan that has it's own asterisk for whatever reason or just one phone talking to another outside asterisk or provider that has to be on 5060 as well.

    Is there  any explanation as to why jitterbuffer is on for PFSENSE's asterisk? I get why allowguest isn't… just curious about jitterbuffer.



  • Well I finaly figured it out

    In /usr/local/pkg
    there is the a file called asterisk.inc
    It contains the following code wich is causing my issue of the demo extentions being added after a reboot

    ==>

    if (strpos($script_file,'demo extension for pfSense') === false) {  //first check if already added…
                                    $add_demo_extension = << <eof<br>[301]
    ;demo extension for pfSense
    type=friend
    defaultuser=301
    insecure=port,invite
    secret=1234
    regexten=301
    host=dynamic
    context=default

    [302]
    ;demo extension for pfSense
    type=friend
    defaultuser=302
    insecure=port,invite
    secret=1234
    regexten=302
    host=dynamic
    context=default

    EOF;
                                    $script_file .= $add_demo_extension;
                                    file_put_contents($script, $script_file, LOCK_EX);
                            }
    <==

    Please fix this in the next release
    Thanks in advance

    Kr

    :) :) :)</eof<br>



  • As a workaround, all you have to do is keep the comment line "demo extension for pfSense" present in the conf file, but delete the demos themselves. The script only checks for the string "demo extension for pfSense", if it's present, it doesn't add anything.

    I can't seem to reproduce this problem in my setup though. If I delete the whole thing, it keeps it deleted after reboot too.



  • Hello,

    I have a specific question concerning logging as my Asterisk seems to often miss the connection to my VoIP provider.
    How could I send the Asterisk logging to a syslog server (I have one running in my house) ?

    Another solution could be to send the logs to a USB stick. But how ?

    Tx for your help !



  • no one ?



  • To save logs to the USB stick I think it would be enough to just change the logdir path in asterisk.conf```
    astlogdir => /var/log/asterisk

    
    For a remote syslog server you can try some tips found on the internet: http://www.savelono.com/linux/configuring-asterisk-for-a-remote-syslog-server.html


  • Over here on pfSense-2.1-RELEASE-4g-amd64-nanobsd_vga after package installation console outputs:

    Parse error: syntax error, unexpected $end in /usr/local/pkg/asterisk.inc on line 389



  • HEllo ,
    In 2.1-RELEASE (i386)
    built on Wed Sep 11 18:16:22 EDT 2013
    FreeBSD 8.3-RELEASE-p11

    With clean package install i am wondering to activate the AEL module , but there is an error.

    nxtwall*CLI> module load pbx_ael.so
    Unable to load module pbx_ael.so
    Command 'module load pbx_ael.so ' failed.
    [Feb 10 11:18:17] WARNING[92895]: loader.c:481 load_dynamic_module: Error loading module 'pbx_ael.so': /usr/pbi/asterisk-i386/lib/asterisk/modules/pbx_ael.so: Undefined symbol "destroy_pval"
    [Feb 10 11:18:17] WARNING[92895]: loader.c:894 load_resource: Module 'pbx_ael.so' could not be loaded.

    Thanks for your help.

    Regards



  • I never used pbx_ael.so module. I guess it depends on something, which is missing. Perhaps googling on the error message could give some hints…



  • I just upgraded my pFsense to the latest 2.1.2 release….
    After the reboot & successfull update pFsense gave me the following message "Packages are currently being reinstalled in the background."

    Nice !

    I have 2 packages....a small one (CRON) and Asterisk.
    The problem is the size of the new Asterisk package that is automatically installed !!!!!

    • previous release - asterisk-1.8.25.0-i386.pbi  -> 41MB
    • current release - asterisk-1.8.26.1-i386.pbi -> 108MB

    At the end of the installation Asterisk burns 580MB of space which leaves my 1GB CF card....voiceless...as my VoIP installation.

    In fact even with a 2GB CF card it has been problematic for me to install it.
    88% space used & installation goes forever. Then reboot, install the package again (in fact it will just run the installation phase not the download) and finally....it works ! But my card is nearly full with 88% of 907M used.

    Is there a reason for such a size increase ?
    What would be the way for installing the older release instead ?

    Thanks for your help.



  • Hmm…

    I also noticed that on my 4G CF card the space usage was higher after the upgrade, but I thougt that was because I was also upgrading architecture from i386 to x64. Your post shows me that I was most probably wrong.

    As far as I can remember the older Asterisk had some security issues, so the upgraded version is recommended to be used. However it's indeed surprising more than twice disk space to be used.
    The older asterisk had quite a lot of non-functional modules, because of many missing dependencies. Maybe here these were fixed, that would explain the increased disk space requirerements.

    I don't know.

    However, I suggest to move to 4GB card on NanoBSD...



  • @robi:

    As a workaround, all you have to do is keep the comment line "demo extension for pfSense" present in the conf file, but delete the demos themselves. The script only checks for the string "demo extension for pfSense", if it's present, it doesn't add anything.

    I have the same behaviour here and using your workaround does the trick.
    But it is annoying….



  • Hello ,
    I am using Asterisk package in the new Pcengines APU board with Pfsense 2.1 .
    I am searching to use Codec G729  ?  there is someone who try it?

    Regards

    Daniel



  • I think i need to recompile the sources  from here http://asterisk.hosting.lv/ 
    in a FreeBSD 8.0 system , with the linux compatibility ( Pfsense 2.1 doenst)

    Tell me if i am in the right way !!

    Thanks for your help

    Regards

    Daniel


Log in to reply