Prioritize Asterisk ProcessYou can experiment with different values and see what works best. I wouldn't go too high as it could cause other problems. From the command 'top' the PR column shows absolute priority and NI column is the relative number we add here. Default is 0 which gives Asterisk about the same default priority as httpd and mysql. 5-10 should give top priority without crippling critical background tasks. I believe this setting can go as high as 20. This is only a prioritization recommendation setting. The linux process scheduler still has ultimate authority so actual priority will vary from system to system depending on what else is installed.nano +22 /usr/sbin/safe_asterisk PRIORITY=10 Firewall/Router configurationThe following ports needed to be forwarded to the asterisk server for various remote access Port 80 (Freepbx web access) NOTE: The RTP ports 10000-xxxxx forwarded in the firewall/router need to match the setting in /etc/asterisk/rtp.conf External SIP extensionsnano /etc/asterisk/sip_nat.conf (Ctrl-X>y>ENTER) Also, when adding the external SIP extension in FreePBX, make sure to change the nat=never default in the configuration to nat=yes for the extension that will be external. Logger.conf setupBy default, Asterisk/Freepbx installs with full (debug and verbose) logging enabled. This generates a significant amount of extra write activity to the hard drives and creates a very large "var/log/asterisk/full" log file in a short amount of time. After the initial settling in period when debug logging is no longer required it is a good idea to disable this to reduce the stress on the drives and extend their life. nano /etc/asterisk/logger.conf change you will need to restart Asterisk or type LOGGER ROTATE at the CLI to get this change to take effect (reload doesn't do it apparently). Logrotate setupAsterisk/FreePBX does not set up a configuration to automatically rotate the log files for some reason. Kind of suprising. I only noticed because the /var/log/asterisk/full log file got to 300MB after only a month. It would probably crash the system after awhile. Create the following file. nano /etc/logrotate.d/asterisk Now add the following to make sure the asterisk log files are rotated weekly along with all the other log files. /var/log/asterisk/messages /var/log/asterisk/*log /var/log/asterisk/full { Sendmail configurationEdit /etc/aliases file and add a “root:
username_to_forward_to” to forward all ‘root’ messages to your personal
email address. Put in the full email address if it is not on the
asterisk system itself. If emails are not received you must set up masquerading in
sendmail. These still may be rejected if the email server requires the
source of the email to also resolve to the same DNS that sendmail is
masquerading as.
To enable this, add the following lines to the /etc/mail/sendmail.mc file:
MASQUERADE_AS(domain.com)dnl
FEATURE(masquerade_envelope)dnl
FEATURE(masquerade_entire_domain)dnl
MASQUERADE_DOMAIN(domain.com)dnl
Put a “dnl” in front of the line ”EXPOSED_USER (`root’) dnl”. This enables host masquerading for root as well which is disabled by default. Update the Sendmail configuration files using the m4 macro
processor to generate a new sendmail.cf file by executing the following
command:
# m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
To get the Sendmail macro file, the sendmail-cf package must be installed on the system.
After creating a new /etc/mail/sendmail.cf file, restart
Sendmail for the changes to take effect. To do this, use the following
command:
# service sendmail restart
nano /etc/asterisk/vm_general.inc
change serveremail=vm@asterisk to whom ever you want it to appear voicemail emails are coming from.
NOTE:
If you are installing on a LAN or do not have a domain resolving to the
IP of the VPS, Sendmail will hang for a couple minutes everytime you
reboot. To prevent this your VPS hostname should end with .local or
.localhost. So, for example, instead of naming the VPS hostname
'powerpbx' it should be named 'powerpbx.local'. The manual method is to
edit your /etc/hosts file. There should be 2 lines.
|
手机版|小黑屋|BC Morning Website ( Best Deal Inc. 001 )
GMT-8, 2026-4-11 09:10 , Processed in 0.024539 second(s), 18 queries .
Supported by Weloment Group X3.5
© 2008-2026 Best Deal Online