mod_dingaling
About
mod_dingaling is a generic xmpp registration that can be used for Google talk or any other XMPP integration.
More information about Jingle can be found here: Wikipedia Jingle Protocol
As of 2022.08.29 mod_dingaling was removed from FreeSWITCH tree and placed in https://github.com/freeswitch
It has been announced that Google Voice over xmpp service, which is a dependency of several of the below examples, will be discontinued on May 15th, 2014. Keep that in mind when planning any deployments using GV.
Getting it working
OpenSSL
OpenSSL is required to ensure that your XMPP stanzas are encrypted as required by the specifications. Before running, make sure you have the ssl package installed.
CentOS 5.x
yum install openssl-devel
Ubuntu 10.x / Debian
sudo apt-get install libssl-dev
Build Module
Make sure the following line is present and uncommented in /usr/src/freeswitch/modules.conf
endpoints/mod_dingaling
Then build and install mod_dingaling:
make mod_dingaling-install
For freeBSD, use gmake.
If you have installed SSL after building the dingaling module, you will need to re-bootstrap, re-configure and re-build freeswitch.
Run 'fs_cli'.
load mod_dingaling
Windows using MSVC 2008
- Since October 17,2011 this is no longer needed now OpenSSL is used. Mod_dingaling will now build with ssl out of the box.
- Install GnuTls for windows. Take gnutls-2.9.9.exe, maybe more recent will work.
- Build libgnutls-26.lib. This file will be used as a import library for Visual Studio projects. Open visual studio command prompt (not your normal console) and type in GnuTls bin folder:
lib /def:libgnutls-26.def
- Configure ixemel library to work with TLS library. Example
- Add additional include directory.
- Add additional dependency
- If you have problems with the iksemel compilation process try:
- for "syntax error: type" because of va_arg: include <starg.h> in config.h
- for ENOENT errors: include <errno.h> - now found that the reason was config.h in libs/win32/iksemel was not included - to be checked
- for ssize_t errors: add typedef long ssize_t in gnutls.h
- If you have problems linking iksemel.lib because of strcasecmp errors, add the following in iksemel/utility.c
- #define strcasecmp(s1, s2) stricmp(s1, s2)
- #define strncasecmp(s1, s2, n) strnicmp(s1, s2, n)
- Make sure the TLS dlls are copied to the configuration environment. For example, if you’re running on debug mode, you should have the following files in <your freeswitch root>/Debug:
- libgcrypt-11.dll
- libgnutls-26.dll
- libgnutls-extra-26.dll
- libgnutls-openssl-26.dll
- libgpg-error-0.dll
- libtasn1-3.dll
Enable Module
Uncomment the following in Modules.conf.xml.
<load module="mod_dingaling"/>
Sample Configuration (Google)
Settings similar to the following should work for A basic gtalk account:
<profile type="client">
<param name="name" value="gmail.com"/>
<param name="login" value="MyUserName@gmail.com/gtalk"/>
<param name="password" value="myPassWord"/>
<param name="server" value="talk.google.com"/>
<param name="dialplan" value="XML"/>
<param name="message" value="FreeSwitch (The Future of Telephony)"/> <!-- You must specify a message for the profile to be valid -->
<param name="rtp-ip" value="auto"/>
<!-- if you are behind NAT, you should probably use STUN -->
<param name="ext-rtp-ip" value="$${external_rtp_ip}"/>
<param name="auto-login" value="true"/>
<param name="auto-reply" value="Press *Call* to join my conference"/>
<param name="sasl" value="plain"/>
<param name="tls" value="true"/>
<param name="use-rtp-timer" value="true"/>
<param name="exten" value="1000"/> <!-- The extension you want a call in to connect to -->
</profile>
You may also want to enable debug mode in Dingaling.conf.xml. This will enable you to see XMPP messages.