http://msn-transport.jabberstudio.org/docs/server.html

On 1/21/06, Igori <[EMAIL PROTECTED]> wrote:
> Hi
>
> I would like to know how to install PyMSNt in Jivemessenger or wildfire
> server , my OS is Suse 10
>
>
> sorry my english
>
>
> Participe en el V Congreso Internacional de Educaci?n Superior
> "Universidad 2006". La Habana , Cuba, del 13 al 17 de febrero del 2006
> http://www.universidad2006.cu/
>
> _______________________________________________
> py-transports mailing list
> py-transports@blathersource.org
> http://www.modevia.com/cgi-bin/mailman/listinfo/py-transports
>


--
- Norman Rasmussen
 - Email: [EMAIL PROTECTED]
 - Home page: http://norman.rasmussen.co.za/
From [EMAIL PROTECTED]  Sat Jan 21 19:55:51 2006
From: [EMAIL PROTECTED] (Lars T. Mikkelsen)
Date: Sat Jan 21 19:55:59 2006
Subject: [py-transports] PyMSNt and Google Talk
Message-ID: <[EMAIL PROTECTED]>

I've been doing some testing of using PyMSNt from Google Talk.
Unfortunately, things are not running as smooth as one could hope for:

1) Sometimes contacts are unsubscribed, apparently by the Google Talk
server. I think this is related to the issue discussed on the jadmin
list [1].

2) When the mouse is hovered over a contact in the Google Talk client,
the client sends a presence probe (i.e. <presence type="probe"
to="[EMAIL PROTECTED]"/>). If the client doesn't receive presence from
the contact within a few seconds, the status of the contact is changed
to offline. I'm a bit unsure if the Google Talk client is violating
RFC3921 by sending these presence probes. RFC3921 states:

   o  probe -- A request for an entity's current presence; SHOULD be
      generated only by a server on behalf of a user.

As I'm interpreting this only servers are allowed to generate presence
probes. In any case, however, I think PyMSNt should be able to respond
to presence probes. A patch to fix this is attached (the patch is a
quick hack, I guess it could be made cleaner).

3) The webreg application doesn't support DNS SRV as required for Google
Talk. A patch to add support for DNS SRV is attached. It uses
dns_get_record(), so it will only work with PHP5 - hence, I also added
fallback to a list of known servers. Furthermore, the patch changes a
couple of '<?' to '<?php'.

Best regards,
Lars
-------------- next part --------------
Index: jabw.py
===================================================================
--- jabw.py     (revision 95)
+++ jabw.py     (working copy)
@@ -253,6 +253,9 @@
                if ptype and (ptype.startswith("subscribe") or 
ptype.startswith("unsubscribe")):
                        LogEvent(INFO, self.jabberID, "Parsed subscription 
presence packet")
                        self.subscriptionReceived(toj.userhost(), ptype)
+               elif ptype and ptype.startswith("probe"):
+                       LogEvent(INFO, self.jabberID, "Parsed presence probe")
+                       
self.contactList.getContact(toj.userhost()).sendPresence(fro)
                else:
                        status = None
                        show = None
-------------- next part --------------
diff -ur webreg-0.4.orig/doregister.php webreg-0.4/doregister.php
--- webreg-0.4.orig/doregister.php      2005-06-13 04:03:29.000000000 +0200
+++ webreg-0.4/doregister.php   2006-01-21 19:52:45.000000000 +0100
@@ -29,6 +29,34 @@
 
 require("class.jabber.php");
 
+class SRVConnector extends CJP_StandardConnector {
+       function OpenSocket($server, $port) {
+               if (function_exists("dns_get_record")) {
+                       $record = dns_get_record("_xmpp-client._tcp.$server", 
DNS_SRV);
+                       if (!empty($record)) {
+                               $server = $record[0]["target"];
+                               $port = $record[0]["port"];
+                       }
+               } else {
+                       switch ($server) {
+                       case "gmail.com":
+                               $server = "talk.google.com";
+                               break;
+                       }
+               }
+
+               if (($this->active_socket = @fsockopen("tls://$server", $port))
+                       || ($this->active_socket = @fsockopen("ssl://$server", 
$port + 1))
+                       || ($this->active_socket = @fsockopen($server, $port))) 
{
+                       socket_set_blocking($this->active_socket, 0);
+                       socket_set_timeout($this->active_socket, 31536000);
+
+                       return TRUE;
+               } else {
+                       return FALSE;
+               }
+       }
+}
 
 // Globals
 $tmp = explode("@", $_POST['jid']);
@@ -59,6 +87,7 @@
 $JABBER->password      = $jpassword;
 $JABBER->resource      = "TransportRegister";
 //$JABBER->enable_logging      = TRUE;
+$JABBER->connection_class      = "SRVConnector";
 $JABBER->Connect() or die("Couldn't connect to your Jabber server. Please 
check your Jabber ID.");
 $JABBER->SendAuth() or die("Couldn't authenticate with your Jabber server. 
Please check your Jabber ID and Jabber password.");
 $JABBER->SendPresence(NULL, NULL, NULL, NULL, 1000);
diff -ur webreg-0.4.orig/form.php webreg-0.4/form.php
--- webreg-0.4.orig/form.php    2005-05-29 02:19:00.000000000 +0200
+++ webreg-0.4/form.php 2006-01-21 19:52:45.000000000 +0100
@@ -10,7 +10,7 @@
 <td><label for="gatewaytype">Service:</label></td>
 <td>
 <select id="gatewaytype" name="gatewaytype">
-<?
+<?php
        foreach($gateways as $gwname => $jid) {
                $gwnameu = strtoupper($gwname);
                print "<option value='$gwname'>$gwnameu</option>\n";
diff -ur webreg-0.4.orig/index.php webreg-0.4/index.php
--- webreg-0.4.orig/index.php   2005-05-29 02:19:03.000000000 +0200
+++ webreg-0.4/index.php        2006-01-21 19:52:45.000000000 +0100
@@ -16,7 +16,7 @@
 
 <hr>
 
-<?
+<?php
 include("form.php");
 ?>
 
diff -ur webreg-0.4.orig/register.php webreg-0.4/register.php
--- webreg-0.4.orig/register.php        2005-05-29 02:19:03.000000000 +0200
+++ webreg-0.4/register.php     2006-01-21 19:52:45.000000000 +0100
@@ -10,7 +10,7 @@
 
 <h1 class="registering">Jabber Transport Registration</h1>
 
-<?
+<?php
 include("doregister.php");
 ?>
 
From [EMAIL PROTECTED]  Sun Jan 22 02:48:33 2006
From: [EMAIL PROTECTED] (Laurent Dinclaux)
Date: Sun Jan 22 02:48:38 2006
Subject: [py-transports] install problem
Message-ID: <[EMAIL PROTECTED]>

Hello

I am running centos 4.2 and latest wildfire.

I have installed pymsnt according to the documentation but it seems
not to start properly:

./PyMSNt &
[1] 10939
[EMAIL PROTECTED] PyMSNt]# WARNING! Only PNG avatars will be understood
by this transport. Please install the Python Imaging Library.
/usr/lib/python2.3/site-packages/twisted/words/__init__.py:21:
UserWarning: twisted.words will be undergoing a rewrite at some point
in the future.
  warnings.warn("twisted.words will be undergoing a rewrite at some
point in the future.")
Traceback (most recent call last):
  File "src/main.py", line 23, in ?
    import xdb
  File "/usr/local/PyMSNt/src/xdb.py", line 10, in ?
    import legacy
  File "/opt/pymsnt/src/legacy/__init__.py", line 4, in ?
  File "/opt/pymsnt/src/legacy/glue.py", line 7, in ?
  File "/opt/pymsnt/src/tlib/msn.py", line 107, in ?
ImportError: cannot import name ClientContextFactory


Best regards

--
Laurent Dinclaux
[EMAIL PROTECTED]
Tel: +687 84 92 72
From [EMAIL PROTECTED]  Sun Jan 22 08:35:05 2006
From: [EMAIL PROTECTED] (James Bunton)
Date: Sun Jan 22 08:35:25 2006
Subject: [py-transports] install problem
In-Reply-To: <[EMAIL PROTECTED]>
References: <[EMAIL PROTECTED]>
Message-ID: <[EMAIL PROTECTED]>

You need to install pycrypto and pyopenssl

Please have a look at 
http://msn-transport.jabberstudio.org/docs/server.html for details.

---

James



On 22/01/2006, at 1:48 PM, Laurent Dinclaux wrote:

> Hello
>
> I am running centos 4.2 and latest wildfire.
>
> I have installed pymsnt according to the documentation but it seems
> not to start properly:
>
> ./PyMSNt &
> [1] 10939
> [EMAIL PROTECTED] PyMSNt]# WARNING! Only PNG avatars will be understood
> by this transport. Please install the Python Imaging Library.
> /usr/lib/python2.3/site-packages/twisted/words/__init__.py:21:
> UserWarning: twisted.words will be undergoing a rewrite at some point
> in the future.
>   warnings.warn("twisted.words will be undergoing a rewrite at some
> point in the future.")
> Traceback (most recent call last):
>   File "src/main.py", line 23, in ?
>     import xdb
>   File "/usr/local/PyMSNt/src/xdb.py", line 10, in ?
>     import legacy
>   File "/opt/pymsnt/src/legacy/__init__.py", line 4, in ?
>   File "/opt/pymsnt/src/legacy/glue.py", line 7, in ?
>   File "/opt/pymsnt/src/tlib/msn.py", line 107, in ?
> ImportError: cannot import name ClientContextFactory
>
>
> Best regards
>
> --
> Laurent Dinclaux
> [EMAIL PROTECTED]
> Tel: +687 84 92 72
> _______________________________________________
> py-transports mailing list
> py-transports@blathersource.org
> http://www.modevia.com/cgi-bin/mailman/listinfo/py-transports
>

Reply via email to