Mod dingaling

From FreeSWITCH Wiki

(Redirected from Dingaling)
Jump to: navigation, search

This module is used to implement support for the jingle protocol (google talk).

Jingle is an extension to the Jabber/XMPP protocol, to allow for peer-to-peer (p2p) signalling for multimedia interactions such as voice or video. It was designed by Google and the XMPP Standards Foundation. The multimedia content itself can be delivered using the Real-time Transport Protocol, with Interactive Connectivity Establishment (ICE) for NAT traversal.

More information about Jingle can be found here: Wikipedia Jingle Protocol

Contents

Getting it working

Build Module

Make sure the following line is present and uncommented in /usr/src/freeswitch/modules.conf

endpoints/mod_dingaling

And rebuild FreeSWITCH™ if necessary.

TLS

TLS is required to insure your XMPP stanzas are encrypted as required by the specifications. Before running, make sure you have gnutls package installed.

CentOS 5.x

yum install gnutls-devel gnutls

Windows using MSVC 2008

  • Install GnuTls for windows.
  • 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.
  • 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

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)"/>
   <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"/>
 </profile>

You may also want to enable debug mod in Dingaling.conf.xml. This will enable you to see XMPP messages.

Reference

Variables

mod_dingaling sets the following variables:

 variable_dl_from_user: accessed as 'dl_from_user' using the getVariable API call
 variable_dl_from_host: accessed as 'dl_from_host' using the getVariable API call
  Lua Example:
  freeswitch.consoleLog("info", "Receiving call from " .. session:getVariable('dl_from_user') .. " at the domain " .. session:getVariable('dl_from_host') .. "\n") 


Events

CUSTOM events;

 dingaling::login_success
 dingaling::login_failure
 dingaling::connected

FAQ

What is Component (server to server) mode?

Component mode means you can log in as a server component so you can get all of the messages for the whole domain, allowing you to use any random user id at the given domain.

How do I call the FreeSWITCH conference?

  • Add a new buddy to your buddy list: conf+888@conference.freeswitch.org
  • Click the entry and choose Call

Why do I get messed up sound when I try to connect Google Talk to echo or delay_echo?

This will happen when FreeSWITCH is configured to use speex with Dingaling.

There is a bug in the current version of Google Talk (1.0.0.104) that causes it to send G.711 PCMU instead of speex audio even though it signals that speex is accepted and will be used. Many softphones are able to deal with this, but it happens so that Google Talk itself is not! It will expect speex, but will receive it's own G.711 PCMU data back causing it to produce messy sounds (and even crash after a while in some cases).

To use echo or delay_echo you should use G.711 PCMU. Versions down to 1.0.0.96 are verified to have this bug too.

How do I send DTMF with Googletalk?

The Gtalk client does not support sending DTMF codes. As a workaround, DTMF from within GTtalk can be sent by sending a chat message and prefixing the DTMF code with a '+' sign.

So to send *1, enter +*1 in the messaging box

Troubleshooting

The FreeSWITCH conference does not respond to my invites?

If you use Google Apps for your email domain hosting, and you are logging in with an email address from this domain, it may not work unless you enable S2S properly using the information provided in the URL below:

http://www.google.com/support/a/bin/answer.py?answer=34143

FreeSWITCH and Google Talk can't get connected to each other after a successful ringing and answering

It appears that there are some localised versions of Google Talk that are very old even though they report to be version 1.0.0.105. Those versions do not even support Speex yet and also lack other features found in the latest version. These versions also do not connect to FreeSWITCH. To see if you are dealing with a problem caused by an old version of Google Talk, please test everything with the latest English version! If you still have problems, there is something else going on.

Known localisations to have this problem: Dutch, Russian

See Also: dingaling.conf.xml

Personal tools
Community
Support FreeSWITCH