Jabber-Jingle-Asterisk 1.4

mr.001

Neuer User
Mitglied seit
15 Jul 2004
Beiträge
44
Punkte für Reaktionen
0
Punkte
0
Hallo,

kann Jemand mir sagen was bei Asterisk 1.4 die Jingle Unterstützung genau heisst?
Kann ich mich mit einem Jabber Klient an Asterisk so anmelden, so wie mit IAX Klient?
 
Das ding heißt chan_gtalk. Den weiß ich leider auch nicht, würde mich allerdings interessieren wie das genau funktioniert.
 
Edit Guard-X: Zitiert...
Code:
Google GTalk and Asterisk PBX Integration Tutorial
Posted on July 19th, 2007 by admin

Starting with Asterisk 1.4, you can connect Asterisk and Google Talk, however as of noTuw (Asterisk 1.4.4) you should consider this feature to be in beta phase, there are still quite a number of problems and glitches around. You may want to create a new gmail account for use with Asterisk; note that for gmail you need an invitation, whereas for a pure gtalk account you don’t. Jabber/Gtalk depends on iksemel so make sure you have that installed and that the jabber/jingle/gtalk channel drivers are selected (run ‘make menuselect’ to verify this) before compiling Asterisk 1.4
Iksemel installation

First you will need to download and install iksemel 1.2:
Installation from source

Due to the recent problems, svn repository is moved away from jabberstudio.org.
To run autogen.sh you must have several packages, it will prompt you for the packages except for libgnutls-dev if you don’t have this it will generate an error message in configure.

svn checkout [url]http://svn.uludag.org.tr/projeler/iksemel[/url] iksemel

cd iksemel
./autogen.sh
./configure –prefix=/usr
make
make check
make install

If the above didn’t work for you, try this too if you have gnutls installed:

cd iksemel
./configure –with-gnutls
make
make check
make install

Debian

Debian 3.1 Sarge

The iksemel deb package will most probably not work out (you see ‘JABBER: socket read error’ and ‘jabber show connected’ always shows your gtalk user as ‘disconnected’), so you will need to compile from source (see above)

   1. autogen.sh will complain about AM_PATH_LIBGNUTLS (and ./configure will subsequently fail) if you don’t have libgnutls11-dev, so apt-get that first
   2. edit /etc/ld.so.conf and add /usr/local/lib to it, then run ‘ldconfig’

Debian 4.0 Etch

The iksemel package appears to do the job, at least with usetls=on in jabber.conf (as required by the server talk.google.com)

Troubleshooting

Q: I see these error message in the CLI, what is wrong? “res_jabber.c:1504 aji_recv_loop: JABBER: socket read error” and “res_jabber.c:482 aji_act_hook: gnuTLS not installed.”

A1: I had installed iksemel (XML parsing library for Jabber) from an rpm package, and i guess it had been compiled without GNUTLS being included. i wrote a test program calling a gnutls function call and it failed. So I downloaded iksemel source, compiled it and ran the same test program again, and this time it returned the int value from the function call that i was expecting. Now, “jabber show connected” shows the google talk account as connected.

A2: I was getting a similar problem on ubuntu. It keep saying GnuTLS not installed. After much debugging, we checked the config.log for iksemel-1.2 and observed that the following:
checking for libgnutls-config
checking for libgnutls - version >= 0.1.0
were failing. The fix was to download the source for libgnuTLS and issue a recompile

A3: This works for me, during iksemel source compilation, specify the –with-gnutls option in ./configure.

./configure –with-gnutls
make
make check
make install

Example setup

jabber.conf

This is where you set your gmail/gtalk account info and will register you with the google server.

[general]
debug=yes
autoprune=no
autoregister=no

[gtalk_account]
type=client
serverhost=talk.google.com
[email protected]/Talk
secret=*****
port=5222
usetls=yes ; TLS is required by talk.google.com, you’ll get a ’socket read error’ without
usesasl=yes
[email protected]
statusmessage=”This is an Asterisk server”
timeout=100

gtalk.conf

This is where the settings for the actual calls are made:

[general]
context=google-in
allowguest=yes

;
[guest]
disallow=all
allow=ulaw
context=google-in

[buddy]
[email protected]
disallow=all
allow=ulaw
context=google-in ;order apparently matters, needs to be placed after username= ?
connection=gtalk_account

extensions.conf

…
[google-in]
exten => s,1,NoOp( Call from Gtalk )
exten => s,n,Set(CALLERID(name)=”From Google Talk”)
exten => s,n,Dial(SIP/my_sip_phones)
…

[google-out]
exten => 200,1,Dial(gtalk/gtalk_account/[email protected])

Tips

Ports for signalling and RTP

Just like SIP also gtalk (jingle) uses UDP for the media path (=audio), so you’ll need to make sure your firewall is configured accordingly. The settings in rtp.conf also apply to gtalk. The gtalk/jingle signalling defaults to port 5222 tcp (how about TLS?).
Receiving text messages

Once you have established a gtalk call it is also possible to receive instant messages - as long as the other channel supports SendText(). If, for example, a Google Talk client calls a SNOM 360 via SIP and then sends a text message, that message will cause the SNOM’s message LED to start blinking, and the user can read the message by pressing the Retrieve key.
For enhanced text receiving features see patch 8659.
Caller ID handling

The callerID is not properly set when calling from a Jingle client (GoogleTalk, Jabbin, ..) to an extension (SIP, PSTN, ..) handled by Asterisk. A bug report has been registered here, along with a fix : bug 8536. Alternatively, a dialplan workaround is given hereafter.

To set callerID to the gtalk caller, I found this; it doesn’t make too much sense because the channel ID number is transmitted as if it were a valid phone number, but at least it looks somewhat nice:

set(CALLERID(all)=”${CUT(CHANNEL,,1)}<${CUT(CHANNEL,,2)}>”)
Want to permanently stop jabber and gtalk?

Thats simple, edit /etc/asterisk/modules.conf and add:

noload => res_jabber.so
noload => chan_gtalk.so
Useful CLI commands

    * jabber show connected
    * jabber debug on
    * jabber test (needs the user ‘asterisk’ defined in jabber.conf)
    * jabber reload
    * gtalk show channels
    * gtalk reload
    * stun debug on

Documentation

    * see doc/jabber.txt and doc/jingle.txt in your Asterisk source directory
    * see configs/jabber.conf.sample and configs/jabber.conf.sample in your Asterisk source directory

Habe ich hier gefunden ... http://vxml.homeip.net/googleasterisk/?p=3
Vielleicht hilft euch das weiter
 
Kostenlos!

Statistik des Forums

Themen
248,916
Beiträge
2,304,992
Mitglieder
378,631
Neuestes Mitglied
realprogrammer