2018-01-07 11:19:34

@Green Gables Fan, the requirement of Python to communicate with team talk is entirely unfounded falsehoods. Any network implementation will do the trick. TeamTalk has, as you know, two ports -- the TCP and UDP ports. The TCP port is used to communicate with the server, and commands/instructions and replies are sent on this port. The UDP port is used for voice communications. According to the latest revision of the TT5 github repository (at the time of this writing, revision c302a575d24f20a05fcbbe9e15524b055146414d), the list of available TCP commands are as follows: login, joinchannel, leavechannel, listbans, listaccounts, subscribe, unsubscribe, join, kick, moveuser, op, ban, unban, message, makechannel, updatechannel, removechannel, leave, newaccount, delaccount, updateserver, saveconfig, querystats, and ping. (I may be wrong, and certain commands in this list may not be commands, or they may be. There also are most likely more.) An example telnet session follows:
$... # initiate telnet and log in (> is example prompt, not actual prompt given by TT)
> querystats id=123
begin id=123
stats totaltx=0 totalrx=0 voicetx=0 voicerx=0 videocaptx=0 videocaprx=0 mediafiletx=0 mediafilerx=0 desktoptx=0 desktoprx=0 usersserved=2 userspeak=1 filestx=0 filesrx=0 uptime=120176
ok
end id=123
You will notice that I added "id=123" at the end of the command. This is to ensure that I can separate command outputs from server replies. As the teamtalk 5 PHP administration script says, "Interacting with a TeamTalk server is similar to a command line interface. Basically issue a command by typing its name and press Enter. The server will then process the command and issue a reply. The TeamTalk protocol is, however, not a request/reply protocol, i.e. the server can send commands which are not replies issued by the client (you). E.g. once you have logged in you can get a command from the server saying that a user has joined a channel which is not related to any command you have issued. To know if a command is a reply to a command you have issued you need to put in the parameter "id=123" where 123 is the command ID of the command you want to trace. The server will then encapsulate its reply to your command in 'begin' - 'end' replies." As you saw, the server responded with, "begin id=123", then it's output, then "end id=123". If we were writing an application, we could use this to determine what is output that we requested and what is not.Output that is not surrounded by begin and end is autotransmitted server replies/commands; output that is surrounded by begin/end is output we requested. I hope this gives you guys a bit of acumen into how TT works!

"On two occasions I have been asked [by members of Parliament!]: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out ?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question."    — Charles Babbage.

Thumbs up

2018-01-07 16:47:11

If that is the case, Ethin, then why do people say you need Python to use some kind of TeamTalk commander?

Ulysses
AKA Green_Gables_fan and HeavenlyHarmony
My new, self-hosted version of WordPress!

2018-01-07 19:16:11

That's a different program altogether, made by Doug Lee, and having nothing to do with Bearware whatsoever.

The bipeds think this place belongs to them, how cute.

Thumbs up

2018-01-07 19:22:15

Is TeamTalk written in Python, then? Is that why it is easy for someone to write a Python command-line interface that can communicate with TeamTalk? Is the programme compiled already, or what is the reason you would need Python? Is it to avoid dependency hell?

Ulysses
AKA Green_Gables_fan and HeavenlyHarmony
My new, self-hosted version of WordPress!

2018-01-07 19:25:27

No. TeamTalk is written in various languages -- C++ for QTTeamTalk, Java for TeamTalkAndroid, Objective-C for iTeamTalk, C# for TeamTalk.NET, C for the TeamTalk DLL, C++ for TeamTalkClassic, and C for TeamTalkJNI. (And PHP for TT5PHPAdmin.) The server is in C, though. I don't know where you heard that Python made it easiest to interface with TeamTalk -- it's definitely untrue.

"On two occasions I have been asked [by members of Parliament!]: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out ?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question."    — Charles Babbage.

Thumbs up