extracting presence info

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello all,

I am working on the presence feature of an iPhone/iPad client. I am able to
subscribe to a users presence service and get notifications. From
on_buddy_state() i get callback with the information of
info.status_text.ptr and info.sub_state_name.

But this information is limited to ONLINE and OFFLINE.

I would like to extract the AWAY, DND and custom presence messages.

For example from a desktop sip client i have changed my presence to a
custom note : "IWANTTOSEETHIS", this notify arrives to my pjsip client but
i dont know the command to extract this info from the XML.

There must a function for this right??

Thank you very much in advance,

Aytunc Isseven

 16:31:09.743   pjsua_core.c  RX 1334 bytes Request msg NOTIFY/cseq=3631
(rdata0xa2cc14) from UDP 213.194.94.113:5060:
NOTIFY sip:aisseven at 176.30.125.179:5060 SIP/2.0
From: "u1056"<sip:u1056@xxxxxxxxxxxx>;tag=1323337852894
To: "aisseven"<sip:aisseven at netas.com>;tag=UagLU9zbKRviaHHD19nfj-Pn6OBBIFTY
Call-ID: l187TqeIzsaE8reQ4mr0vvqgJQnZYo4A
CSeq: 3631 NOTIFY
Via: SIP/2.0/UDP 213.194.94.113:5060;branch=z9hG4bK-1bfb12-6d4cbf35-5c97eb11
Content-Type: application/pidf+xml
Contact: <sip:u1056 at demosip1.com:5060;maddr=213.194.94.113>
User-Agent:  Nortel SESM 14.0.0.5
Max-Forwards: 20
Supported:
com.nortelnetworks.firewall,p-3rdpartycontrol,nosec,join,x-nortel-sipvc,com.nortelnetworks.im.encryption
Subscription-Expires: 417
Event: presence
Subscription-State: active;expires=417
Content-Length: 637

<?xml version="1.0" encoding="UTF-8"?>
<presence xmlns="urn:ietf:params:xml:ns:pidf"
 xmlns:dm="urn:ietf:params:xml:ns:pidf:data-model"
 xmlns:rp="urn:ietf:params:xml:ns:pidf:rpid"
entity="pres:u1056 at demosip1.com">
<tuple
id="l187TqeIzsaE8reQ4mr0vvqgJQnZYo4A:UagLU9zbKRviaHHD19nfj-Pn6OBBIFTY:1323337852894-0">
<status>
<basic>open</basic>
</status>
<rp:class>Summary</rp:class></tuple>
<dm:person
id="l187TqeIzsaE8reQ4mr0vvqgJQnZYo4A:UagLU9zbKRviaHHD19nfj-Pn6OBBIFTY:1323337852894-1">
<status>
<basic>open</basic>
</status>
<rp:activities>
<rp:other>IWANTTOSEETHIS</rp:other>
</rp:activities>
</dm:person>
</presence>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20111222/6677b808/attachment.html>


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux