text stringlengths 0 152 |
|---|
load it. |
Next up, we’re going to tweak the logger.conf file just a bit from the defaults. |
$ sudo -u asterisk vim /etc/asterisk/logger.conf |
[general] |
exec_after_rotate=gzip -9 ${filename}.2; |
[logfiles] |
;debug => debug |
;security => security |
console => notice,warning,error,verbose |
;console => notice,warning,error,debug |
messages => notice,warning,error |
full => notice,warning,error,debug,verbose,dtmf,fax |
;full-json => [json]debug,verbose,notice,warning,error,dtmf,fax |
;syslog keyword : This special keyword logs to syslog facility |
;syslog.local0 => notice,warning,error |
You will notice that many lines are commented out. They’re there as a reference, |
because you’ll find when debugging your system you may want to frequently tweak |
this file. We’ve found it’s easier to have a few handy lines prepared and commented |
out, rather than having to look up the syntax each time. |
38 |
| |
Chapter 3: Installing Asterisk |
The next file, asterisk.conf, defines various folders needed for normal operation, as |
well as parameters needed to run as the asterisk user: |
$ sudo -u asterisk vim /etc/asterisk/asterisk.conf |
[directories](!) |
astetcdir => /etc/asterisk |
astmoddir => /usr/lib/asterisk/modules |
astvarlibdir => /var/lib/asterisk |
astdbdir => /var/lib/asterisk |
astkeydir => /var/lib/asterisk |
astdatadir => /var/lib/asterisk |
astagidir => /var/lib/asterisk/agi-bin |
astspooldir => /var/spool/asterisk |
[options] |
astrundir => /var/run/asterisk |
astlogdir => /var/log/asterisk |
astsbindir => /usr/sbin |
runuser = asterisk ; The user to run as. The default is root. |
rungroup = asterisk ; The group to run as. The default is root |
We’ll configure more files later on, but these are all we need for the time being. |
Let’s update the ownership of the files so the asterisk user has proper access to |
them. |
$ sudo chown -R asterisk:asterisk {/etc,/var/lib,/var/spool,/var/log,/var/run}/asterisk |
We also may need to add a rule to the /etc/tmpfiles.d folder, to allow Asterisk to create |
a socket at runtime. |
$ sudo vim /etc/tmpfiles.d/asterisk.conf |
d /var/run/asterisk 0775 asterisk asterisk |
(See man tmpfiles.d for more information.) |
Next up, we’re going to initialize the database with the tables Asterisk needs for |
ODBC-based configuration. |
The Asterisk source files include a contribution that the Digium folks maintain as |
part of Asterisk, in order to version-control the database tables needed. This greatly |
simplifies keeping the database correct through the upgrade process. |
Navigate to the relevant directory and make a copy of the configuration file. |
$ cd ~/src/asterisk-16.<TAB>/contrib/ast-db-manage |
$ cp config.ini.sample config.ini |
Now, we’re going to open the file and give it the credentials for our database (which |
are defined in the Ansible playbook named starfish.yml, under the variable cur |
rent_mysql_asterisk_password, which we used at the beginning of this chapter): |
$ vim config.ini |
Find the lines that look similar to this: |
Asterisk Installation |
| |
39 |
#sqlalchemy.url = postgresql://user:pass@localhost/asterisk |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.