dvoina / imsdroid

Automatically exported from code.google.com/p/imsdroid
0 stars 0 forks source link

How to response NOTIFY? #136

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.I want to response any NOTIFY,not only produced after SUBSCRIBE,but also some 
other event.
2.For example,after sending PUBLISH message,Server will send NOTIFY,and how can 
I response this NOTIFY? This NOTIFY is not sent after SUSCRIBE. 
3.

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?
IMSDroid 1.1.343   on Android 2.2

Please provide any additional information below.

Original issue reported on code.google.com by nieyaol...@gmail.com on 29 Dec 2010 at 12:08

GoogleCodeExporter commented 9 years ago
Right now it's not possible to respond to a NOTIFY request as the stack will 
automatically send a 200 OK if all is OK. It's easy to patch doubango to allow 
this scenario.
Could you please provide more information about your use case?

Original comment by boss...@yahoo.fr on 4 Jan 2011 at 4:04

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
B is A's watcher.When A publish A's presence infomation,then B will receive a 
NOTIFY which has A's PUBLISH presence info. I want to get A's new presence info 
from NOTIFY message.
How to do?

Original comment by twbc.cla...@gmail.com on 4 Jan 2011 at 4:46

GoogleCodeExporter commented 9 years ago
final MySubscriptionSession subToA = 
ServiceManager.getSipService().createPresenceSession("sip:A@doubango.org", 
EVENT_PACKAGE_TYPE.PRESENCE);
subToA.subscribe();

From "SipService::OnSubscriptionEvent(SubscriptionEvent e)" watch for 
"tsip_i_notify" event. To check that it's the notify tied to the SUBSCRIBE 
request sent for A:
"e.getSession() == subToA.getId()"

Original comment by boss...@yahoo.fr on 4 Jan 2011 at 4:55

GoogleCodeExporter commented 9 years ago
NOTIFY message is sent by Server.
Will SipService::OnSubscriptionEvent(SubscriptionEvent e) also be called?

A--PUBLISH-->Server--NOTIFY-->B

Original comment by twbc.cla...@gmail.com on 4 Jan 2011 at 5:02

GoogleCodeExporter commented 9 years ago
The process as follow.
UE#2 will receive a NOTIFY from Server.No subscribe.

Original comment by twbc.cla...@gmail.com on 4 Jan 2011 at 5:06

Attachments:

GoogleCodeExporter commented 9 years ago
off course. If you receive a NOTIFY request the stack will call this function 
(asynchronously) before sending the 200 OK.

Original comment by boss...@yahoo.fr on 4 Jan 2011 at 5:07

GoogleCodeExporter commented 9 years ago
Thank you very much!btw,Why is "off course" rather than "of course".

Original comment by twbc.cla...@gmail.com on 4 Jan 2011 at 5:15

GoogleCodeExporter commented 9 years ago
I don't follow you. The UE should never receive a SUBSCRIBE message it only get 
a NOTIFY from the server. When IMSdroid receives SUBSCRIBEs from a remote peer 
it will ignore them.

Original comment by boss...@yahoo.fr on 4 Jan 2011 at 5:16

GoogleCodeExporter commented 9 years ago
You mean that as long as UE receive a 
NOTIFY,SipService::OnSubscriptionEvent(SubscriptionEvent e) will be called? UE 
do not send a SUBSCRIBE.

Original comment by twbc.cla...@gmail.com on 4 Jan 2011 at 5:22

GoogleCodeExporter commented 9 years ago
To receive a NOTIFY you MUST send a SUBSCRIBE.

Original comment by boss...@yahoo.fr on 4 Jan 2011 at 5:39

GoogleCodeExporter commented 9 years ago
The NOTIFY is produced and sent by server.
A publish his presence info.B will receive a NOTIFY from server 
automatically.Before B receives this NOTIFY,B do not SUBSCRIBE.B is 
notified,not subscribe.
This case,SipService::OnSubscriptionEvent(SubscriptionEvent e) will be called? 

Original comment by twbc.cla...@gmail.com on 4 Jan 2011 at 5:52

GoogleCodeExporter commented 9 years ago
yep

Original comment by boss...@yahoo.fr on 11 Jan 2011 at 12:52