Send/receive text messages to buddies

Some weeks ago I’ve implemented the option to send a text message from telepathy-resiprocate Empathy. At that time I just implemented it at apps/telepathy/TextChannel class which wasn’t the ideal. Now, with a better understand of the resip/recon and resip/dum APIs, I was able to move this implementation there.

Besides that I also have implemented the option to receive a text message. For that I have done some changes at resip/recon/ConversationManager and resip/recon/UserAgent classes, along some other.

The complete changes could be seen at [1]. This branch also holds modifications related to send/receive presence. This is necessary since to send a message to a contact he/she should be online.

There is still work to be done specially checking the possible error cases but at least we could see a first prototype working. Follow some images:

Account logged in with Jitsi



Account logged in with Empathy using telepathy-resiprocate



Get presence from buddies


Now it’s also implemented the functionality that allows a user to see his contacts presence. At first week I’ve implemented only the Telepathy part of this methods and back then I didn’t comprehend that this information would come in the form of a NOTIFY SIP message. I also needed to use the SUBSCRIPTION mechanism properly so the presence server could send me the NOTIFY message.

To be able to create those messages was necessary a better understanding of resip/stack, resip/recon and resip/dum API’s.  Not that I master this libraries now, but at least I’m not totally lost anymore =)

Looking into this libraries I could see how much work was done by all of resiprocate contributors (and I imagine I don’t even saw the tip of the iceberg). There is so many features ready for use that now I think twice before start implementing something.

Since I didn’t find any reference explicitly showing the contact’s status in RFC3863 [1], I got this information by changing a contact presence (in a different machine logged in Jitsi [2]) and looking into the NOTIFY message received at resiprocate.

Follow some images about contact’s presence at Empathy:


Online status



Offline status
status_Busy (DND)
Busy – DND status
Away status
status_In a meeting
In a meeting status
Unknow status



Buddy List – resiprocate

I have created the possibility of adding/removing contacts from a list. At this point the contacts are stored in a local file but we will change that later when we will get the contacts info from server.

When a contact is added to the buddy list, it’s stored in the mHandles and mIdentifiers hash and also copied to the file. When a contact is deleted, it is only removed from the file. It’s not very efficient but since we will change this way of storing the contacts later it’s not a big problem.

To initialize the buddy list and actually see it on Empathy it was necessary to set the contact list state interface to success (which took me several hours to find out).