Bug 129059 - jabber sms transport/gateway and its contacts are always shown offline
Summary: jabber sms transport/gateway and its contacts are always shown offline
Status: RESOLVED FIXED
Alias: None
Product: kopete
Classification: Unmaintained
Component: Jabber Plugin (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Kopete Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-12 19:48 UTC by Jakub Grandys
Modified: 2006-06-14 15:41 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jakub Grandys 2006-06-12 19:48:38 UTC
Version:           0.12.0 (using KDE KDE 3.5.3)
Installed from:    Compiled From Sources
Compiler:          gcc version 4.1.1 (Gentoo 4.1.1) 
OS:                Linux

I've registered with psi in jabber sms transport (smsy.jabber.autocom.pl) and in PSI it works fine, contacts are shown online and I can send messages to them. In kopete there are two bugs:
1. I cannot register in this transport from kopete (buttons are greyed out)
2. Neither transport nor contacts are ever shown online, but I can send them messages and it works normally as they were online

I don't have such troubles with other transports only with this sms transport.
Comment 1 Olivier Goffart 2006-06-12 21:05:47 UTC
Can you tell me the name of the sms gateway.

Is there an open sms gateway so i could try ?
Comment 2 Stefan Borggraefe 2006-06-12 21:23:39 UTC
Part 1 is probably a dupe of bug 127811.
Comment 3 Jakub Grandys 2006-06-12 21:50:50 UTC
Yes it is open, I'm using gmail account to connect to it.
It is only one sms transport on jabber.autocom.pl server (you can see it in Kopete's service browser but it isn't possible to register). You can register with psi. It has many sms gateways to use (because of various phone companies) but after registration to it you can see the transport contact, it should be online but you can send to it "help" message and it will response, it means it is online.

I know that first part is a dupe of bug 127811 (I've also confirmed this bug), I wanted to tell about whole story.
What is more now I realized that transport isn't shown as a account (there is similar bug to this but with icq-transport, I've commented it)
Comment 4 Olivier Goffart 2006-06-14 10:30:59 UTC
*   use "smsy.jabber.autocom.pl"  in the server field,  you'll get sub service.
(Kopete doesn't support subservice dirrectly yet)


*  HEre is what i get when i do a disco#info on the sms gateway
<iq from="smsy.jabber.autocom.pl/WwwPlusa" type="result" ...>
<query xmlns="http://jabber.org/protocol/disco#info">
<identity category="service" type="sms" name="ApaSMSAgent - WwwPlusa" />
...

it report itself as a "service" and not as a gateway as it should.
according to http://www.jabber.org/registrar/disco-categories.html
I think that you should report the bug to the gateway itself.


* I'll hardcode that, you will tell me if it works.
Comment 5 Olivier Goffart 2006-06-14 10:32:02 UTC
SVN commit 551297 by ogoffart:

Hardcode broken identity for the sms gateway
CCBUG: 129059

 M  +10 -0     jabbercontact.cpp  


--- branches/kopete/0.12/kopete/protocols/jabber/jabbercontact.cpp #551296:551297
@@ -1548,6 +1548,16 @@
 				
 				break;  //(we currently only support gateway)
 			}
+			else if (ident.category == "service")
+			{
+				//The ApaSMSAgent is reporting itself as service (instead of gateway) which is broken.
+				//we anyway support it.  See bug  127811
+				if(ident.type == "sms")
+				{
+					is_transport=true;
+					tr_type=ident.type;
+				}
+			}
 		}
  	}
 
Comment 6 Olivier Goffart 2006-06-14 10:49:51 UTC
SVN commit 551299 by ogoffart:

consider a the 'online' status as online, even if it's noit in the XMPP RFC
BUG: 129059

 M  +10 -1     jabberprotocol.cpp   [UTF-8 ENCODING PROBLEMS]


--- branches/kopete/0.12/kopete/protocols/jabber/jabberprotocol.cpp #551298:551299
@@ -247,10 +247,19 @@
 		{
 			status = JabberKOSDND;
 		}
+		else if (resource.status ().show () == "online")
+		{ // the ApaSMSAgent sms gateway report status as "online" even if it's not in the RFC 3921 
Comment 7 Olivier Goffart 2006-06-14 10:50:13 UTC
I found also the reason why contact are offline

<presence from="smsy.jabber.autocom.pl/OrangeMbox" ... >
<show>online</show>
<priority>3</priority>
</presence>

the 'online' status in the <show/> tag is not valid according RFC3921
http://www.xmpp.org/specs/rfc3921.html#stanzas-presence

there should not be a show element for online.


Please report the bug to the gateway.   (i'll workaround it in kopete anyway)
Comment 8 Jakub Grandys 2006-06-14 15:41:17 UTC
Bug reported.
Your fixes work. Thanks a lot!