Tzah 2.0


How to run Freeswitch mod_dingaling on windows

We recently began to explore Freeswitch. This is a powerful telephony platform that provides many communication functionalities with  agile configuration. Amongst others, we looked at the dingaling implementation which enables communications with GoogleTalk using XMPP implementation. We quickly found out there’re a few steps to complete before the code will run on Windows/VS environment. So, instead of having others struggle like we did, here’s a list of the required steps. Have fun.

  1. Configuration
    1. Enable mod_dingaling by un-commenting on modules.conf.xml the line . Alternatively, you can run on the console load mod_dingaling.
    2. Enable debug mode for the module (dingaling.conf.xml). It’s not required but will helps in understanding what’s going on.
    3. Create jingle-profile like the one below: 
      <include>
        
        <profile type="client">
          <param name="name" value="<meaningful name>"/>
          <param name="login" value="<your username>/gtalk"/>
          <param name="password" value="<your password>"/>
          <param name="server" value="talk.google.com"/>
          <param name="dialplan" value="XML"/>
          <param name="context" value="public"/>
          <param name="message" value="Send help or ? to learn more"/>
          <param name="rtp-ip" value="$${bind_server_ip}"/>
          <param name="ext-rtp-ip" value="$${external_rtp_ip}"/>
          <param name="auto-login" value="true"/>
          
          <param name="sasl" value="plain"/>
          
          <param name="tls" value="true"/>
          
          <param name="use-rtp-timer" value="true"/>
          
          <param name="exten" value="1000"/>
          <param name="vad" value="both"/>
        profile>
      include>
      

  2. TLS. You need this to insure your XMPP stanzas are encrypted as required by the specifications. There’re few steps you need to do on windows:

    1. Install GnuTls for windows. Pick the latest exe file. At time of writing, the last one is 2.7.3.
    2. Assuming you’re using visual studio as your IDE, open visual studio command prompt (not your normal console) and type: cl foo.c -I../include -Dssize_t=long libgnutls-26.lib. This will create a libgnutls-26.lib that can be used as a import library for Visual Studio projects.
  3. Configure library ixemel to work with TL S libraries:

    1. Add additional include directory

         addInclude
    2. Add additional dependency. 
         addDependency
  4. Last step, 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 /Debug:

    • libgcrypt-11.dll
    • libgnutls-26.dll
    • libgnutls-extra-26.dll
    • libgnutls-openssl-26.dll
    • libgpg-error-0.dll
    • libtasn1-3.dll

    A post-build event should take care of it:

    xcopy "$(SolutionDir)GnuTLS-2.7.3\bin\*.dll" "$(SolutionDir)$(OutDir)\" /C /D /Y /S /F

  5. I-can’t-find-config.h-step. Copy it from \libs\win32\iksemel. Make sure the follwing line is not commented:

    #define HAVE_GNUTLS 
  6. Questions?

Leave a Reply

Jajah is the VoIP player that brought you web-activated telephony.