[ejabberd] Change jabber users Presence externally from another application

Kirk Bateman kirk.bateman at gmail.com
Tue Jul 31 10:51:27 MSK 2012


Looks to me (from a quick read), that the client doesn't need to implement
it as the server (with shared-status extension) would override any status
set by pidgin etc to what is set by your script.

So, I think that most clients will possibly update their own displayed
presence if they receive a presence claiming to be from themselves
(hopefully).

Any implementation on ejabberd would need to handle the iq get and set for
the shared list but also hook into the presence receive from clients to
override them (probably a job for some Erlang)

Regards

Kirk Bateman
On 31 Jul 2012 04:07, <duane.larson at gmail.com> wrote:

> So you think if I implement this extension with sleekxmpp or jaxl most
> XMPP clients (pidgin, PSI, Jitsi, etc) will not have any issue with the
> "xmlns='google:shared-status'" extension? Or does the client need to
> support it?
>
>
>
> On , Kirk Bateman <kirk.bateman at gmail.com> wrote:
> > Duane,
> >
> > An implementation of Google's shared status extension would allow you to
> do what you need.
> >
> > https://developers.google.com/talk/jep_extensions/shared_status
> >
> > Then you could have your script override the status from pidgin, I think
> you would also need to have a script change the status again at the end of
> the call.
> >
> > I quite like the idea of their extension, might look at implementing for
> ejabberd if there isn't already one.
> >
> > Regards
> >
> > Kirk Bateman
> >
> > On 30 Jul 2012 21:35, "Duane Larson" duane.larson at gmail.com> wrote:
> >
> > I have more info.  I was able to get this to work but here is the issue.
> >
> > For the script using the API I set my show to "dnd" and status to "On
> Phone".  I also had to set the Presence Priority to a number higher than
> what my pidgin client is set to.  So Pidgin has a priority of 5 so I set
> the scripts priority to 6.  This worked and my buddy was able to see that
> the guy is DND and On Phone.  The problem now is if someone still tries to
> instant message the user that is On Phone and DND.  Now that my script has
> a higher priority all messages go to it.  This isn't desired since it is
> just a script and even though the user is on the phone I would still want
> to chat with someone especially if the users are on the same call and want
> to chat about the call.
> >
> >
> >
> >
> >
> > Any ideas?
> >
> >
> > On Mon, Jul 30, 2012 at 1:53 PM, Duane Larson duane.larson at gmail.com>
> wrote:
> >
> >
> >
> >
> > Well my first attempt didn't work.  I guess if you have
> test.user at domainA.com/pidgin logged in and his presence set to
> "Available" and then when I execute a script that sets test.user at domainA.com/Blah
> presence to Status = "On Phone"/Show = "dnd" then anyone that is a buddy of
> his will not see his status change to dnd and On Phone.  The only time it
> works is if test.user at domainA.com/pidgin has set his status to "away"
> then if I set the presence to "dnd" the buddy sees the status change.
> >
> >
> >
> >
> >
> >
> >
> > So I am guessing this is how XMPP should work.  So changing the Presence
> I guess isn't the route I want to go.
> >
> > Then I heard about User Activity
> > I'm trying to use the
> > http://xmpp.org/extensions/xep-0108.html
> >
> >
> >
> >
> >
> >
> > extension and it doesn't seem to be working.
> >
> > I basically send the following stanza to ejabberd
> > type='set'
> >
> >
> >     from='juliet at capulet.lit/ca486eba-0f9a-11dc-8835-000bcd821bfb'
> >     id='publish1'>
> >
> >
> >
> >
> >
> >
> >   xmlns='http://jabber.org/protocol/pubsub'>
> >
> >
> >
> >
> >
> >
> >     node='http://jabber.org/protocol/activity'>
> >
> >
> >
> >
> >
> >
> >
> >         xmlns='http://jabber.org/protocol/activity'>
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >           xml:lang='en'>My nurse's birthday!
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > Here is what I see on the ejabberd server
> >
> > The user setting his "User Activity" is duane.larson at ae.com and the
> buddy bob.test at ae.com should be the one that sees the update but doesn't
> >
> >
> >
> >
> >
> >
> >
> > T 2012/07/30 13:40:28.045500 50.XX.XX.54:35105 -> 184.xxx.xxx.30:5222
> [AP]
> > duane.larson at ae.com' id='publish1'>http://jabber.org/protocol/pubsub'>
> http://jabber.org/protocol/activity'>activity xmlns='
> http://jabber.org/protocol/activity'>partying/>My nurse's birthday!item>
> >
> >
> >
> >
> >
> >
> > ##
> > T 2012/07/30 13:40:28.095566 184.xxx.xxx.30:5222 -> 50.XX.XX.54:35105
> [AP]
> > duane.larson at ae.com' to='duane.larson at ae.com/jaxl.1.1343673627'
> id='publish1' type='result'>http://jabber.org/protocol/pubsub'>
> http://jabber.org/protocol/activity'>
> >
> >
> >
> >
> >
> >
> > #
> > T 2012/07/30 13:40:28.095650 184.xxx.xxx.30:5222 -> 50.XX.XX.54:35105
> [AP]
> > duane.larson at ae.com' to='duane.larson at ae.com/jaxl.1.1343673627'
> type='headline'>http://jabber.org/protocol/pubsub#event'>
> http://jabber.org/protocol/activity'>http://jabber.org/protocol/activity'>partying/>My
> nurse's birthday!item>addresses xmlns='http://jabber.org/protocol/address
> '>duane.larson at ae.com/jaxl.1.1343673627'/>message>
> >
> >
> >
> >
> >
> >
> > ##
> > T 2012/07/30 13:40:34.033334 216.12.249.203:60207 ->
> 184.xxx.xxx.30:5222 [AP]
> >
> >
> >
> >
> >
> >
> >
> > #
> > T 2012/07/30 13:40:34.033687 184.xxx.xxx.30:5222 -> 216.XX.XX.203:60207
> [AP]
> > duane.larson at ae.com' to='duane.larson at ae.com/Work' type='error'
> id='purple8d799f70'>unavailable
> xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > On Thu, Jul 26, 2012 at 1:00 PM, Duane Larson duane.larson at gmail.com>
> wrote:
> >
> >
> >
> >
> >
> >
> > I'm trying to read over
> >
> http://oriolrius.cat/blog/wp-content/uploads/2009/10/Oreilly.XMPP.The.Definitive.Guide.May.2009.pdf
> >
> >
> >
> >
> >
> >
> >
> >
> > and tell me if this could work
> >
> > Write a script that will do the following
> > Log on xmpp:user at domainA.com/deskphoneOpen session with ejabberd server
> for xmpp:user at domainA.com/deskphoneSet Presence to the following
> deskphone">
> >
> >
> >
> >
> >
> >
> >
> >
> >                                                dnd
> >                                                On Phone
> >
> >
> >
> >
> >
> >
> >
> >
> > Close session with ejabberd ser for xmpp:user at domainA.com/deskphone
> >
> >
> > I am still reading the oreilly book to see what are the caveats to doing
> this but I wanted to through it out there.
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > On Thu, Jul 26, 2012 at 10:41 AM, Aaron aarond at cmu.edu> wrote:
> >
> >
> >
> >
> >
> >
> >
> >
> > You could send an IQ "set" request to a custom namespace and handle the
> IQ  in a module by adding the device's info such as phone number (which you
> could include in the SubEl of the IQ packet) to a devices database.
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > --Aaron
> >
> >
> >
> >
> >
> >
> >
> >
> > On Thursday, July 26, 2012 11:26:00 AM, duane.larson at gmail.com wrote:
> >
> >
> >
> >
> > Yeah I've looked at the OpenSIPS XMPP module but I don't think it can
> >
> >
> > accomplish what I am wanting to do. I think the OpenSIPS XMPP module
> >
> >
> > just allows a SIP user to communicate with an XMPP user. So DomainA
> >
> >
> > would be a SIP IM domain and their SIP SIMPLE client could send
> >
> >
> > instant messages directly to DomainB which is an XMPP domain and XMPP
> >
> >
> > clients.
> >
> >
> >
> >
> >
> > Any ideas on how to tie a JID to a phone number account?
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > I just found this page
> >
> >
> > http://xmpp.org/xmpp-software/libraries/
> >
> >
> >
> >
> >
> > I will look at some of these libraries and see if one of them can
> >
> >
> > accomplish what I am looking at doing. But once again if someone has
> >
> >
> > already done something like this I'd love to hear about it.
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > On , Gavin Henry ghenry at surevoip.co.uk> wrote:
> >
> >
> > > > Hey Gavin,
> >
> >
> > >
> >
> >
> > >
> >
> >
> > >
> >
> >
> > > Hi Duane,
> >
> >
> > >
> >
> >
> > >
> >
> >
> > >
> >
> >
> > > > Thanks for the reply.  I use OpenSIPs and have different options
> >
> >
> > when it
> >
> >
> > >
> >
> >
> > > > comes to executing a script from within OpenSIPS when a user is on
> >
> >
> > a call.
> >
> >
> > >
> >
> >
> > > > It will be a multidomain installation.
> >
> >
> > >
> >
> >
> > >
> >
> >
> > >
> >
> >
> > > That's good. You just need to tie their number to a JID.
> >
> >
> > >
> >
> >
> > >
> >
> >
> > >
> >
> >
> > > > I'm not familiar with any RESTful api.  Do you have more details?
> >
> >
> >  I came
> >
> >
> > >
> >
> >
> > > > across a java api called smack last night and also a perl module
> >
> >
> > called
> >
> >
> > >
> >
> >
> > > > anyevent::xmpp.  I will look into those more but if you have any
> >
> >
> > hints or
> >
> >
> > >
> >
> >
> > > > experience in doing this I would love to hear.
> >
> >
> > >
> >
> >
> > >
> >
> >
> > >
> >
> >
> > > You can add OpenSIPS as a component to ejabberd but it's only one
> >
> >
> > >
> >
> >
> > > domain I think.
> >
> >
> > >
> >
> >
> > >
> >
> >
> > >
> >
> >
> > > Check the OpenSIPS XMPP module and http://www.ejabberd.im/mod_restful
> >
> >
> > >
> >
> >
> > >
> >
> >
> > >
> >
> >
> > > Thanks.
> >
> >
> > >
> >
> >
> > >
> >
> >
> > >
> >
> >
> > > --
> >
> >
> > >
> >
> >
> > > Kind Regards,
> >
> >
> > >
> >
> >
> > >
> >
> >
> > >
> >
> >
> > > Gavin Henry.
> >
> >
> > >
> >
> >
> > > Managing Director.
> >
> >
> > >
> >
> >
> > >
> >
> >
> > >
> >
> >
> > > T +44 (0) 1224 900123
> >
> >
> > >
> >
> >
> > > M +44 (0) 7930 323266
> >
> >
> > >
> >
> >
> > > F +44 (0) 1224 824887
> >
> >
> > >
> >
> >
> > > E ghenry at surevoip.co.uk
> >
> >
> > >
> >
> >
> > >
> >
> >
> > >
> >
> >
> > > http://www.surevoip.co.uk/
> >
> >
> > >
> >
> >
> > >
> >
> >
> > >
> >
> >
> > > Suretec Systems T/A SureVoIP is a limited company registered in
> >
> >
> > >
> >
> >
> > > Scotland. Registered
> >
> >
> > >
> >
> >
> > > number: SC258005. Registered office: 24 Cormack Park, Rothienorman,
> >
> >
> > Inverurie,
> >
> >
> > >
> >
> >
> > > Aberdeenshire, AB51 8GL.
> >
> >
> > >
> >
> >
> > >
> >
> >
> > >
> >
> >
> > > Subject to disclaimer at http://www.suretecgroup.com/disclaimer.html
> >
> >
> > >
> >
> >
> > >
> >
> >
> > >
> >
> >
> > > Did you see the SureVoIP API news? -
> >
> >
> > >
> >
> >
> > > http://www.surevoip.co.uk/news-events/surevoip-launches-innovative-api
> >
> >
> > >
> >
> >
> > > and http://www.surevoip.co.uk/api
> >
> >
> > >
> >
> >
> > > _______________________________________________
> >
> >
> > >
> >
> >
> > > ejabberd mailing list
> >
> >
> > >
> >
> >
> > > ejabberd at jabber.ru
> >
> >
> > >
> >
> >
> > > http://lists.jabber.ru/mailman/listinfo/ejabberd
> >
> >
> > >
> >
> >
> > >
> >
> >
> >
> >
> >
> >
> >
> >
> > _______________________________________________
> >
> >
> > ejabberd mailing list
> >
> >
> > ejabberd at jabber.ru
> >
> >
> > http://lists.jabber.ru/mailman/listinfo/ejabberd
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > _______________________________________________
> >
> >
> > ejabberd mailing list
> >
> >
> > ejabberd at jabber.ru
> >
> >
> > http://lists.jabber.ru/mailman/listinfo/ejabberd
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > --
> > --
> > *--*--*--*--*--*
> > Duane
> > *--*--*--*--*--*
> > --
> >
> >
> >
> >
> >
> > --
> > --
> > *--*--*--*--*--*
> > Duane
> > *--*--*--*--*--*
> > --
> >
> >
> >
> >
> >
> >
> >
> > --
> > --
> > *--*--*--*--*--*
> > Duane
> > *--*--*--*--*--*
> > --
> >
> >
> >
> > _______________________________________________
> >
> >
> > ejabberd mailing list
> >
> >
> > ejabberd at jabber.ru
> >
> >
> > http://lists.jabber.ru/mailman/listinfo/ejabberd
> >
> >
> >
> >
> >
> >
> >
> _______________________________________________
> ejabberd mailing list
> ejabberd at jabber.ru
> http://lists.jabber.ru/mailman/listinfo/ejabberd
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.jabber.ru/pipermail/ejabberd/attachments/20120731/e78bb61b/attachment-0001.html>


More information about the ejabberd mailing list