Installing sipX on Debian
From SIPfoundry sipXecs IP PBX, The Open Source SIP PBX for Linux - Calivia
Contents |
Setup Debian apt Package Management
See the | list of Debian mirrors and chose one near you. 'contrib' needs to be enabled for ant.
| File: /etc/apt/sources.list |
deb http://mirrors.kernel.org/debian/ stable main contrib deb http://security.debian.org/ stable/updates main contrib deb http://scm.calivia.com/pub/sipx/debian sarge 3.6 |
Note: The Debian build scripts are available from the Calivia repository.
| Code: Update apt repository |
sudo apt-get update |
Optional: Install Sun JRE 1.5
If JRE is not installed here it will be automatically installed when installing sipxpbx. The Sun Java Runtime .deb packages are available from the Calivia Repository. (Manually Install Sun Java (JRE) 1.5)
| Code: Install Sun JRE 1.5 |
sudo apt-get install sun-j2re1.5 |
Install sipX
The required .deb packages are available from the Calivia Repository. All necessary run-time dependencies are installed automatically.
| Code: Install sipX packages |
sudo apt-get install sipxpbx sipxconfig |
Package Configuration
PostgreSQL configuration:
- Accept the default directory for the PostgreSQL database: /var/lib/postgres/data
- Should data be purged: No (default)
- Locale: en_US
- Day/Month: US (pick as you like)
SSL self-signed certificate configuration (libsipxcommserver1):
- Even though all the data is collected to create the certificate, it is not. The new script would hang badly in debconf so I turned it off. See below for manual creation of the certificate. sipXpbx will fail to start at the end of the installation because of this. Check out the CAcert.org page on how to use free certificates from CAcert.org with sipXpbx.
TFTP Server configuration:
- Server started by inetd <yes>
Java configuration (sipxconfig):
- Enter JAVA_PATH. On a stock Debian Sarge with Sun JRE 1.5, this is /usr/lib/j2re1.5-sun
Apache configuration (sipxpbx):
- Apache configuration file: /etc/apache2/httpd.conf - Accept package maintainer's version and answer "Y"
Note: If you see this error "psql: FATAL: IDENT authentication failed for user "postgres"" during setup of sipxconfig, ignore it. This is a bug in the config script.
Configure TFTPD
TFTPD needs to be configured to serve the sipXconfig directory instead of the default one. Edit the inetd configuration and restart inetd.
| File: /etc/inetd.conf |
# change this line tftp dgram udp wait root /usr/sbin/in.tftpd /usr/sbin/in.tftpd -s /var/lib/tftpboot # to this tftp dgram udp wait root /usr/sbin/in.tftpd /usr/sbin/in.tftpd -s /var/sipxdata/configserver/phone/profile/tftproot/ |
| Code: Restart inetd |
/etc/init.d/inetd restart |
Install sipX CallResolver
The CallResolver is the deamon that produces CDR records from the CSE (Call State Events) collected by the sipX proxy and stored in the Postgres database. It is written in Ruby and therefore requires Ruby to be installed.
Installing Ruby and Rubygems
See here http://mongrel.rubyforge.org/docs/debian-sarge.html
apt-get install ruby irb rdoc libopenssl-ruby1.8
wget http://mirrors.kernel.org/debian/pool/main/libg/libgems-ruby/libgems-ruby1.8_0.9.0-2_all.deb wget http://mirrors.kernel.org/debian/pool/main/libg/libgems-ruby/rubygems_0.9.0-2_all.deb dpkg -i libgems-ruby1.8_0.9.0-2_all.deb rubygems_0.9.0-2_all.deb
gem install --no-rdoc activesupport actionpack actionmailer activerecord actionwebservice gem install --no-rdoc postgres-pr gem install --no-rdoc rake rails
Note: gems are installed from RubyForge and therefore the system requires an active network connection for this to succeed.
Installing the CallResolver
Install the sipx call resolver Ruby gem:
apt-get install sipxcallresolver gem install -l /usr/share/sipxpbx/lib/sipxcallresolver-1.0.0.gem
The apt-get command installed the gem into /usr/share/sipxpbx/lib/sipxcallresolver-1.0.0.gem. It still needs to be installed into the Ruby system using the gem install -l command. The install directory for all the gems is /var/lib/gems/1.8/cache.
Debugging: List the gems that are installed on your system:
gem list
Initializing the CallResolver Database
Note: sipxcallresolver.sh is currently broken on Debian.
| Important note: The file sipxcallresolver.sh still needs to be patched and does not work as is. Work in progress.
a) Sed needs to be upgraded to 4.1.5 b) The path to to the callresolver gem is /var/lib/gems/1.8/gems/sipxcallresolver-1.0.0/main.rb |
The following script initializes the SIPXCDR database:
sipxcallresolver.sh --setup
Run sipxcallresolver.sh --configtest to test for proper configuration. CDR recording needs to be enabled first in ConfigServer for configtest to report a properly configured sytem. To do this go to System, General. Call Detail Records and enable CSE logging for proxy and authproxy.
Install the sipXconfig SOAP Interface Agent
The sipXconfig SOAP Web Services interface is written in Ruby. The respective gem needs to be installed manually still:
gem install file-tail gem install -l /usr/share/sipxpbx/lib/sipXconfig-agent-1.0.0.gem
Uninstalling sipX
apt-get remove --purge libsipxport2 apt-get remove --purge postgresql rm -rf /etc/sipxpbx rm -rf /var/sipxdata rm -rf /var/log/sipxpbx rm -rf /var/run/sipxpbx rm -rf /var/lib/postgres/data
