Chapter 26. Tigase and PyMSN-t Transport
Prev |  | Next

# Chapter 26. Tigase and PyMSN-t Transport

Artur Hefczyc <artur.hefczyc@tigase.net> v2.0, June 2014: Reformatted for AsciiDoc. :toc: :numbered: :website: http://tigase.net :Date: 2010-04-06 21:18

Any Jabber server and any transport connect with each other usually through external component protocol (XEP-0114). So all you need to do is to correctly prepare configuration for this protocol on both sides.

Continue reading to learn how to setup Tigase and PyMSN for working together…​

There are a few basic parameters to set for this protocol:

- PORT number - this is standard thing for any TCP/IP connection. Usually the port number should be above 1024 and for PyMSN-t transport it is usually 5347.
- IP address - again, standard thing for any TCP/IP connection. If both applications - Jabber server and transport run on the same machine the IP address should be 127.0.0.1.
- SECRET - this is kind of connection password. Transport connects to the Jabber server and authenticates itself using this password. So no other, unauthorised transport can connect to the Jabber server. For our guide let the password be just secret.
- Transport ID - is an ID in Jabber network. Let’s say we want to setup transport for MSN for the server tigase.org. Transport ID can be: msn.tigase.org. It could be also: anything.tigase.org but this name while still valid would be confusing for users and my suggestion is to avoid confusing names. Note! Transport ID should resolve to correct IP address. For your tests you can add the ID to /etc/hosts file.

Here is side by side configuration for both applications: PyMSN-t and Tigase to make them work together. I have setup both services on my laptop which hostname is test-d. To make sure both test-d and msn.test-d resolve to correct IP address I am adding entry to /etc/hosts file:

    ## In your case the IP address should be probably different.
    192.168.0.13    test-d            msn.test-d

Tigase server connects to MySQL database (or built-in XMLBD for simpler configuration variant).

I am not going to setup PyMSN-t to run in background as a system service. This is specific to the system you use and is covered in transport documentation and you operating system. Most of systems have own scripts to start services so I would recommend to use them. Here we just run it in foreground with full logging switched on to the console to make it easier track what happens.

## PyMSN-t - /etc/jabber/pymsn-t.xml file

    <pymsnt>
      <!-- The JabberID of the transport -->
      <jid>msn.test-d</jid>
      <!-- The public IP or DNS name of the machine
        the transport is running on -->
      <host>test-d</host>
      <!-- The location of the PID file, relative
        to the PyMSNt directory -->
      <pid>/var/run/jabber/pymsn-t.pid</pid>
      <!-- If set, the transport will background
        itself when run, we don't want to do this right
        now. -->
      <!-- <background/> -->
      <!-- The IP address of the main Jabber server
        to connect to -->
      <mainServer>127.0.0.1</mainServer>
      <!-- The TCP port to connect to the Jabber
        server on (this is the default for Jabberd2) -->
      <port>5347</port>
      <!-- The authentication token to use when
        connecting to the Jabber server -->
      <secret>secret</secret>
      <lang>en</lang>
      <website>http://test-d/</website>
      <allowRegister/>
      <getAllAvatars/>
      <!-- Please give the port to listen for Jabber
        socks5 transfers on. Note the standard port number
        set here is <strong>8010</strong>. This port
        however is in use on my machine so this is why
        I had to set it to different value.-->
      <ftJabberPort>8014</ftJabberPort>
      <admins>
        <jid>tus@test-d</jid>
      </admins>
      <!-- The logging level
        0 -> No logging
        1 -> Log tracebacks
        2 -> Log tracebacks, warnings and errors
        3 -> Log everything -->
      <debugLevel>3</debugLevel>
      <!-- The file to log to. Leave this disabled
        for stdout -->
      <!-- <debugFile>debug.log</debugFile> -->
    </pymsnt>

Prev |  | Next
Cerificate from CA | Home | PyMSN-t - run command