source: skype/README @ 8fcb196

Last change on this file since 8fcb196 was 8fcb196, checked in by Miklos Vajna <vmiklos@…>, at 2010-08-02T21:54:24Z

update skype api link

  • Property mode set to 100644
File size: 13.0 KB
RevLine 
[0c60f96]1= Skype plugin for BitlBee
[7f1cf70]2Miklos Vajna <vmiklos-at-vmiklos-dot-hu>
[afe221f]3
[56e4ac4]4== Status
5
[9f829c4]6[quote, Wilmer van der Gaast (author of BitlBee)]
[4eaadf6]7____
8Okay, this exists now, with lots of thanks to vmiklos for his *excellent*
9work!!
10
11It's not in the main BitlBee and it'll never be for various reasons, but
12because it's a plugin that shouldn't be a problem.
13____
14
[56e4ac4]15One day I browsed the BitlBee bugtracker and found
16http://bugs.bitlbee.org/bitlbee/ticket/82[this] ticket. Then after a while I
[1138b25]17returned and saw that it was still open. So I wrote it.
[56e4ac4]18
[15e2200]19It's pretty stable (one day I wanted to restart it because of an upgrade
20and just noticed it was running for 2+ months without crashing), I use
21it for my daily work. Being a plug-in, no patching is required, you can
22just install it after installing BitlBee itself.
[75742cc]23
[4c3a4c8]24NOTE: You will see that this implementation of the Skype plug-in still requires
[54c269d]25a Skype instance to be running. This is because I'm not motivated to reverse
26engineer Skype's
27http://en.wikipedia.org/wiki/Skype_Protocol#Obfuscation_Layer[obfuscation
28layer]. (Not mentioning that you should ask your lawyer about if it is legal or
29not..)
30
[22d97b4]31== Requirements
32
[60edadb]33* Skype >= 1.4.0.99. The latest version I've tested is 2.1.0.81.
[31a35ea]34* BitlBee >= 1.2.6. The lastest version I've tested is @BITLBEE_VERSION@. Use
35  old versions (see the NEWS file about which one) if you have older BitlBee
36  installed.
[eb39102]37* Skype4Py >= 0.9.28.7. Previous versions won't work due to API changes.
[3129b99]38  The latest version I've tested is 1.0.32.0.
[d276c9a]39
[c60b864]40* Python >= 2.5. Skype4Py does not work with 2.4.
[e49da25]41* PyGObject >= 2.8.0. Older versions are part of PyGTK. (And you don't want to
42  install GTK for nothing, right?)
[b0d40f5]43* pyopenssl or python-gnutls.
[22d97b4]44
[df1a59d4]45`bitlbee-skype` has been tested under Linux and Mac OS X. Skype and Skype4py is
46available under Windows, too, so it probably works, but this has not been tested.
[760ed1f]47
[9e03e55]48== How to set it up
[afe221f]49
[751b149]50Before you start. The setup is the following: BitlBee can't connect directly to
51Skype servers (the company's ones). It needs a running Skype client to do so.
52In fact BitlBee will connect to `skyped` (a tcp server, provided in this
[4c3a4c8]53package) and `skyped` will connect to to your Skype client.
[751b149]54
[d0a6a8c]55The benefit of this architecture is that you can run Skype and `skyped`
56on a machine different to the one where you run BitlBee (it can be even
57a public server) and/or your IRC client.
[7e4f0ca1]58
[d0a6a8c]59NOTE: The order is important. First `skyped` starts Skype. Then `skyped`
60connects to Skype, finally BitlBee can connect to `skyped`.
61
[7ce0373]62=== Installing under Frugalware or Debian
[d0a6a8c]63
64- Install the necessary packages:
[11eed8f]65
[36fbaa0]66----
[1d14818]67# pacman-g2 -S bitlbee-skype
[36fbaa0]68----
69
[7ce0373]70or
[4966d841]71
72----
[7ce0373]73# apt-get install skyped bitlbee-plugin-skype
[4966d841]74----
75
[12198ac]76(the later from the unstable repo)
[bfdcbfb]77
[7ce0373]78and you don't have to compile anything manually.
[4966d841]79
[720ae58]80=== Installing under OS X
81
82- Install the necessary packages from ports:
83
84NOTE: You have to edit the Portfile manually to include the install-dev target,
85just append install-dev after install-etc.
86
87----
88# port -v install bitlbee
89# port -v install py25-gobject
90----
91
92and you have to install `bitlbee-skype`, `skype4py` and `python-gnutls` from
93source.
94
[d0a6a8c]95=== Installing from source
96
[56d88ba]97NOTE: bitlbee-skype by default builds and installs skyped and the
98plugin. In case you just want to install the plugin for a public server
[cc5f8ac]99or you want to use skyped with a public server (like
100`bitlbee1.asnetinc.net`), you don't need both.
[56d88ba]101
102- You need the latest stable BitlBee release (unless you want to use a
103  public server):
[afe221f]104
[0c60f96]105----
[1f59f2f]106$ wget http://get.bitlbee.org/src/bitlbee-@BITLBEE_VERSION@.tar.gz
107$ tar xf bitlbee-@BITLBEE_VERSION@.tar.gz
108$ cd bitlbee-@BITLBEE_VERSION@
[0c60f96]109----
[afe221f]110
111- Now compile and install it:
112
[0c60f96]113----
[ccb50f5]114$ ./configure
115$ make
116# make install install-dev
[0c60f96]117----
[afe221f]118
[56d88ba]119- To install http://skype4py.sourceforge.net/[Skype4Py] from source
120  (unless you want to install the plugin for a public server):
121
122----
123$ tar -zxvf Skype4Py-x.x.x.x.tar.gz
124$ cd Skype4Py-x.x.x.x
125# python setup.py install
126----
127
[2a8d790]128- To install http://pypi.python.org/pypi/python-gnutls[python-gnutls] from source
129  (unless you want to install the plugin for a public server):
130
131----
132$ tar -zxvf python-gnutls-x.x.x.tar.gz
133$ cd python-gnutls-x.x.x
134# python setup.py install
135----
136
[720ae58]137NOTE: On OS X you will need the following hacks first:
138
139----
140$ export LD_LIBRARY_PATH=/opt/local/lib
141$ export CFLAGS="-I/opt/local/include"
142$ export LDFLAGS="-L/opt/local/lib"
143----
144
[21a387fd]145- Get the plugin code (in an empty dir, or whereever you want, it does
146  not matter):
[afe221f]147
[0c60f96]148----
[3b495c0]149$ wget http://vmiklos.hu/project/bitlbee-skype/bitlbee-skype-@VERSION@.tar.gz
150$ tar xf bitlbee-skype-@VERSION@.tar.gz
151$ cd bitlbee-skype-@VERSION@
[0c60f96]152----
[afe221f]153
154- Compile and install it:
155
[0c60f96]156----
[ccb50f5]157$ ./configure
158$ make
159# make install
[0c60f96]160----
[afe221f]161
[21a387fd]162This will install the plugin to where BitlBee expects them, which is
163`/usr/local/lib/bitlbee` if you installed BitlBee from source.
164
[d0a6a8c]165=== Configuring
166
[1b48afb]167- Set up `~/.skyped/skyped.conf`: Create the `~/.skyped` directory, copy
168  `skyped.conf` and `skyped.cnf` from
169  `/usr/local/etc/skyped/skyped.conf` to `~/.skyped`, adjust `username`
170  and `password`. The `username` should be your Skype login and the
171  `password` can be whatever you want, but you will have to specify that
172  one when adding the Skype account to BitlBee (see later).
[e65ceaa]173
[52d377d]174NOTE: Here, and later - `/usr/local/etc` can be different on your installation
175if you used the `--sysconfdir` switch when running bitlbee-skype's `configure`.
176
177- Generate the SSL pem files:
178
179----
[1b48afb]180# cd ~/.skyped
[ccb50f5]181# openssl req -new -x509 -days 365 -nodes -config skyped.cnf -out skyped.cert.pem \
[52d377d]182        -keyout skyped.key.pem
183----
184
[1b48afb]185NOTE: Maybe you want to adjust the permissions in the `~/.skyped`
[ccb50f5]186dir. For example make it readable by just your user.
187
[b0d40f5]188- If both pyopenssl and python-gnutls are available, then python-gnutls
189  will be used. This behaviour can be overwritten by:
190
191----
192$ export SKYPED_NO_GNUTLS=1
193----
194
[833eaee]195- Start `skyped` (the tcp server):
[afe221f]196
[0c60f96]197----
[ccb50f5]198$ skyped
[0c60f96]199----
[ba20c39]200
[4c3a4c8]201- Start your `IRC` client, connect to BitlBee and add your account:
[7338d59]202
203----
[789d055]204account add skype <user> <pass>
205account set skype/server localhost
[7338d59]206----
207
[e65ceaa]208<user> should be your Skype account name, <pass> should be the one you declared
[10a42d9]209in `skyped.conf`. If you want to run skyped on a remote machine, replace
210`localhost` with the name of the machine.
[7338d59]211
[9ace502]212If you are running skyped on a custom port:
213
214----
215account set skype/port <port>
216----
217
[7996794]218If you want to set your full name (optional):
219
220----
221account set skype/display_name "John Smith"
222----
223
224If you want to see your skypeout contacts online as well (they are
225offline by default):
226
227----
228account set skype/skypeout_offline false
229----
230
[23b84e1]231== Setting up Skype in a VNC server (optional)
232
233Optionally, if you want to run Skype on a server, you might want to setup up
[4c3a4c8]234a `VNC` server as well. I used `tightvnc` but probably other `VNC` servers will
[23b84e1]235work, too.
236
237First run
238
239----
[ccb50f5]240$ vncpasswd ~/.vnc/passwd
[23b84e1]241----
242
243and create a password. You will need it at least once.
244
245Now create `~/.vnc/xstartup` with the following contents:
246
247----
248#!/bin/sh
249
[9d6702c]250blackbox
[23b84e1]251----
252
[57087df]253Adjust the permissions:
254
255----
[ccb50f5]256$ chmod +x ~/.vnc/xstartup
[57087df]257----
258
[23b84e1]259Then start the server:
260
261----
[ccb50f5]262$ vncserver
[23b84e1]263----
264
[ece66da]265Then connect to it, start an `xterm`, set up Skype (username, password,
266enable X11 API and allow the `Skype4Py` client), quit from Skype, and
267start `skyped`. If you want to watch its traffic, enable debug messages
268and foreground mode:
[23b84e1]269
[ece66da]270----
271$ skyped -n -d
272----
[dffa24f]273
[123e45a]274== Features
[b6d26ac]275
[adce2de]276- Download nicks and away statuses from Skype
[b6d26ac]277
[39a0d64]278- Noticing joins / parts while we're connected
279
[93ece66]280- Sending messages
281
[8dd21bb]282- Receiving messages
283
[72f697b]284- Receiving away status changes
285
[62bb4e4]286- `skyped` (the tcp daemon that is a gateway between Skype and tcp)
[ed2e37f]287
[62bb4e4]288- Error handling when `skyped` is not running and when it exits
[afe221f]289
[62bb4e4]290- Marking received messages as seen so that Skype won't say there are unread messages
[440665b]291
[6627d92]292- Adding / removing contacts
293
[23411c6]294- Set away state when you do a `/away`.
295
[d3cbd17]296- When you `account off`, Skype will set status to `Offline`
[348a3a2]297
[d3cbd17]298- When you `account on`, Skype will set status to `Online`
[348a3a2]299
[d3cbd17]300- Detect when somebody wants to add you and ask for confirmation
[8dd21bb]301
[df9255d]302- Detect when somebody wants to transfer a file
303
[d6a371e]304- Group chat support:
305
306  * Detect if we're invited
307
308  * Send / receive group chat messages
[93ece66]309
[ff58445]310  * Invite others (using `/invite <nick>`)
[c5dd164]311
[d6a371e]312  * Part from group chats
[c5dd164]313
[ff58445]314  * Starting a group chat (using `/j #nick`)
315
[e103e73]316- Topic changes in group chats:
317
318  * Show the current topic (if any) on join
319
320  * Notice when someone changes the topic
321
322  * Support changing the topic using `/topic`
323
[fb36492]324- Viewing the profile using the `info` command.
325
[a06a0a5]326- Handling skype actions (when the `CHATMESSAGE` has `EMOTED` type)
327
[6b266f6]328- Setting your display name using the `nick` command.
[a06a0a5]329
[ccb50f5]330- Running Skype on a machine different to BitlBee is possible, the
331  communication is encrypted.
332
[9aed2f1]333- Managing outgoing calls (with call duration at the end, including
334  SkypeOut calls if you use a phone number instead of a nick):
[2eb4b1f]335
336  * `account set skype/call nick`
337  * `account set -del skype/call`
[123e45a]338
[e0074cb]339- Managing incoming calls via questions, just like when you add / remove
340  contacts.
[c5dd164]341
[9aed2f1]342- Querying the current SkypeOut balance:
343
344  * `account set skype/balance query`
345
[08a355b]346- For debug purposes, it's possible to send any command to `skyped`. To
347  achieve this, you need to:
348
349  * `account set skype/skypeconsole true`
350
351  * then writing `skypeconsole: <command>` will work in the control
352    channel.
353
[b820226]354  * `account set skype/skypeconsole_receive true` will make the
355    `skypeconsole` account dump all the recieved raw traffic for you
356
[5acf9ab]357- If you want to automatically join bookmarked groupchats right after
358  you logged in, do:
359
360  * `account set skype/auto_join true`
361
[f4d37c6]362- Edited messages are shown with the `EDIT:` prefix. If you don't like
363  this, you can set your own prefix using:
364
365  * `account set skype/edit_prefix "updated message:"`
366
[49a3c02]367- The `echo123` test account is hidden by default. If you want to see it:
368
369  * `account set skype/test_join true`
370
[304aa33]371- Mood texts are not shown by default. If you want to see it:
372
373  * `account set skype/show_moods true`
374
[e0074cb]375== What needs to be done (aka. TODO)
[846ceffb]376
[d6a371e]377- Notice if foo invites bar. Currently you can see only that bar joined.
378
[6344674]379- Public chats. See
380  link:https://developer.skype.com/jira/browse/SCL-381[this feature
381  request], this is because it is still not possible (under Linux) to
382  `join_chat` to a public chat..
[d6a371e]383
[c49820d]384- Add yasrd (Yet Another Skype-Related Daemon) to allow using a public
385  server for users who are behind NAT.
386
[0c60f96]387== I would like to have support for ...
388
[23b84e1]389If something does not work and it's not in the TODO section, then please
[e72d869]390contact me! Please also try the link:HACKING[git version] before reporting a bug, your
[80d9004]391problem may be already fixed there.
[23b84e1]392
393In fact, of course, I wrote this documentation after figured out how to do this
394setup, so maybe I left out some steps. If you needed 'any' additional tricks,
395then it would be nice to include them here.
[afe221f]396
[f78f949]397== Known bugs
398
[a25bddf]399- File transfers are view-only from BitlBee. Quoting the
400  https://developer.skype.com/Docs/ApiDoc/FILETRANSFER_object[relevant
401  documentation]: 'File transfers cannot be initiated nor accepted via
402  API commands.' So it's not something I can add support for, sadly.
[f78f949]403
[0c60f96]404== Screenshots
405
[668a122]406You can reach some screenshots link:shot[here].
[ddd3502]407
[25d87e4]408== Additional resources
[a60c3c2]409
[25d87e4]410You can reach the Changelog link:Changelog[here], and a gitweb interface
[6f01885]411http://vmiklos.hu/gitweb/?p=bitlbee-skype.git[here].
[a60c3c2]412
[c09f90f]413The Skype API documentation is
[8fcb196]414http://developer.skype.com/resources/public_api_ref.zip[here] if you're
415interested.
[c09f90f]416
[ceee9c7]417
418== Testimonials
419
420----
[3e8a4ea]42100:56 < scathe> I like your skype plugin :)
[ceee9c7]422----
423
[6774d83]424----
425It's really working great so far.
426
427Good Job and thank you!
428Sebastian
429----
430
[587a921]431----
432Big respect for your work, i really appreciate it.
433
434Martin
435----
436
[93264f0]437----
438Thanks for bitlbee-skype. As a blind Linux user, I cannot use the
439skype GUI client because qt apps ar not accessible yet with the
440available screen readers. bitlbee-skype allows me to make use of skype
441without having to interact much with the GUI client, which helps me a
442lot.
443
444Lukas
445----
446
[e3d0b10]447----
44802:12 < newton> i must say, i love this little bee ;)
44902:15 < newton> tried it out today with the skype plugin, good work!
450----
451
[df482d4]452----
45318:10 < miCSu> it works fine
454----
455
[3e8a4ea]456----
45713:56 < seo> i just want to thank you :)
45813:56 < seo> for bitlbee-skype
45913:57 < seo> it's working very well, so, again, thank you for your work, and for sharing it
460----
461
[8cb17ff]462----
46322:16 < ecraven> vmiklos: thanks a lot for the skype plugin for bitlbee!
464----
465
[8ee6def]466----
467I'm blind and so I have to use a screen reader, in my case Gnome-Orca.
468But since Skype is written in QT, while Orca uses gtk+, I have no direct
469access to the Skype interface. That's why I desided to use Skyped and
470Erc.
471The text console is fully accessible.
472Thank you very much.
473
474Hermann
475----
476
[b9f2894]477----
478i love that bitlbeeplugin. big thx for that.
479
480michael
481----
482
[d0169e7]483----
48423:47 < krisfremen> thanks for creating this fabulous piece of software vmiklos :)
485----
486
[65e4020]487== Thanks
488
[37ae52a]489to the following people:
[65e4020]490
[e49da25]491* Wilmer van der Gaast, for answering questions about the BitlBee plugin interface
[65e4020]492
[56a3616]493* Arkadiusz Wahlig, author of skype4py, for making suggestions to skyped
[65e4020]494
[9834597]495* Gabor Adam Toth (tg), for noticing extra code is needed to handle multiline
496  messages
497
498* Cristobal Palmer (tarheelcoxn), for helping to testing the plugin in a
499  timezone different to mine
[65e4020]500
[4834307]501* Risko Gergely, for his SkypeOut ideas
502
[437ddf5]503* people on `#bitlbee` for feedback
504
[eb9cbb8]505Back to my link:/projects[projects page].
506
[0c60f96]507// vim: ft=asciidoc
Note: See TracBrowser for help on using the repository browser.