bettybop68 / android-rcs-ims-stack

Automatically exported from code.google.com/p/android-rcs-ims-stack
0 stars 1 forks source link

Client fails to parse NOTIFY xml sent in response to a presence subscribe #88

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. RCS Client send a subscribe for event=presence to the presence server
2. Presence Server receives a subscribe and responds with a 200 OK 
3. Presence Server sends back a multipart Notify in response to the subscribe. 
Client fails to successfully parse the NOTIFY

12-10 10:57:44.085 I/System.out( 1385): <<< NOTIFY sip:10.50.0.47:5060 SIP/2.0

12-10 10:57:44.085 I/System.out( 1385): Via: SIP/2.0/TCP 
defaultsmsc.com;branch=z9hG4bK212221918648013289;received=10.50.4.122;rport=5060

12-10 10:57:44.085 I/System.out( 1385): From: 
<sip:2243557462@10.50.4.122;pres-list=rcs>;tag=212221918648013293

12-10 10:57:44.085 I/System.out( 1385): To: 
<sip:2243557462@10.50.4.122>;tag=KIDwFuTkAA

12-10 10:57:44.085 I/System.out( 1385): Call-ID: KIDwFuTjAA@10.50.0.47

12-10 10:57:44.085 I/System.out( 1385): CSeq: 1 NOTIFY

12-10 10:57:44.085 I/System.out( 1385): Contact: 
<sip:defaultsmsc.com>;transport=tcp

12-10 10:57:44.085 I/System.out( 1385): Max-Forwards: 70

12-10 10:57:44.085 I/System.out( 1385): Event: presence

12-10 10:57:44.085 I/System.out( 1385): Subscription-State: active;expires=3600

12-10 10:57:44.085 I/System.out( 1385): Require: eventlist

12-10 10:57:44.085 I/System.out( 1385): Content-Type: 
multipart/related;type="application/rlmi+xml";start="PRES45235@pres.ics.com";bou
ndary="50UBfW7LSCVLtggUPe5z"

12-10 10:57:44.085 I/System.out( 1385): Content-Length: 1248

12-10 10:57:44.085 I/System.out( 1385): 

12-10 10:57:44.085 I/System.out( 1385): --50UBfW7LSCVLtggUPe5z

12-10 10:57:44.085 I/System.out( 1385): Content-Transfer-Encoding: binary

12-10 10:57:44.085 I/System.out( 1385): Content-ID: PRES45235@pres.ics.com

12-10 10:57:44.085 I/System.out( 1385): Content-Type: 
application/rlmi+xml;charset="UTF-8"

12-10 10:57:44.085 I/System.out( 1385): 

12-10 10:57:44.085 I/System.out( 1385): <?xml version="1.0" 
encoding="UTF-8"?><list xmlns="urn:ietf:params:xml:ns:rlmi" 
uri="sip:2243557462@10.50.4.122;pres-list=rcs" version="0" 
fullState="true"><resource uri = 
"sip:2243557462@10.50.4.122"><name>Presence</name><instance 
id="212221918648013327" state="active" 
cid="PRES36498@pres.ics.com"></instance></resource></list>

12-10 10:57:44.085 I/System.out( 1385): 

12-10 10:57:44.092 I/System.out( 1385): --50UBfW7LSCVLtggUPe5z

12-10 10:57:44.092 I/System.out( 1385): Content-Transfer-Encoding: binary

12-10 10:57:44.092 I/System.out( 1385): Content-ID: PRES47201@pres.ics.com

12-10 10:57:44.092 I/System.out( 1385): Content-Type: 
application/pidf+xml;charset="UTF-8"

12-10 10:57:44.092 I/System.out( 1385): 

12-10 10:57:44.092 I/System.out( 1385): <?xml version="1.0" 
encoding="UTF-8"?><presence xmlns="urn:ietf:params:xml:ns:pidf" 
xmlns:op="urn:oma:xml:prs:pidf:oma-pres" xmlns:opd="urn:oma:xml:pde:pidf:ext" 
xmlns:pdm="urn:ietf:params:xml:ns:pidf:data-model" 
xmlns:ci="urn:ietf:params:xml:ns:pidf:cipid" 
xmlns:rpid="urn:ietf:params:xml:ns:pidf:rpid" 
entity="sip:2243557462@10.50.4.122"><pdm:person 
id="p1"><op:overriding-willingness><op:basic>open</op:basic></op:overriding-will
ingness><ci:homepage>favorite link</ci:homepage><pdm:note>free 
text</pdm:note><pdm:timestamp>2012-12-10T16:57:28.000Z</pdm:timestamp></pdm:pers
on></presence>

12-10 10:57:44.092 I/System.out( 1385): --50UBfW7LSCVLtggUPe5z--

Contents received by the client.

Error issued by the client:
12-10 10:57:44.147 V/[RCS][PresenceSubscribeManager]( 1385): New presence 
notification received

12-10 10:57:44.147 E/[RCS][PresenceSubscribeManager]( 1385): Can't parse PIDF 
notification

12-10 10:57:44.147 W/System.err( 1385): java.lang.NullPointerException

12-10 10:57:44.147 W/System.err( 1385):     at 
com.orangelabs.rcs.core.ims.service.presence.PresenceSubscribeManager.receiveNot
ification(PresenceSubscribeManager.java:157)

12-10 10:57:44.155 W/System.err( 1385):     at 
com.orangelabs.rcs.core.ims.service.ImsServiceDispatcher.dispatchNotify(ImsServi
ceDispatcher.java:408)

12-10 10:57:44.155 W/System.err( 1385):     at 
com.orangelabs.rcs.core.ims.service.ImsServiceDispatcher.dispatch(ImsServiceDisp
atcher.java:308)

12-10 10:57:44.155 W/System.err( 1385):     at 
com.orangelabs.rcs.core.ims.service.ImsServiceDispatcher.run(ImsServiceDispatche
r.java:111)

What is the expected output? What do you see instead?
Client is erring on the pidf+xml parsing

What version of the product are you using? On what operating system?
Version 1.2 Release 2.4.8 on Android 2.2.3

Please provide any additional information below.

Original issue reported on code.google.com by sangeeta...@gmail.com on 10 Dec 2012 at 6:49

GoogleCodeExporter commented 8 years ago
Hi

While trying for Adhoc-group chat, I found that this knd of problem can occur 
when:
1 SIP Notify length was long and it was fragmented
or
2 SIP Notify xml content is not properly formatted.. counter-check with the 
specs

Original comment by sharique...@gmail.com on 21 Dec 2012 at 1:48

GoogleCodeExporter commented 8 years ago
So it's a network issue.

Original comment by jmauffret@gmail.com on 27 Dec 2012 at 12:36

GoogleCodeExporter commented 8 years ago
Hi,
I am also facing similar issue in the SIP NOTIFY xml (but for 
application/pidf+xml). The guy discussing above about the FORMAT issue seems 
talking about SIP NOTIFY in Group chat but not in Presence based Capability 
discovery.

What steps will reproduce the problem?
1. Enable the JOYN client service from the app.
2. JOYN client will send SIP REGISTER, SIP SUBSCRIBE (for watcher) and SIP 
SUBSCRIBE (for presence based capability discovery with the Event: presence). 
Finally, the SIP PUBLISH.
3. First time, capability discovery is done by using SIP OPTIONS which will 
enable some capabilities in GUI.
4. After polling period is expired, JOYN client will send SIP SUBSCRIBE (with 
event= presence) to discover the capabilities again.
5. Presence Server will generate SIP NOTIFY with XML carrying the Service IDs 
for different capabilities.

What is the expected output? What do you see instead?
1. Capabilities discovered by SIP NOTIFY should be updated in GUI. But 
actually, when SIP NOTIFY is sent:
a: With XML without gzip compression, all capabilities (previously discovered 
by SIP OPTIONS) become disable except Presence Discovery on the phone GUI.
b: With XML with gzip compression, no change is seen on the phone GUI and all 
capabilities (previously discovered by SIP OPTIONS) remain unchanged.

What version of the product are you using? On what operating system?
RCSe Stack Release version 2.5.10 on Android version 4.0.4

Please provide any additional information below.
It seems that JOYN client is not parsing the Service IDs inside the SIP NOTIFY 
XML correctly. 

Wireshark logs are attached both for UnCompressed and GZIP compressed XML 
payload of SIP NOTIFY.

Original comment by aamer.78...@gmail.com on 10 Oct 2013 at 3:40

Attachments: