Asterisk 1.8 package



  • @stephenw10:

    Marcelloc, you are a one man package factory!  ;D

    Thanks stephenw  :)

    The status gui credits goes to robi



  • robi  ;D

    Just tried the package install on a vanilla nanobsd box, unfortunately the GUI didn't appear in the dropdown menu. Also tried to access the filenames directly (by /status_asterisk.php for example) - got 404 - Not Found.
    It appears though well in Services status.



  • I'll try on a clean install to check.

    Can you reinstall the package just in case?

    I've also renamed the files using asterisk as prefix.

    asterisk_cmd.php
    asterisk_log.php
    asterisk.xml
    asterisk.inc
    .
    .
    .



  • I reinstalled again on a fresh system. Still not appearing in the menu.  :-\

    By calling /asterisk_cmd.php directly, it works.

    I would suggest to automatically add my tweaks for Asterisk 1.8 if on a nanobsd system - otherwise the log will be full of errors due to the ro system.

    [Mar 16 21:37:03] ERROR[60090] cdr_sqlite.c: cdr_sqlite: unable to open database: /var/log/asterisk/cdr.db
    [Mar 16 21:37:03] ERROR[60090] cdr_sqlite3_custom.c: Could not open database /var/log/asterisk/master.db.
    [Mar 16 21:37:03] WARNING[60090] cel_pgsql.c: CEL pgsql config file missing global section.
    [Mar 16 21:37:03] NOTICE[60090] cel_radius.c: Cannot load radiusclient-ng configuration file /etc/radiusclient-ng/radiusclient.conf.
    [Mar 16 21:37:03] NOTICE[60090] cel_tds.c: cel_tds has no global category, nothing to configure.
    [Mar 16 21:37:03] WARNING[60090] cel_tds.c: cel_tds module had config problems; declining load
    [Mar 16 21:37:03] WARNING[60090] db.c: Unable to open Asterisk database '/var/db/asterisk/astdb': No such file or directory
    [Mar 16 21:37:03] WARNING[60090] db.c: Unable to open Asterisk database '/var/db/asterisk/astdb': No such file or directory
    [Mar 16 21:37:03] WARNING[60090] db.c: Unable to open Asterisk database '/var/db/asterisk/astdb': No such file or directory
    [Mar 16 21:37:03] WARNING[60090] db.c: Unable to open Asterisk database '/var/db/asterisk/astdb': No such file or directory
    [Mar 16 21:37:03] WARNING[60090] db.c: Database unavailable
    [Mar 16 21:37:03] WARNING[60090] db.c: Unable to open Asterisk database '/var/db/asterisk/astdb': No such file or directory
    [Mar 16 21:37:03] WARNING[60090] db.c: Database unavailable
    [Mar 16 21:37:03] WARNING[60090] chan_unistim.c: Your OS does not support IP_PKTINFO, you must set public_ip.
    [Mar 16 21:37:03] ERROR[60090] res_clialiases.c: res_clialiases configuration file 'cli_aliases.conf' not found
    [Mar 16 21:37:03] NOTICE[60090] pbx_ael.c: Starting AEL load process.
    [Mar 16 21:37:03] NOTICE[60090] pbx_ael.c: AEL load process: parsed config file name '/usr/local/etc/asterisk/extensions.ael'.
    [Mar 16 21:37:03] NOTICE[60090] pbx_ael.c: AEL load process: checked config file name '/usr/local/etc/asterisk/extensions.ael'.
    [Mar 16 21:37:03] NOTICE[60090] pbx_ael.c: AEL load process: compiled config file name '/usr/local/etc/asterisk/extensions.ael'.
    [Mar 16 21:37:03] NOTICE[60090] pbx_ael.c: AEL load process: merged config file name '/usr/local/etc/asterisk/extensions.ael'.
    [Mar 16 21:37:03] NOTICE[60090] pbx_ael.c: AEL load process: verified config file name '/usr/local/etc/asterisk/extensions.ael'.
    [Mar 16 21:37:03] WARNING[60090] pbx_spool.c: Unable to create queue directory /var/spool/asterisk/outgoing -- outgoing spool disabled
    [Mar 16 21:37:03] WARNING[60090] db.c: Unable to open Asterisk database '/var/db/asterisk/astdb': No such file or directory
    [Mar 16 21:37:03] WARNING[60090] db.c: Database unavailable
    [Mar 16 21:37:03] NOTICE[60090] loader.c: Executing deferred reload request.
    [Mar 16 21:37:03] ERROR[60090] logger.c: Unable to create queue log: No such file or directory
    [Mar 16 21:37:03] ERROR[60090] logger.c: Unable to create queue log: No such file or directory
    [Mar 16 21:37:03] ERROR[60090] res_clialiases.c: res_clialiases configuration file 'cli_aliases.conf' not found
    [Mar 16 21:37:03] NOTICE[60090] res_config_ldap.c: No directory user found, anonymous binding as default.
    [Mar 16 21:37:03] ERROR[60090] res_config_ldap.c: No directory URL or host found.
    [Mar 16 21:37:03] NOTICE[60090] res_config_ldap.c: Cannot reload LDAP RealTime driver.
    [Mar 16 21:37:03] NOTICE[60090] app_queue.c: queuerules.conf has not changed since it was last loaded. Not taking any action.
    [Mar 16 21:37:03] NOTICE[60090] chan_skinny.c: Configuring skinny from skinny.conf
    [Mar 16 21:37:03] NOTICE[60090] pbx_ael.c: Starting AEL load process.
    [Mar 16 21:37:03] NOTICE[60090] pbx_ael.c: AEL load process: parsed config file name '/usr/local/etc/asterisk/extensions.ael'.
    [Mar 16 21:37:03] NOTICE[60090] pbx_ael.c: AEL load process: checked config file name '/usr/local/etc/asterisk/extensions.ael'.
    [Mar 16 21:37:03] NOTICE[60090] pbx_ael.c: AEL load process: compiled config file name '/usr/local/etc/asterisk/extensions.ael'.
    [Mar 16 21:37:03] NOTICE[60090] pbx_ael.c: AEL load process: merged config file name '/usr/local/etc/asterisk/extensions.ael'.
    [Mar 16 21:37:03] NOTICE[60090] pbx_ael.c: AEL load process: verified config file name '/usr/local/etc/asterisk/extensions.ael'.
    [Mar 16 21:37:03] WARNING[60090] db.c: Unable to open Asterisk database '/var/db/asterisk/astdb': No such file or directory
    [Mar 16 21:37:03] WARNING[60090] db.c: Unable to open Asterisk database '/var/db/asterisk/astdb': No such file or directory
    [Mar 16 21:37:03] WARNING[60090] db.c: Unable to open Asterisk database '/var/db/asterisk/astdb': No such file or directory
    [Mar 16 21:38:03] WARNING[60090] db.c: Unable to open Asterisk database '/var/db/asterisk/astdb': No such file or directory
    [Mar 16 21:38:03] WARNING[60090] db.c: Database unavailable
    [Mar 16 21:39:03] WARNING[60090] db.c: Unable to open Asterisk database '/var/db/asterisk/astdb': No such file or directory
    [Mar 16 21:39:03] WARNING[60090] db.c: Database unavailable
    [Mar 16 21:40:03] WARNING[60090] db.c: Unable to open Asterisk database '/var/db/asterisk/astdb': No such file or directory
    [Mar 16 21:40:03] WARNING[60090] db.c: Database unavailable
    [Mar 16 21:41:03] WARNING[60090] db.c: Unable to open Asterisk database '/var/db/asterisk/astdb': No such file or directory
    [Mar 16 21:41:03] WARNING[60090] db.c: Database unavailable
    

    I explicitly mean the [directories] section in asterisk.conf and modules in modules.conf. And ofcourse the symlink needed for Master.csv - the call log.
    Adding these will create an absolutely error-free installation on nanobsd.



  • oops, in directories section of asterisk.conf I see this:

    astdbdir => /tmptmptmptmpvar/db/asterisk
    

    and the directories required are not created in the filesystem (/var/log/asterisk/), nor the symlink, just checked.



  • Hi robi,

    I've pushed menu fix and fixed preg_match for conf files

    whait 15 minutes and reinstall package

    https://github.com/bsdperimeter/pfsense-packages/commit/5e1c10abcc307efd9188959f867f509eb27b1107

    Create an account at github so you can push patches to it too.

    att,
    Marcello Coutinho



  • marcelloc congratulations, by the contribution

    thanks for this great work

    marcelloc I'm glad that we have people like you

    a hug and greeting friend

    Mauricio



  • @marcelloc:

    Create an account at github so you can push patches to it too.

    I'd love to. Is there a tutorial somewhere about this, as I'm not familiar about it at all.



  • @robi:

    I'd love to. Is there a tutorial somewhere about this, as I'm not familiar about it at all.

    try this micro how to for pfsense's github repo

    http://forum.pfsense.org/index.php/topic,44686.msg232239.html#msg232239



  • Hi Marcello,
      just for curiosity, how does this package work in a CARP environment? Ok I can point the LAN shared IP from the VOIP phones in the company (so only the Master box receives connections from the phone), but do both boxes try to registrate to the VOIP provider (the box currently working as Master and the one working as Slave)?

    Thanks,
    Michele



  • That's a good point.

    In an outbound scenario it may work with carp as clients will reauth with asterisk.

    For inbound calls, you can test configuring asterisk to listening on carp ips and see if backup asterisk will not crash.



  • @marcelloc:

    That's a good point.
    In an outbound scenario it may work with carp as clients will reauth with asterisk.
    For inbound calls, you can test configuring asterisk to listening on carp ips and see if backup asterisk will not crash.

    well, I am also worry about Asterisk try to register to the VOIP provider, then the VOIP provider will try to contact both boxes for an incoming call… I don't know if I can test that in the real environment, I will coordinate with my colleague that follows the telephony services in my company and try to imagine how we can manage a try. Now we use Freeswitch on a server in our DMZ network...



  • In theory backup box will not be able to register as it will not have the configured ip on it.



  • @marcelloc:

    @robi:

    I'd love to. Is there a tutorial somewhere about this, as I'm not familiar about it at all.

    try this micro how to for pfsense's github repo

    http://forum.pfsense.org/index.php/topic,44686.msg232239.html#msg232239

    I made changes, comitted, named "Updated asterisk package to remove errors in the log, cosmetic GUI fixes". The question is, when will they appear when reinstalling the package?



  • Did you did a pull request for this?

    there is no alerts on https://github.com/bsdperimeter/pfsense-packages notifications



  • Sorry please try now.



  • I made two more fixes, comitted etc. and when trying to send a new pull request it says "Oops! There's already a pull request for nagyrobi:master"  ??? ??? ???



  • You need to wait the commit or cancel your current pull request and push another



  • In this case please pull the first one in, I'll do some tests, and afterwards I'll push next ones if needed following.



  • Ok, I'll do it sunday.

    I'm on smartphone now.



  • I discovered further issues related to the package approach, but cannot go further until commits are pulled in (to see if I'm on the right track or not).

    I need to learn about how daemon's logging works in pfSense - maybe we should use a similar approach in asterisk's case.



  • Your pull request is marked as This pull request cannot be automatically merged..

    I'm going to merge your changes by hand but module template and sip.conf forced is not a good idea. :(

    for example:

    res_timing_pthread.so is essential for audio quality(timing source) as dahdi is not installed.
    chan_iax2.so is an excelent option for trunking and nat.
    app_db.so is a very fast built in db for dialplans

    I know it´s not that simple but I think it's better trying to include a gui like asterisknow or freepbx instead of forcing configurations.



  • Good news!

    I could get asterisk-gui 2.0 running on pfsense. ;D

    Next step is adjust some gui options to have a full funcional asterisk package for pfsense.

    Status from robi, gui configuration from digium, compilation and joining by me.




  • That sounds good. My approach was simplistic.

    modules:
    For example app_db is problematic on nanobsd, as it cannot be saved on a read-only filesystem. Iax is a good thing, but rarely used nowdays, as it's not properly route-able protocol. timing_pthread - I'll have to look at this, but I remember having dependency problems on pfSense install. Disabling non-used modules saves memory too.
    I'm using it flawlessly with 2 SIP phones and 4 SIP registrar accounts like this and never had any sound or whatever problems so far.

    sip.conf:
    Has specific recommendations for working properly on pfSense. Plus the original sip.conf is huge and over commented, not speaking that each .conf file is installed twice - keeping only one fully commented is more than enough.

    But having a full-blown asterisk-GUI indeed implies to solve all the dependency problems properly - and after all, renders the simple status GUI useless, as all the functions I wrote I suppose, are present in the big GUI.

    I'd love that too - but requires lots of work, I guess…



  • The simple gui will continue as many people like doing their own dialplan for custom and/or small instalation.

    I'll publish your changes as well try to fix nanobsd erros, but config options must be something easy to change.



  • Can someone fill me in on how to configure asterix once it is installed?  The service is running and the status page shows up but can't work out where / how to configure settings (SIP servers, IPs etc..)



  • In current version, you need to edit asterisk files

    status-> asterisk -> edit configuration

    sip.conf # define trunks,extensions and sip settings
    extensions.conf # define dialplan

    I'm planning to include asterisk-gui on this package but I need more time to finish it.



  • Marcel, here's a small update to the package. I'm attaching it here rather than sending it via GIT, as it seems problematic that way.

    In the PHP part I added a couple of cosmetics, and in asterisk.inc I added a check-routine for nanobsd, for existance of asterisk log, and callog dir.

    If you didn't merge my old GIT changes so far nevermind, just overwrite the files with these.

    asterisk_pkg_upd_robi_1.zip.xls



  • Just wondering.. what are the chances of 2 features..

    1. A show Iax trunks feature (or iax peers)
    2. The ability to route incoming traffic directly to a sip trunk that has been created.

    The reason I'm asking is due to NAT and OPENVPN settings, getting calls to a gateway is near impossible using sip and nat traversal even through siproxd with stun enabled.

    I'd love to be able to route an iax trunk to the openvpn interface, have it connect to the asterisk plugin on the pfsense and have a pfsense asterisk sip trunk to the gateway on the far end, thus allowing me to communicate with the gateway on the far end without all the nat traversal.

    So basically, here's how it would look:

    Public Asterisk Machine (Public IP)<–-------------->IAX Trunk<--------------> pfsense openvpn gateway<------>Asterisk Plugin on PFsense<----------->SIP TRUNK ON LAN interface / subnet to Gateway with private IP (192.168.x.x/24)

    So basically calls can come in the IAX trunk over the VPN connection and be routed to the pfsense asterisk plugin and immediately piped to the GSM Gateway behind the pfsense on the LAN Gateway.



  • @pkwong:

    Just wondering.. what are the chances of 2 features..

    1. A show Iax trunks feature (or iax peers)
    2. The ability to route incoming traffic directly to a sip trunk that has been created.

    These features(and others) will be available when I have time to finish asteriskgui port to pfnse
    http://forum.pfsense.org/index.php/topic,47210.msg250379.html#msg250379



  • @pkwong:

    I'd love to be able to route an iax trunk to the openvpn interface, have it connect to the asterisk plugin on the pfsense and have a pfsense asterisk sip trunk to the gateway on the far end, thus allowing me to communicate with the gateway on the far end without all the nat traversal.

    So basically, here's how it would look:

    Public Asterisk Machine (Public IP)<–-------------->IAX Trunk<--------------> pfsense openvpn gateway<------>Asterisk Plugin on PFsense<----------->SIP TRUNK ON LAN interface / subnet to Gateway with private IP (192.168.x.x/24)

    Don't you think this will dramatically increase audio delay in the phone lines? Especially the OpenVPN part of the road can add time delays to TCP/IP going thru the tunnel. Any delay more than 25ms/direction will make a phone conversation unusable as the dialogue will become unnatural.



  • @robi:

    Don't you think this will dramatically increase audio delay in the phone lines? Especially the OpenVPN part of the road can add time delays to TCP/IP going thru the tunnel. Any delay more than 25ms/direction will make a phone conversation unusable as the dialogue will become unnatural.

    My last Skype conversation was having a delay of almost 2 minutes  :D



  • @EOC2611P:

    @robi:

    Don't you think this will dramatically increase audio delay in the phone lines? Especially the OpenVPN part of the road can add time delays to TCP/IP going thru the tunnel. Any delay more than 25ms/direction will make a phone conversation unusable as the dialogue will become unnatural.

    My last Skype conversation was having a delay of almost 2 minutes  :D

    :D :D :D :D



  • any idea if FreePBX will be able to be compatible with Asterisk 1.8 on PFS ?



  • @npereira:

    any idea if FreePBX will be able to be compatible with Asterisk 1.8 on PFS ?

    Not yet. Freepbx is much more complex(and powerfull) then asterisk gui.

    I've looked for freepbx integration but the setup involves a lot of extra steps and php5.3 that may break pfsense 2.0.1 install.



  • @marcelloc:

    @npereira:

    any idea if FreePBX will be able to be compatible with Asterisk 1.8 on PFS ?

    Not yet. Freepbx is much more complex(and powerfull) then asterisk gui.

    I've looked for freepbx integration but the setup involves a lot of extra steps and php5.3 that may break pfsense 2.0.1 install.

    freepbx plains sucks. is a pain in the ass to maintain on the back end.



  • Any delay more than 25ms/direction will make a phone conversation unusable as the dialogue will become unnatural.

    You missed a 0. It's 250ms. But again it only starts to degrade slowly from there. I running at 400ms just fine here.

    Yes, FreePBX is the worst option. Probably a nice simple css/mxl/html page would do for most of the features. Maybe copy FreePBX layout and features but not it's packages. They will never work with pfSense team to have something out that would be working for everything. Too politically charged….



  • @marcelloc:

    Good news!

    I could get asterisk-gui 2.0 running on pfsense. ;D

    Next step is adjust some gui options to have a full funcional asterisk package for pfsense.

    Status from robi, gui configuration from digium, compilation and joining by me.

    where can i find digium gui???
    thanks





  • @marcelloc:

    @xbaha:

    http://downloads.asterisk.org/pub/telephony/asterisk-gui

    sorry for this stupid question… i downloaded the package, unzip it, tried ./configure , something was missing, and also "make;make install" is unknown command, do i need to install something first?
    sorry, but my Linux is basic knowledge.. pls check attached.
    thanks for any help.



 

© Copyright 2002 - 2018 Rubicon Communications, LLC | Privacy Policy