pfSense Support Subscription

Author Topic: Asterisk 1.8 package  (Read 48027 times)

0 Members and 1 Guest are viewing this topic.

Offline marcelloc

  • Hero Member
  • *****
  • Posts: 10004
  • Karma: +5/-0
    • View Profile
Asterisk 1.8 package
« on: March 13, 2012, 10:39:03 pm »
Hi all,

First release of asterisk 1.8.x package for pfsense.

Current package stage has asterisk installation and gui for status info as well file editing.


Starting posts that resulted on this package:

Asterisk ON pfSense2.0.1

Asterisk status on pfSense2.0.1 webGUI


att,
Marcello Coutinho

Offline robi

  • Sr. Member
  • ****
  • Posts: 319
  • Karma: +1/-0
    • View Profile
Re: Asterisk 1.8 package
« Reply #1 on: March 14, 2012, 05:31:36 am »
Thank you! Will do some tests on a vanilla system.

Online stephenw10

  • Hero Member
  • *****
  • Posts: 8177
  • Karma: +12/-0
    • View Profile
Re: Asterisk 1.8 package
« Reply #2 on: March 14, 2012, 08:24:54 am »
Marcelloc, you are a one man package factory!  ;D

Great job. My thanks anyone else who contributed to making this happen.

Steve

Offline marcelloc

  • Hero Member
  • *****
  • Posts: 10004
  • Karma: +5/-0
    • View Profile
Re: Asterisk 1.8 package
« Reply #3 on: March 14, 2012, 08:48:59 am »
Marcelloc, you are a one man package factory!  ;D

Thanks stephenw  :)

The status gui credits goes to robi
« Last Edit: March 14, 2012, 11:54:10 am by marcelloc »

Offline robi

  • Sr. Member
  • ****
  • Posts: 319
  • Karma: +1/-0
    • View Profile
Re: Asterisk 1.8 package
« Reply #4 on: March 14, 2012, 11:26:46 am »
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.

Offline marcelloc

  • Hero Member
  • *****
  • Posts: 10004
  • Karma: +5/-0
    • View Profile
Re: Asterisk 1.8 package
« Reply #5 on: March 14, 2012, 11:57:14 am »
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
.
.
.

Offline robi

  • Sr. Member
  • ****
  • Posts: 319
  • Karma: +1/-0
    • View Profile
Re: Asterisk 1.8 package
« Reply #6 on: March 16, 2012, 04:26:47 pm »
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.

Code: [Select]
[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.
« Last Edit: March 16, 2012, 04:49:35 pm by robi »

Offline robi

  • Sr. Member
  • ****
  • Posts: 319
  • Karma: +1/-0
    • View Profile
Re: Asterisk 1.8 package
« Reply #7 on: March 16, 2012, 04:43:38 pm »
oops, in directories section of asterisk.conf I see this:

Code: [Select]
astdbdir => /tmptmptmptmpvar/db/asterisk
and the directories required are not created in the filesystem (/var/log/asterisk/), nor the symlink, just checked.
« Last Edit: March 16, 2012, 04:48:20 pm by robi »

Offline marcelloc

  • Hero Member
  • *****
  • Posts: 10004
  • Karma: +5/-0
    • View Profile
Re: Asterisk 1.8 package
« Reply #8 on: March 16, 2012, 05:11:43 pm »
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

Offline mauricioniñoavella

  • Jr. Member
  • **
  • Posts: 93
  • Karma: +0/-0
    • View Profile
Re: Asterisk 1.8 package
« Reply #9 on: March 22, 2012, 02:42:53 pm »
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

Offline robi

  • Sr. Member
  • ****
  • Posts: 319
  • Karma: +1/-0
    • View Profile
Re: Asterisk 1.8 package
« Reply #10 on: March 22, 2012, 04:51:22 pm »
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.

Offline marcelloc

  • Hero Member
  • *****
  • Posts: 10004
  • Karma: +5/-0
    • View Profile
Re: Asterisk 1.8 package
« Reply #11 on: March 22, 2012, 07:39:32 pm »
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

Offline mdima

  • Sr. Member
  • ****
  • Posts: 384
  • Karma: +0/-0
    • View Profile
Re: Asterisk 1.8 package
« Reply #12 on: March 23, 2012, 03:38:17 pm »
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

Offline marcelloc

  • Hero Member
  • *****
  • Posts: 10004
  • Karma: +5/-0
    • View Profile
Re: Asterisk 1.8 package
« Reply #13 on: March 23, 2012, 04:25:21 pm »
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.


Offline mdima

  • Sr. Member
  • ****
  • Posts: 384
  • Karma: +0/-0
    • View Profile
Re: Asterisk 1.8 package
« Reply #14 on: March 23, 2012, 04:35:31 pm »
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...