[JEP-0100] registering with a gateway

Hi,

I am adding to an SMS chat API a package to use a gateway to a foreign IM network thanks to an XMPP server. As a consequence, I am relying on JEP-0100 (http://www.jabber.org/jeps/jep-0100.html#usecases-jabber-register) to use the gatways.

I thought it must be simple since I only have to follow the steps… but I got a problem with the registering method.

Indeed, the method pass successfully the 8 fist steps and then stop because it never receives a packet from the gateway even if it sends it a <presence type=’‘subscribe’’/> packet… I cannot understand why the gateway never send a stanza but, what is worst, I do not know what to do to sort out this problem… Does some one have an idea or an example code on how registering with a gateway with Smack?

Thanks for your help,

Seb

PS: I use an ejabberd server with PyAIM-t and PyMSN-t.

I use valid AIM and MSN accounts and gateways where tested with Psi

I sorted out several problems but I still have some :(. I am now able to use a working gateway (i.e. successfully registered with a XMPP client) but I cannot registered to the gateway.

Indeed, I succed with the registration step, the roster step and the subscription step (until step 12 of the registration use case of JEP-0100) but I am not able to log in to the gateway. The log file of the gateway confirm the registration is successful and the user is logged in but I never receive the presence stanza that should confirm the “log in” step.

So, I used Smack’'s debugger and I noticed that sometimes the XMPP packets where not listed in the same order I wanted to send them in my code. I was wondering if it was a display problem or if Smack has a particular buffering system that could explain this problem. IMO it could explain that the gateway could be blocked in a state waiting for a Packet it has already received but not treated… Another explanation could be that Smack does not consider gateway JIDs (gateway.host) as regular JIDs and rejects XMPP packets in some particular cases.

Does anyone experienced such a problem? (and if you have examples of registering method, feel free to point out where to find them)

Regards,

Seb

Hey Seb,

Smack uses a queue (FIFO) for sending the packets and the debugger works at the writer level. Therefore, I guess that the problem may be at the application level.

If I’'m not wrong JBother, that is a client built on top of Smack, has support for gateways. Since the code is url=http://www.jbother.org/index.rb?command=downloadavailable[/url] for download you may want to use it and check which is the difference.

Let us know how it goes.

Regards,

– Gato

Hi Gato,

I downloaded the latest cvs version of PyMSN-t and it works better. Indeed, it seems that Py* transports do not support easily automated tests… As a consequence, I suppose some quick requests sequence creates undefined states.

But I am going to have a look at JBother source codes (if someone knows this code, any idea where to find gateways classes and method in that code?) and check if I missed something in mine

Thanks,

Seb

That code would be in com.valhalla.jbother.RegistrationForm.java