Koozali.org: home of the SME Server

Can I add res_jabber.so ?

Offline soprom

  • *
  • 589
  • +0/-0
    • www.logiciel-libre.org
Can I add res_jabber.so ?
« on: June 14, 2009, 04:46:24 PM »

Is there a way to add Jabber ressources to selintra?
Sophie from Montréal

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Can I add res_jabber.so ?
« Reply #1 on: June 14, 2009, 07:18:41 PM »
res_jabber isn't present in the ATrpms donwload.  However, there is nothing to stop you adding the module if you can grab a copy from somewhere else.  It will need to be saved in /usr/lib/asterisk/modules/.

You should then be able to jabber away using custom apps, just like you did with your howler application.  You will, of course, need a Jabber server to connect to.  It isn't something we've done but it doesn't look too difficult.  Does anyone else want to get involved in this?

Kind Regards

S

Offline soprom

  • *
  • 589
  • +0/-0
    • www.logiciel-libre.org
Re: Can I add res_jabber.so ?
« Reply #2 on: June 14, 2009, 08:58:38 PM »
My setup has selintra and ejabberd on the same host (ejabberd is from contribs).

That's my definition of "unified communications" !!!!

I got myself res_jabber from a couple if RPM's, but it seems that "libiksemel.so.3" is needed.
Code: [Select]
yum install iksemel --enablerepo=smecontribs
Finally I can't get one for the current version on Centos 4:
Code: [Select]
pbx*CLI> module load res_jabber.so

[Jun 14 15:10:45] WARNING[6821]: loader.c:614 inspect_module: Module 'res_jabber.so' was not compiled with the same compile-time options as this version of Asterisk.
[Jun 14 15:10:45] WARNING[6821]: loader.c:615 inspect_module: Module 'res_jabber.so' will not be initialized as it may cause instability.
[Jun 14 15:10:45] WARNING[6821]: loader.c:653 load_resource: Module 'res_jabber.so' could not be loaded.

No idea as to where to find such a file or for asterisk-jabber...

My custom app is all ready. I'll post it when I will get jabber to work.
« Last Edit: June 14, 2009, 09:14:50 PM by soprom »
Sophie from Montréal

Offline PWDasterisk

  • ***
  • 56
  • +0/-0
Re: Can I add res_jabber.so ?
« Reply #3 on: June 15, 2009, 02:16:24 PM »
Sophie -

you can manually compile asterisk and copy the jabber resource module:

rpm -q iksemel           ;jabber requires iksemel so make sure it is installed first
rpm -q ncurses-devel  ;menuselect requires ncurses-devel so make sure it is installed first

cd /usr/src  ;or whaterever directory you use for installs
asterisk -V  ;find out what asterisk version you are running
wget http://downloads.digium.com/pub/asterisk/releases/asterisk-1.X.XX.X.tar.gz  ;where X.XX.X=version you use
tar -zxvf asterisk-1.X.XX.X                                                                           ;where X.XX.X=version you use
cd /usr/src/asterisk-1.X.XX.X                                                                        ;where X.XX.X=version you use
make clean       ;optionally use when rebuilding is required
./configure
make menuselect  ;select all relevant options (jabber is in Resource Modules)
make
cp res/res_jabber.so /usr/lib/asterisk/modules

if at first you don't succeed then keep on reading until you do succeed...

Offline soprom

  • *
  • 589
  • +0/-0
    • www.logiciel-libre.org
Re: Can I add res_jabber.so ?
« Reply #4 on: June 15, 2009, 03:03:51 PM »
Thanks for this procedure.

I added
yum install ncurses-devel
yum install gcc
 
asterisk -V returns  1.4.25.1, which is ok.



I run into a problem with ./configure :

Code: [Select]
configure: error: in `/usr/src/asterisk-1.4.25.1':
configure: error: C++ preprocessor "/lib/cpp" fails sanity check

The log has this:
Code: [Select]
configure:6059: /lib/cpp  conftest.cpp
cpp: installation problem, cannot exec `cc1plus': No such file or directory
configure:6066: $? = 1
configure: failed program was:
| /* confdefs.h.  */

All the errors are about "cannot exec `cc1plus'". I had to add:
Code: [Select]
yum install gcc-c++
Then, jabber is not enabled in the menu. It's there, but disabled.

From this page, http://www.voip-info.org/wiki/view/Asterisk+Speaks+with+Google+Talk I would believe that more sources are needed (iksemel).



« Last Edit: June 15, 2009, 03:29:53 PM by soprom »
Sophie from Montréal

Offline PWDasterisk

  • ***
  • 56
  • +0/-0
Re: Can I add res_jabber.so ?
« Reply #5 on: June 15, 2009, 03:29:58 PM »
;you're not setup to build/compile packages you need to check/install:

rpm -q gcc                    ;C compiler
rpm -q gcc-c++             ;C++ compiler
rpm -q make                  ;make/build program
rpm -q libtermcap-devel  ;asterisk dependency
rpm -q zlib-devel            ;might be needed for some options

;I previously mentioned the jabber dependency on iksemel
« Last Edit: June 15, 2009, 03:35:19 PM by PWDasterisk »
if at first you don't succeed then keep on reading until you do succeed...

Offline soprom

  • *
  • 589
  • +0/-0
    • www.logiciel-libre.org
Re: Can I add res_jabber.so ?
« Reply #6 on: June 15, 2009, 03:37:06 PM »

Thanks, but still a no-go!

menu selection  shows res_jabber disabled with this footnote:
Code: [Select]
AJI - Asterisk Jabber Interface
Depends on: iksemel(E)
Can use: gnutls(E)

Sophie from Montréal

Offline PWDasterisk

  • ***
  • 56
  • +0/-0
Re: Can I add res_jabber.so ?
« Reply #7 on: June 15, 2009, 03:49:38 PM »
;I stated in my first reply iksemel must be installed before the asterisk compile
;if you didn't do this first go back and

make clean
./configure
make menuselect  ;and see if the jabber option is available now
if at first you don't succeed then keep on reading until you do succeed...

Offline soprom

  • *
  • 589
  • +0/-0
    • www.logiciel-libre.org
Re: Can I add res_jabber.so ?
« Reply #8 on: June 15, 2009, 03:53:15 PM »
iksemel was already installed from my previous attemps...
(it was mentionned at the beginning of this thread)
« Last Edit: June 15, 2009, 03:55:04 PM by soprom »
Sophie from Montréal

Offline soprom

  • *
  • 589
  • +0/-0
    • www.logiciel-libre.org
Re: Can I add res_jabber.so ?
« Reply #9 on: June 15, 2009, 04:15:07 PM »
I read that iksemel must be compiled with option: configure --with-gnutls

As I installed it from rpm, it might be the problem. I don't have the skill to investigate that.
Sophie from Montréal

Offline PWDasterisk

  • ***
  • 56
  • +0/-0
Re: Can I add res_jabber.so ?
« Reply #10 on: June 15, 2009, 04:24:00 PM »
I have installed:
iksemel-1.3.1
iksemel-devel-1.3.1
gnutls-1.0.20-4 0

running:
asterisk-1.4.22.2
« Last Edit: June 15, 2009, 04:26:39 PM by PWDasterisk »
if at first you don't succeed then keep on reading until you do succeed...

Offline soprom

  • *
  • 589
  • +0/-0
    • www.logiciel-libre.org
Re: Can I add res_jabber.so ?
« Reply #11 on: June 15, 2009, 04:58:08 PM »

I get these:

iksemel-1.2-13.el4
iksemel-devel n'est pas installé
gnutls-1.0.20-4.el4_6
asterisk-1.4.25.1-78.el4

Sophie from Montréal

Offline PWDasterisk

  • ***
  • 56
  • +0/-0
Re: Can I add res_jabber.so ?
« Reply #12 on: June 15, 2009, 05:18:36 PM »
I just downloaded asterisk-1.4.25.1, issued ./configure, make meuselect (jabber was available) then make... no issues.

You should investigate the dependencies issues on your machine for future reference... I have uploaded the asterisk-1.4.25.1 res_jabber.so to http://www.dannolfo.net =>the file link is on the lower left between the *********

NOTE that this was built on a 2.6.9.78.0.22.EL kernel so it may or may not work for you.

« Last Edit: June 15, 2009, 05:25:29 PM by PWDasterisk »
if at first you don't succeed then keep on reading until you do succeed...

Offline soprom

  • *
  • 589
  • +0/-0
    • www.logiciel-libre.org
Re: Can I add res_jabber.so ?
« Reply #13 on: June 15, 2009, 05:20:13 PM »
I looks good now:

add DAG repo (http://wiki.contribs.org/Dag)

Code: [Select]
signal-event yum-modify
yum install iksemel-devel-1.3 --enablerepo=dag
yum install gcc gcc-c++ libtermcap-devel zlib-devel ncurses-devel
cd /usr/src
wget http://downloads.digium.com/pub/asterisk/releases/asterisk-1.4.25.1.tar.gz

tar -zxvf asterisk-1.4.25.1
cd /usr/src/asterisk-1.4.25.1
make clean
./configure
make menuselect
make
cp res/res_jabber.so /usr/lib/asterisk/modules

yum remove gcc gcc-c++ libtermcap-devel zlib-devel ncurses-devel iksemel-devel


I'll get back to my custom app...

Many thanks to you PWDasterisk for your kind assistance.

Sophie from Montréal

Offline soprom

  • *
  • 589
  • +0/-0
    • www.logiciel-libre.org
Re: Can I add res_jabber.so ?
« Reply #14 on: June 16, 2009, 05:10:16 AM »

res_jabber loads but asterisk can't connect:

Code: [Select]
res_jabber.c:1573 aji_recv_loop: JABBER: socket read error
This might be related to compilation options of iksemel which should be compiled along with res_jabber. Many posts on the web discuss this issue.

Probably:
Quote
I read that iksemel must be compiled with option: configure --with-gnutls

I don't have the skill to debug this, so let's edit
/etc/asterisk/modules.conf

with
Code: [Select]
noload => res_jabber.so
Sophie from Montréal