Friday, May 6, 2011

Royal Caribbean Cruise Ship Auditions

Installing Asterisk and FreePBX on Ubuntu / Debian

This is a translation of the guide published in various media to install Asterisk on Debian / Ubuntu.
These procedures were tested in Hardy Heron, Intrepid Ibex, Jaunty Jackalope (a step added to the final), Karmic and Debian Lenny.

Before installing, things to ready

Install the server with the method of choice. You can mark LAMP when installing packages. This adds to L inux the A pache, M P ySQL and HP. We entered the server and we changed the superuser sudo su
 
To be sure about MySQL and PHP do this
 apt-get install php5-mysql libapache2-mod-php5 mysql-server 
may then need to configure apache properly, or at least ensure that php5 is enabled. In Intrepid Ibex, Jaunty or Krmic this no:
 a2enmod 
php5 work location to edit / etc/php5/apache2/php.ini and modify as follow (leny / sid):
; PHP's built-in default is text / html 
default_mimetype = "text / html"
; default_charset = "ISO-8859-1"
default_charset = "utf8" force
The last line on page utf8 characters for php pages (overwriting Character page apache).
De http://www.freepbx.org/trac/wiki/UbuntuServer
I had problems with i18n php sites php and this change work for them configuiración
Other items that should change in the php.ini file to make happy FreePBX.
; Magic quotes for incoming GET / POST / Cookie data. Magic_quotes_gpc = Off 


; max_input_nesting_level = 64; Maximum input variable nesting level memory_limit = 100M
; Maximum Amount of memory a script May consume (16MB)

 Asterisk Install apt-get install asterisk asterisk-mp3 asterisk-mysql php-db php5-gd php-pear curl sox 
There is no reason to install zaptel in kernels 2.6 or higher because the timing device is provided by the kernel, unless, of course we're wearing a badge that requires it. Ztdummy no longer necessary.
In Karmic will install version 1.6 of Asterisk, in the other version 1.4.
I also installed these sounds and warnings in English
 apt-get install asterisk-prompt-it-sounds-extra asterisk 
There are two approaches to solve the issue of permits, one is to add the asterisk user group www-data is the default apache user.
1. Keep as www-data user
 adduser www-data asterisk 
Thus, FreePBX gives an error copying / usr / share / asterisk / bin / agi-bin. Change the file owner Thus
 chown-R www-data.asterisk / usr / share / asterisk 
After installing FreePBX need to change the password on amportal.conf. This is in "Installing FreePBX.
skip to section 3.
2. Change apache to work with the user asterisk. This solution is easier if we only have this server running the Asterisk .
Edit the file / etc/apache2/envvars and change the user asterisk.
# export
 APACHE_RUN_USER = www-data # export 
APACHE_RUN_GROUP = www-data export

export APACHE_RUN_USER = asterisk asterisk APACHE_RUN_GROUP =
If you change the method 1 to 2, files are a different user name and there may be missed. You can delete the session files in / var/lib/php5 or change the owner of the files to asterisk.
3. Restart Apache graceful
 apache2ctl 
To make FOP server is started, I changed the default shell for the user asterisk was set in false :
 usermod-s / bin / bash asterisk 
From what I understood, the default shell for Debian is Deriba Dash, and for this entire deployment is expected as Bash shell.
in / usr / sbin / safe_asterisk changed the variable BACKGROUND was at 0 to 1. This file is modified when we update the FreePBX, carefully! Still do not understand why on CentOS installations made no need to put this value to 1.

Installing FreePBX FreePBX Lower

of http://www.freepbx.org
 cd / tmp wget 
http://mirror.freepbx.org/freepbx-2.5.1.tar.gz
cd / usr / src tar xvfz
/ tmp/freepbx-2.5.1.tar.gz
cd freepbx-2.5.1 I tried also with version 2.6 without problems, I need the 2.7 that just came out. Prepare
database. If your plant has root key for mysql , as required when installed, then you have to add the '-p' in all commands that start with mysql. For example, the first command would be "mysqladmin create asterisk-p." When prompted, put the correct password:
 
mysqladmin create asterisk mysqladmin create asterisk asteriskcdrdb
mysql \u0026lt;SQL / mysql
newinstall.sql asteriskcdrdb \u0026lt;SQL / cdr_mysql_table.sql


mysql GRANT ALL PRIVILEGES ON
asterisk .* TO asteriskuser @ localhost IDENTIFIED BY 'amp109';
asteriskcdrdb GRANT ALL PRIVILEGES ON .* TO asteriskuser @ localhost IDENTIFIED BY 'amp109';
flush privileges;
quit VERY IMPORTANT BEFORE INSTALLING FREEPBX: Make a copy of / etc / asterisk / modules.conf . The FreePBX rewrites the file and breaks the installation of Asterisk. To restart after you install Asterisk FreePBX, Asterisk closes without any message.
 cp / etc / asterisk / modules.conf ~ / asterisk-modules.conf 
Start the installation of FreePBX:
. / Install_amp 
I put the list of questions to answer, the rest may be left with their default values \u200b\u200b
 AMPWEBROOT = / var / www / freepbx 
NOTE: If we FreePBX in a subdirectory, the panel may not function correctly on administrative pages. I turned up the error in FreePBX and corrected, but I do not remember what version.
There are two ways to make it work
1. Fix error
Touch the file / var / www / FreePBX / admin / views / panel.php
 / / where it reads 
/ / '. "
/ / You Should erase one step back in the uri, as it shows here
'. " We
to step 3.
2. Create a virtual server and access to the facility from another direction http://freepbx
If you access the dns , or hosts file your computer can add an entry to identify your Apache server. Edit /etc/apache2/sites-available/freepbx y poner esto.
 ################# Named VirtualHosts 


ServerName freepbx
ServerAlias freepbx

ServerAdmin yourname@yourdomain.com
ErrorLog /var/log/apache2/freepbx.error.log
CustomLog /var/log/apache2/freepbx.access.log combined

DocumentRoot /var/www/freepbx

Options Indexes FollowSymLinks MultiViews
Order allow,deny
AllowOverride All
Allow from all



AuthType Basic
AuthName "Restricted Area" FreePBX-
AuthUserFile passwd Require user admin




################################### We
############################### symbolic link (well, a symlink) to make it available
 ln - s / etc/apache2/sites-available/freepbx / etc/apache2/sites-enabled/099-freepbx 
and add a file if you want access
 htpasswd-c / admin etc/apache2/freepbx-passwd 
3. Restart the Apache
 / etc/init.d/apache2 restart Now 
recover the backup we made
 modules.conf cp ~ / asterisk-modules.conf / etc / asterisk / modules.conf 
If we have forgotten to back up, we can go to / var / cache / apt and looked around the file that comes with the package. Or you can disable the libraries that prevent the asterisk works. To disable a library can add these lines in / etc / asterisk / modules.conf before the global policy.
 noload => app_directory.so 
noload => res_adsi.so
autoload The directive will automatically load whatever is in the libraries directory (/ usr / lib / asterisk / modules) discounting those listed to not be charged. In Ubuntu Hardy Heron, we must also disable
 noload => app_voicemail_imap.so 
noload => app_voicemail_odbc.so
De http://www.voip-info.org/wiki/view/Asterisk+modules
app_directory.so => \u200b\u200b(Extension Directory)
res_adsi.so: Resource for ADSI applications. See http://www.voip-info.org/wiki/view/ADSI
If kept at Apache running as www-data add these lines at the end of / etc / amportal.conf
 AMPASTERISKUSER = www-data 
AMPASTERISKWEBUSER = www-data
AMPASTERISKGROUP = asterisk
To start all this at the very end, add these lines in / etc / rc.local before the exit 0.
 / usr / local / sbin / start 
amportal exit 0
Optional: Asterisk start on their own after the installation packages. If you want to run Asterisk under safe_asterisk and managed by amportal disables the asterisk in this way
 update-rc.d-f remove asterisk 
One more thing important: Amportal Asterisk from the start in safe mode with the command to restart the plant safe_asterisk if the program dies asterisk. Also, set the permissions for the web interface can restart the service, refresh the server PFO or Flash Operator Panel and record the sounds corresponding to the IVR's with the appropriate permissions. Unfortunately, safe mode also makes a program to connect and disconnect constantly, which is very bad for debugging the server.
added a symlink and change the permissions to make the recordings available to the system IVRs or preatendedores and menus.
 ln-s / var / lib / asterisk / sounds / custom / usr / local / share / asterisk / sounds / 
chown-R asterisk: asterisk / usr / local / share / asterisk /
chmod-R 755 / usr / local / share / asterisk /
/ usr / share / asterisk and subdirectories must belong User and group asterisk or faulty in FreePBX about permissions in the abi-bin. We can check the permissions
 $ ls-l / usr / share  is to inspect the file / etc / asterisk / manager.conf or create a file in / etc / asterisk / manager.d / admin.conf and check that permits reading and writing are complete for the user admin read = 
; system, call, log, verbose, command, agent, user, config, Originate, read, write
write = system, call, log, verbose, command, agent, user, config, Originate, read, write
 versions published in English the FreePBX 
Ubuntu and https: / / wiki.edubuntu.org / installingFreepbx
http://www.freepbx.org/trac/wiki/UbuntuServerIntrepid
 also put it in the forums 
http://ubuntu- ky.ubuntuforums.org / showthread.php? p = 8298193
 Steliosv 
Me tiró la pista para que funcione en el 1.6, copio el mensaje que me mandó.

 Re: Installing FreePBX on Intrepid Ibex 

Since i was greatly helped by this post i thought i’d add that if you upgrade to asterisk 1.6 you need to create a new anything.conf file in order for freepbx (2.5.x) to work. i created the file /etc/asterisk/manager.d/admin.conf with the contents
[admin]
secret = password
read = system,call,log,verbose,command,agent,user,config, originate,read,write
write = system,call,log,verbose,command,agent,user,config, originate,read,write for googling reference this fixes the error in / var / log / asterisk / messages
manager.c: 127.0.0.1 tried to authenticate with nonexistent user 'admin'
and manager.c: 127.0.0.1 failed to authenticate as 'admin' And Then Following this link helped me figure out the problem.

http://www.n3ncy.com/UNIX/Debian/Asterisk-1.6x.htm



0 comments:

Post a Comment