[asterisk-users] handling jabber status

Matthew Gibson mattgibson.ca at gmail.com
Mon Jun 9 13:36:41 CDT 2008


Hi Philippe,

On Wed, Jun 4, 2008 at 7:36 AM, Philippe Sultan <philippe.sultan at gmail.com>
wrote:

> Hi Matt,
>
> On Wed, Jun 4, 2008 at 1:05 AM, Matthew Gibson <mattgibson.ca at gmail.com>
> wrote:
> > I'd be interested to know more about the status abilities as well, we've
> > tried to test jabberstatus application, but it doesn't seem to function
> as
> > we expect, it should be returning 0,1,2,3,4,5 based on users current
> status,
> > but switching to away doesn't seem to change it from 0 to 2 .. .
> >
> > this could be an interesting thread :)
>
> JabberStatus is supposed to retrieve the XMPP status of a buddy, and
> store it in a diaplan variable. I just tested it on my Asterisk (1.6)
> server.
>
> Here is an example of how to use it :
>
> 1234 => {
>          JabberStatus(asterisk-gmail,buddy at gmail.com,STATUS);
>          if (${STATUS}=1) {
>                    NoOp(User is online and active, ring his Gtalk client.);
>                    Dial(Gtalk/asterisk-gmail/buddy at gmail.com);
>          } else {
>                    NoOp(Prefer the SIP phone);
>                    Dial(SIP/1234);
>          }
> }
>
> Matt, if you're experiencing some problems with this application, for
> example on a 1.4 system, do not hesitate to file a bug report.
>


Thanks for the snippet, I re-wrote it (badly) for regular extensions.conf
usage, and verified it's also working here on 1.6, though I do get a warning
about JabberStatus being depreciated.

-- 
Thanks,

Matt Gibson
http://www.voipphreak.ca
http://www.mattgibson.ca
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20080609/982fa508/attachment.htm 


More information about the asterisk-users mailing list