TeamTalk 4 .NET DLL  Version 4.5A
Server Setup Guide

The TeamTalk 4 Server is available for both Windows and Linux. The server executables are located in the 'Server' sub-directory of the SDK. On Windows the server comes as both a console program (tt4srv.exe or tt4prosrv.exe) and an NT service (tt4svc.exe or tt4prosvc.exe). The Linux server (teamtalkd or teamtalkprod) can run as both a regular program and as a daemon.

This section outlines the following:

Configurating the TeamTalk Server

The TeamTalk server reads its configuration from an XML file, typically tt4svc.xml. This file can be edited manually (using an UTF-8 aware editor) or one can choose to use the -wizard option to the server executable.

Below is an example a server's configuration file:

<?xml version="1.0" encoding="UTF-8" ?>
<teamtalk version="4.0">
    <general>
        <server-name>TeamTalk Server</server-name>
        <motd>My login message to users</motd>
        <max-users>1000</max-users>
        <auto-save>true</auto-save>
        <bind-ip></bind-ip>
        <tcpport>10333</tcpport>
        <udpport>10333</udpport>
        <server-password></server-password>
        <server-log-maxsize>-1</server-log-maxsize>
        <login-attempts>10</login-attempts>
        <file-storage>
            <files-root>c:\temp</files-root>
            <max-diskusage>51200000</max-diskusage>
            <channel-diskquota>5120000</channel-diskquota>
        </file-storage>
        <user-rights>
            <channel-creation>true</channel-creation>
            <channel-operators>true</channel-operators>
            <channel-commands>true</channel-commands>
            <modify-subscriptions>true</modify-subscriptions>
            <client-broadcast>false</client-broadcast>
            <view-all-users>true</view-all-users>
            <guest-login>true</guest-login>
            <double-login>true</double-login>
            <forward-audio>true</forward-audio>
            <forward-video>true</forward-video>
        </user-rights>
        <bandwidth-limits>
            <audiocodec-bps-limit>0</audiocodec-bps-limit>
            <audiotx-limit>0</audiotx-limit>
            <videotx-limit>0</videotx-limit>
            <totaltx-limit>0</totaltx-limit>
        </bandwidth-limits>
    </general>
    <users>
        <user>
            <username>admin</username>
            <password>mypasswd</password>
            <user-type>2</user-type>
        </user>
    </users>
    <serverbans>
        <serverban address="192.168.11.44">
            <bantime>2009/10/12 12:48</bantime>
            <nickname>Benjamin</nickname>
            <username>ben</username>
            <channel-path>/Conf ABC</channel-path>
        </serverban>
    </serverbans>
</teamtalk>

Here is an explanation of each of the tags in the server configuration file:

  • <general> This section contains tags related to server's configuration.

    • <server-name> The server's name.
    • <motd> The message of the day (MOTD) which will be available to users once they log in. The MOTD supports the following variables:
      • %users% The number of users on the server.
      • %admins% The number of administrators on the server.
      • %uptime% The time the server has been online.
      • %voicetx% The number of KBytes containing audio which has been forwarded through the server to users.
      • %voicerx% The number of KBytes containing audio which has been received by the server.
      • %lastuser% The nickname of the last user to log on to the server.
    • <max-users> The maximum number of users on the server.
    • <auto-save> If 'true' the server will automatically save changes to it configuration file whenever the server's configuration is changed. When static channels are either created, updated or deleted this will also be automatically saved to the server's configuration.
    • <bind-ip> The server should bind to this IP-address. If the computer running the server has multiple IP-address it is advised to specify the IP-address where the server should be running. If the server should run IPv6 the bind-ip MUST be specified. Use "::" to make the server run IPv6 on all interfaces.
    • <tcpport> The TCP port the server must use. Ensure it's not taken by another application.
    • <udpport> The UDP port the server must use. Ensure it's not taken by another application.
    • <server-password> A password which users must provide to log on to the server. This password must be provided even if the user has a user account on the server.
    • <server-log-maxsize> The maximum size in bytes of the server log file before it creates a new one. Specifying -1 means there is no limit. 0 means don't log events.
    • <login-attempts> The maximum number of log in attempt with incorrect password before banning a user's IP-address.
    • <file-storage> Tags related to storing files.
      • <files-root> If file-sharing is enabled uploaded files will be stored at this location.
      • <max-diskusage> The maximum number of bytes available for storing files on the server.
      • <channel-diskquota> The default number of bytes available for storing files when a user creates a channel.
    • <user-rights> Tags related to user-rights.
      • <channel-creation> Whether default users, i.e. non-administrators, should be allowed to create channels using the 'join' option.
      • <channel-operators> Whether when a new channel is created using the 'join' option the user will become channel-operator, i.e. the person can kick users from the channel and update its settings.
      • <channel-commands> Whether users should be allowed to send channel-commands, i.e. channel text-messages which are prefixed with '/'
      • <modify-subscriptions> Whether users can subscribe and unsubscribe audio, video, etc. from other users. Usually used to ignore certain users.
      • <client-broadcast> Whether users, i.e. non-administrators, can broadcast messages in similar way as administrators.
      • <view-all-users> Whether users should be allowed to see all users on the server and not only those in their channel.
      • <guest-login> Whether users can login without a user account.
      • <double-login> Whether multiple users can log in using the same user account. If disabled a new user who logs on with an user account currently in use, results in the user currently logged in being kicked.
      • <forward-audio> Whether users should be allowed to send their packets through the server. If disabled users must run in peer to peer mode. Checkout section Forward Through Server Transmission Mode for more details.
      • <forward-video> Whether users should be allowed to send their packets through the server. If disabled users must run in peer to peer mode. Checkout section Forward Through Server Transmission Mode for more details.
    • <bandwidth-limits> Tags related to bandwidth usage.
      • <audiocodec-bps-limit> The highest bitrate for audio codec created by users. Admins do not need to obey this limit.
      • <audiotx-limit> The maximum number of bytes per second of audio allowed by the server to be forwarded to users.
      • <videotx-limit> The maximum number of bytes per second of video allowed by the server to be forwarded to users.
      • <totaltx-limit> The maximum number of bytes per second of all data allowed by the server to be forwarded to users.
  • <users> This section contains user accounts.
    • <user> A user account.
      • <username> The username of the user account.
      • <password> The password of the user account.
      • <user-type> The type of user. 1 = Default user, 2 = Administrator.
  • <server-bans> This section contains users who have been banned from the server.
    • <serverban address="..."> A banned user where the address attribute is the IP-address which has been banned. Note that it's the IP-address which is banned and not the user who own the account.
      • <bantime> The time of when the ban was issued.
      • <nickname> The nickname of the user at the time of the ban.
      • <username> If the user has an account on the server it is specified here.
      • <channel-path> The channel the user was in a the time of the ban.

Starting a TeamTalk Server

Try running the server executable to get an overview of the possible ways to run the server. Note that running the NT service will not give any output since an NT service doesn't have a user-interface. Also note the NT service must be run using the Windows Administrator account.

When running the server executable the following output will appear:

bdr@debian:~/projects/tt4srv$ ./teamtalkd

TeamTalk Server version 4.2.0.1479
Compiled on Oct 23 2011 22:40:14.

Copyright (c) 2002-2010, BearWare.dk

Usage: ./teamtalkd [OPTIONS]

Valid options:
  -d               Start TeamTalk Server as daemon.
  -daemon-pid      Print PID of daemon started with -d option.
  -nd              Start TeamTalk Server as non-daemon.
  -wizard          Run the setup-wizard to configure the server.
  -c [FILE]        Instead of loading tt4svc.xml from current directory
                   use this specified file.
  -wd [DIR]        Set working directory (where tt4svc.xml
                   is located and where the log file tt4svc.log
                   will be stored).
                   Current directory is the default location of 
                   tt4svc.xml and log file.
  -tcpport [PORT]  Override the <tcpport> setting in tt4svc.xml.
  -udpport [PORT]  Override the <udpport> setting in tt4svc.xml.
  -ip [IPADDR]     Override <bind-ip> setting in tt4svc.xml.
  -verbose         Output log information to console.
  --version        Displays version info.
  --help           Displays this message.

Examples: ./teamtalkd -nd
          ./teamtalkd -wd /home/bill/srv1 -ip 192.168.0.2 -nd
          ./teamtalkd -c /home/bill/srv1/tt4svc.xml -nd

Kind regards go to the people behind the ACE Framework, Speex, CELT
and Theora projects!

Report bugs to contact@bearware.dk

Here is an explanation of each of the options.

  • -d This option only applies to Linux. The server will fork a child-process which will run the server even if the user starting the process logs out of his session.
  • -nd This option doesn't apply to the NT service. Using this option starts the server as a normal process.
  • -wizard Run the server configurator. This is the advised way to configure the server, since editing XML is error prone.
  • -c Load the specified configuration file.
  • -wd Run the server from this directory.
  • -tcpport Use the specified TCP port instead of what the server's configuration file says.
  • -udpport Use the specified UDP port instead of what the server's configuration file says.
  • -ip Bind to this IP-address instead of what the server's configuration files says.
  • -verbose Basically prints what goes into the log file to screen.
  • –version Version information
  • –help Prints the above message.

The NT service has additional options which are explained in the following section.

Installing the TeamTalk 4 NT Service

In addition to the options described in section Starting a TeamTalk Server the NT Service (tt4svc.exe or tt4prosvc.exe) also accepts the following parameters:

  • -i Install the NT service.
  • -s Start the NT service.
  • -e Stop the NT service.
  • -u Uninstall the NT service.

Note the above commands must be run using the Windows Administrator account. Right-click C:\Windows\system32\cmd.exe and choose "Run as Administrator".

Installing multiple NT Services

To install multiple TeamTalk 4 NT Services the sc.exe command can be used. Here is an example:

sc.exe create "TeamTalk Server 2" binPath= "C:\MyServer\tt4svc.exe -wd c:\MyServer" start= auto

The service in the above example will be called "TeamTalk Server 2" in the NT service list. Notice the spaces after binPath and start. For some strange reason these are required. To start the above service run:

sc.exe start "TeamTalk Server 2"

To stop it type:

sc.exe stop "TeamTalk Server 2"

To uninstall it type:

sc.exe delete "TeamTalk Server 2"

TeamTalk 4 PHP Admin for remote administration

The 'Server' sub-directory also contains a PHP script named tt4admin.php which can be used for remote administation of a TeamTalk server. The TeamTalk 4 PHP Admin must be executed in a console.

Here's an example of logging into a server and the available options:

C:\Projects\TT4PHPAdmin>php tt4admin.php
TeamTalk 4 PHP Admin!
Supports TeamTalk 4 protocol 4.2

Copyright (c) 2005-2010, BearWare.dk

This is a console application so don't put it on a webserver.
Type IP-address of TeamTalk server (prefix 'tls://' in TT4Pro): teamtalk.dyndns.dk
Type TCP port number of TeamTalk server: 10333
Connecting...
Connected!
Got user ID# 304
Server name is: TeamTalk Server
Your session will time out in 60 seconds
Type account username: admin
Type account password: ********
Type server password:

Logging in...
Log in successful!
Server updated...
Server name is: TeamTalk Server
Server password is:
Max users on server: 1000
User timeout: 60 seconds
Server's MOTD is: Please sign up for the newsletter on http://www.bearware.dk to
 get the latest updates.

If you would like to help out translating TeamTalk 4 to your language then pleas
e send an email to contact@bearware.dk.

Enjoy your stay!

What do you want to do now?
---------------------------- USERS -----------------------------
 1. List online users
 2. Kick user
 3. Move user
 4. Op/deop user
 5. List banned users
 6. Ban user
 7. Unban user
 8. Send text message to user
--------------------------- CHANNELS ---------------------------
10. List active channels
11. Create channel
12. Update channel
13. Delete channel
14. Send text message to channel
------------------------ USER ACCOUNTS -------------------------
20. List user accounts
21. Create user account
22. Delete user account
--------------------------- SERVER -----------------------------
30. Change server name
31. Change server password
32. Change maximum number of users
33. Change message of the day
34. Send text message to all users on server
35. Save server changes
36. Query server statistics
--------------------------- SESSION ----------------------------
50. Issue ping (extend session time)
51. Exit

Type option ID: