Koozali.org: home of the SME Server

SME8.0B5 atrpms asterisk rpm install HOWTO

Offline ldkeen

  • *
  • 403
  • +0/-0
SME8.0B5 atrpms asterisk rpm install HOWTO
« on: March 16, 2010, 09:46:20 PM »
I've just setup a test system running the latest smeserver 8.0B5 with an ATRPMS rpm install of asterisk/dahdi and the latest SAIL. Here's a quick and dirty HOWTO:

Clean install SME 8.0B5

setup atrpms
/sbin/e-smith/db yum_repositories set atrpms repository \
Name 'atrpms - EL5' \
BaseURL 'http://dl.atrpms.net/el5-$basearch/atrpms/stable' \
EnableGroups no \
GPGCheck yes \
GPGKey http://ATrpms.net/RPM-GPG-KEY.atrpms \
Visible no \
Exclude clamav,spamassassin,libselinux,perl-HTML-Parser,lm_sensors,\
perl-IO-stringy,perl-XML-Parser,razor-agents,libgcrypt,rpm-python,\
libxml2,zlib,gnupg,libxml2-python,yum,module-init-tools,rpm,gettext,\
librpm4,glib2,perl-libwww-perl,perl-Convert-ASN1,beecrypt,fetchmail,\
libacl,libtool-ltdl,popt,libgpg-error,freetype,perl-MIME-tools,mutt,\
status disabled

signal-event yum-modify

Install speex (testing)

wget ftp://ftp.pbone.net/mirror/atrpms.net/el5-i386/atrpms/testing/speex-1.2-0.11.rc1.el5.i386.rpm

yum localinstall speex-1.2-0.11.rc1.el5.i386.rpm

yum --enablerepo=atrpms install asterisk14 asterisk-addons14

yum --enablerepo=atrpms install dahdi-linux dahdi-linux-kmdl-`uname -r`

wget http://sarkpbx.com/sail/sail-2.4.1/sail-2.4.1-10.noarch.rpm

wget http://sarkpbx.com/sail/sail-2.4.1/perl-File-ReadBackwards-1.04-1.2.el4.rf.noarch.rpm

yum localinstall perl-File-ReadBackwards-1.04-1.2.el4.rf.noarch.rpm sail-2.4.1-10.noarch.rpm

**Hack to install dahdi-tools (file /etc/dahdi/genconf_parameters from install of sail-2.4.1-10.noarch conflicts with file from package dahdi-tools-2.2.1-64.el5.i386)

rpm -e sail

yum --enablerepo=atrpms install dahdi-tools

rpm -ivh --force sail-2.4.1-10.noarch.rpm

Asterisk seems to be looking in /usr/share/asterisk/agi-bin for the AGI so create a symlink
ln -s /var/lib/asterisk/agi-bin/selintra /usr/share/asterisk/agi-bin/selintra

signal-event post-upgrade

signal-reboot

Code: [Select]
[root@test ~]# uname -a
Linux test 2.6.18-164.11.1.el5 #1 SMP Wed Jan 20 07:39:04 EST 2010 i686 i686 i386 GNU/Linux
[root@test ~]# rpm -q asterisk14 sail dahdi-linux dahdi-linux-kmdl-`uname -r`
dahdi-linux-kmdl-2.6.18-164.11.1.el5-2.2.1-66.el5
asterisk14-1.4.29-89.el5
sail-2.4.1-10
dahdi-linux-2.2.1-66.el5

Test Call
[root@test ~]# asterisk -rvvvvv
Asterisk 1.4.29, Copyright (C) 1999 - 2009 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
  == Parsing '/etc/asterisk/asterisk.conf': Found
  == Parsing '/etc/asterisk/extconfig.conf': Found
Connected to Asterisk 1.4.29 currently running on test (pid = 4692)
Verbosity is at least 5
    -- Executing [042523xxxx@internal:1] AGI("SIP/5000-00000006", "selintra|OutCluster|042523xxxx") in new stack
    -- Launched AGI Script /usr/share/asterisk/agi-bin/selintra
    -- AGI Script selintra completed, returning 0
    -- Executing [042523xxxx@qrxvtmny:1] AGI("SIP/5000-00000006", "selintra|OutRoute|Local Calls") in new stack
    -- Launched AGI Script /usr/share/asterisk/agi-bin/selintra
    -- AGI Script Executing Application: (Dial) Options: (SIP/042523xxxx@029834xxxx||)
    -- Called 042523xxxx@029834xxxx
    -- SIP/029834xxxx-00000007 is making progress passing it to SIP/5000-00000006
  == Spawn extension (qrxvtmny, 042523xxxx, 1) exited non-zero on 'SIP/5000-00000006'
    -- Executing [h@qrxvtmny:1] Hangup("SIP/5000-00000006", "") in new stack
  == Spawn extension (qrxvtmny, h, 1) exited non-zero on 'SIP/5000-00000006'
test*CLI>

Also I got an error:
[Mar 17 07:15:47] WARNING[4729]: chan_sip.c:17424 set_insecure_flags: Unknown insecure mode 'port.invite' on line 69

So I had to change a line in the trunk definition from:

insecure=port.invite
TO
insecure=port,invite

Regards, Lloyd
« Last Edit: March 16, 2010, 09:51:51 PM by ldkeen »

Offline SARK devs

  • ****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: SME8.0B5 atrpms asterisk rpm install HOWTO
« Reply #1 on: March 17, 2010, 10:06:49 AM »
Good work Lloyd

Couple of things...

The agi location is set in /etc/asterisk/asterisk.conf and they've changed the default.   You can reset it as follows...

astagidir => /var/lib/asterisk/agi-bin

we'll look at removing genconf_parameters (shouldn't be there anyway)

which trunk had the incorrect port,invite parameter? 

Best

Jeff





Offline ldkeen

  • *
  • 403
  • +0/-0
Re: SME8.0B5 atrpms asterisk rpm install HOWTO
« Reply #2 on: March 17, 2010, 11:31:38 AM »
Hey Jeff
Quote
You can reset it as follows...

astagidir => /var/lib/asterisk/agi-bin
OK Ta
Quote
which trunk had the incorrect port,invite parameter? 
It was generalSIP. I couldn't remember how to create a new carrier definition for Exetel so I just chose generalSIP
Many Thanks, Lloyd

Offline SARK devs

  • ****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: SME8.0B5 atrpms asterisk rpm install HOWTO
« Reply #3 on: March 25, 2010, 11:08:17 PM »
Hi Lloyd,

Been using your script to test a custom CentOS5 .iso we've built and I noticed one more small error in your ATRPMS set up...

Code: [Select]
libacl,libtool-ltdl,popt,libgpg-error,freetype,perl-MIME-tools,mutt,\
status disabled

There should not be a comma after mutt

Otherwise this is an excellent howto - works very well.

Oh - btw - I've cut sail-2.4.1-11 to fix the dahdi-tools conflict you found.

Lastly, sme has changed something in the way it processes URIs in SME8.  The upshot is, if you turn on the dynamic proxy facility (in globals panel) you will no longer be able to access the server-manager.

Short term fix....

Don't turn it on.

;)

Seriously, if you do turn it on and get into trouble do

Code: [Select]
db selintra-work setprop global PROXY NO
db selintra setprop global PROXY NO
signal-event console-save

Best

Jeff


Offline SARK devs

  • ****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: SME8.0B5 atrpms asterisk rpm install HOWTO
« Reply #4 on: March 26, 2010, 10:49:48 PM »
Hi Lloyd

2.4.1-12 seems to cut it on el5/C5 codebase.  We've fixed the dynamic proxy mod_rewrite code (which makes my brain hurt when I try to understand it) and tidied up a few other greenies.  Looks about right for an early attempt.  It's up on the server.

Best

Jeff

Offline SARK devs

  • ****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: SME8.0B5 atrpms asterisk rpm install HOWTO
« Reply #5 on: April 01, 2010, 10:34:00 PM »
2.5.1-2 - up on the website (in a new folder; sail-2.5.1) - it will only run with C5 & Asterisk 1.4.29 or better.

Runs natively on C5/SME8 and expects the AGI to be in /usr/share so you don't need to create any links or change /etc/asterisk/asterisk.conf.  Proxying works good too.

Best

S

Offline ldkeen

  • *
  • 403
  • +0/-0
Re: SME8.0B5 atrpms asterisk rpm install HOWTO
« Reply #6 on: April 01, 2010, 11:25:42 PM »
SWEET, I might have a crack at the upgrade on my home server over the weekend. What can go wrong right?  :-D
Lloyd

Offline compsos

  • *
  • 472
  • +0/-0
Re: SME8.0B5 atrpms asterisk rpm install HOWTO
« Reply #7 on: April 11, 2010, 08:35:43 AM »
Just tried the new package but it did not install with asterisk14-core-1.4.29-1_centos5.

Quote
sail-2.5.1-2.noarch from /sail-2.5.1-2.noarch has depsolving problems
  --> Missing Dependency: asterisk14 >= 1.4.29 is needed by package sail-2.5.1-2.noarch (/sail-2.5.1-2.noarch)
Error: Missing Dependency: asterisk14 >= 1.4.29 is needed by package sail-2.5.1-2.noarch (/sail-2.5.1-2.noarch)

Is it due to the "asterisk14-core" rather than "asterisk14"?
Regards

Gordon............

Offline SARK devs

  • ****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: SME8.0B5 atrpms asterisk rpm install HOWTO
« Reply #8 on: April 12, 2010, 02:33:24 PM »
HI Gordon,

I'm not sure but I don't think so.  Here is what we have installed on our SME8 image

Code: [Select]
[root@sme8 ~]# rpm -qa | grep asterisk
asterisk-moh-opsound-wav-2.03-56
asterisk-core-sounds-en-gsm-1.4.17-60
asterisk14-misdn-1.4.29-89.el5
asterisk14-1.4.29-89.el5

This is pretty much using Lloyd's Howto (above).  I'm not sure what asterisk14-core is/does.  If you look in the Asterisk CentOS repo (http://packages.asterisk.org/centos/5/current/i386/RPMS/) you can see that it exists, however it doesn't exist in the ATrpms Asterisk14 repo (which is what Lloyd used). 

Very confusing.  I guess you have to use one repo or the other.  The SAIL rpm simply has a dependency check for Asterisk14 >= 1.4.29.  SAIL itself doesn't much care what Asterisk you have so as long as you are happy that your Asterisk image is good then you can just rpm install it with --nodeps.  Let me know how you get on.


Best

S