[OpenSIPS-Devel] [ opensips-Bugs-2591935 ] Error in sending NOTIFY for PUBLISH in RLS mode

SourceForge.net noreply at sourceforge.net
Fri Feb 27 12:24:58 CET 2009


Bugs item #2591935, was opened at 2009-02-12 12:01
Message generated for change (Comment added) made by rmnathan
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=2591935&group_id=232389

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: modules
Group: trunk
Status: Open
Resolution: Fixed
Priority: 5
Private: No
Submitted By: Nathan (rmnathan)
Assigned to: Anca Vamanu (anca_vamanu)
Summary: Error in sending NOTIFY for PUBLISH in RLS mode

Initial Comment:
Hi
When opensips got publish for the user(say E1_1) which has in two list subscriptions, it is sending notify to one user only.
For example:
UE2_1 list will have 2 entry uri like E1_1,E1_2
UE2_2 list will have 2 entry uri like E1_2,E1_1

S2_1 subscribe to UE2_1
S2_2 subscribe to UE2_2
If E1_1 send publish, opensips sends notify to S2_1 only. But it should send notify to S2_2 too.

Please find the attached pcap file for detailed call flow.

Regards,
rmnathan


----------------------------------------------------------------------

Comment By: Nathan (rmnathan)
Date: 2009-02-27 16:54

Message:
Hi Anca,
This issue is fixed. 
Thanks a lot.

Regards,
rmnathan

----------------------------------------------------------------------

Comment By: Nathan (rmnathan)
Date: 2009-02-25 18:32

Message:
Hi Anca,
Thanks for your reply.
I can't understand one thing.

Step 1:
c3-1_list has two users as s3-1 and s3-2
c3-2_list has two users as s3-1 and s3-2

Step 2:
c3-1 subscribe to c3-1_list
c3-2 subscribe to c3-2_list

Step 3:
If RLS gets publish from s3-1
it is sending NOTIFY to c3-1 one only. It is not sending  NOTIFY to c3-2.
can u explain why it is not sending NOTIFY to c3-2.

My doubt is s3-1 is in both the lists (ie c3-1 and c3-2). But RLS sending
notify to c3-1 one only. It is not sending to c3-2.

Regards
rmnathan


 

----------------------------------------------------------------------

Comment By: Anca Vamanu (anca_vamanu)
Date: 2009-02-25 16:14

Message:
Hi Nathan,

I have looked in the trace and for me it looks perfectly ok.

I don't understand what you say is wrong.8.

 
   ' iii) from s3-1 to c3-1 this is not correct. it should send from s3-1
to c3-2 '

    You are referring to message number 65 ( or 71 which is a
retransmission of 65), right? And you what to say that the To header is
wrong? 
If this is true, then you are wrong. The To header is exactly the same as
in the initial Subscribe received from the proxy. Please do filter on
Call-ID and check this yourself.     
   
    'iV) from s3-2 to c3-2 this is not correct. it should send from s3-2
to c3-1'
The same here.

regards,
Anca



----------------------------------------------------------------------

Comment By: Nathan (rmnathan)
Date: 2009-02-24 20:49

Message:
Hi Anca,

For the same setup
Test setup details
IMS UE1 192.168.165.151:5070
IMS UE2 192.168.165.152:5075
Proxy - SCSCF (192.168.166.150:50602)
Opensips(presence server) (10.6.2.246:5060)
RLS (10.6.2.246:5060)

The difference is two users in the IMS UE1 users list

IMS UE1 has two users
1.c3-1 which has s3-1 in list

<?xml version="1.0" encoding="UTF-8"?>
 <rls-services>
 <service uri="sip:c3-1_list at 10.6.2.246">
   <list name="c3-1">
    <entry uri="sip:s3-1 at 10.6.2.246"/>
    <entry uri="sip:s3-2 at 10.6.2.246"/>
   </list>
   <packages>
    <package>presence</package>
   </packages>
  </service>


2.c3-2 which has also s3-1 in list

<?xml version="1.0" encoding="UTF-8"?>
 <rls-services>
 <service uri="sip:c3-2_list at 10.6.2.246">
   <list name="c3-2">
    <entry uri="sip:s3-1 at 10.6.2.246"/>
    <entry uri="sip:s3-2 at 10.6.2.246"/>
   </list>
   <packages>
    <package>presence</package>
   </packages>
  </service>
 </rls-services>


IMS UE2 has one user
1.s3-1 ( this is only to send publish)
2.s3-2 (this is only to send publish)

call flow description
=====================
1.IMS UE1 ie(c3-1 and c3-2) will send subcribe to their list
2. Presence server that receives the Subscribe messages sent by the rls
server for the list subscription because the users
  in the list are same domain of presence server. So RLS server sends
subscribe, 200 ok for subscribe , Notify and 200 ok
  for notify to presence server(ie to itself because opensips and RLS
server running on same IP: 10.6.2.246)
3. After got 200 ok for subscribe and notify  for IMS UE1 users
4. Send subscribe from IMS UE2 (ie s3-1 to c3-1 & s3-2 to c3-2) . This is
just to send publish.
5. Then send publish from s3-1 and s3-2  ie from IMS UE2.
6. After got publish RLS server should generate notify to c3-1 and c3-2
because c3-1 & c3-2 have subscribed to s3-1 and s3-2
7. From captured trace RLS server sends notify and 200 ok for notify to
presence server 
Analysis
=========
8. Then after that RLS sends notify to IMS UE1
    i) from s3-1 to c3-1
    ii) from s3-2 to c3-2
    iii) from s3-1 to c3-1 this is not correct. it should send from s3-1
to c3-2
    iV) from s3-2 to c3-2 this is not correct. it should send from s3-2 to
c3-1

Please find captured trace also.

Regards
rmnathan

----------------------------------------------------------------------

Comment By: Nathan (rmnathan)
Date: 2009-02-24 19:14

Message:
Hi,
Test setup details
IMS UE1 192.168.165.151:5070
IMS UE2  192.168.165.152:5075
Proxy - SCSCF (192.168.166.150:50602)
Opensips(presence server) (10.6.2.246:5060) 
RLS (10.6.2.246:5060)



----------------------------------------------------------------------

Comment By: Nathan (rmnathan)
Date: 2009-02-24 19:07

Message:
Hi Anca

Test setup description:
======================

IMS UE1
192.168.165.151:5070
				Proxy - SCSCF            ----  Opensips(presence server)   ---- RLS
server
			  (192.168.166.150:50602)	       (10.6.2.246:5060)               
(10.6.2.246:5060)
IMS UE2
192.168.165.152:5075


IMS UE1 has two users 
1.c3-1 which has s3-1 in list

<?xml version="1.0" encoding="UTF-8"?>
 <rls-services>
 <service uri="sip:c3-1_list at 10.6.2.246">
   <list name="c3-1">
    <entry uri="sip:s3-1 at 10.6.2.246"/>

   </list>
   <packages>
    <package>presence</package>
   </packages>
  </service>
 </rls-services>

2.c3-2 which has also s3-1 in list

<?xml version="1.0" encoding="UTF-8"?>
 <rls-services>
 <service uri="sip:c3-2_list at 10.6.2.246">
   <list name="c3-2">
    <entry uri="sip:s3-1 at 10.6.2.246"/>

   </list>
   <packages>
    <package>presence</package>
   </packages>
  </service>
 </rls-services>

IMS UE2 has one user
1.s3-1 ( this is only to send publish)


call flow description
=====================
1.IMS UE1 ie(c3-1 and c3-2) will send subcribe to their list
2. Presence server that receives the Subscribe messages sent by the rls
server for the list subscription because the users
  in the list are same domain of presence server. So RLS server sends
subscribe, 200 ok for subscribe , Notify and 200 ok
  for notify to presence server(ie to itself because opensips and RLS
server running on same IP: 10.6.2.246)
3. After got 200 ok for subscribe and notify  for IMS UE1 users
4. Send subscribe from IMS UE2 (ie s3-1 to c3-1) . This is just to send
publish.
5. Then send publish from s3-1 ie from IMS UE2. 
6. After got publish RLS server should generate notify to c3-1 and c3-2
because c3-1 & c3-2 have subscribed to s3-1 
7. From captured trace RLS server sends notify and 200 ok for notify to
presence server (please explain why this is sending notify to opensips)
8. Then after that RLS sends notify to IMS UE1

9. refreshed Publish from IMS UE2
10 Removed Publish  from IMS UE2


For your queries
================
do you use a presence server that receives the
Subscribe messages sent by the rls server and also Publish messages from
the clients?

yes presence server receives the subscribe messages sent by the rls
server. The publish from clients (in this case from s3-1 (IMS UE2)

2.you send the Subscribes directly to the clients and they
reply with Notifies?
No. the subscribes sends to presence server by the rls server.

Please let me know if you want more information.
Please find captured trace also.

Regards
rmnathan


----------------------------------------------------------------------

Comment By: Anca Vamanu (anca_vamanu)
Date: 2009-02-24 18:22

Message:
Hi Rmnathan,

If you really want to help me figure out what your problem is you have to
send simpler traces. Your trace is impossible to analize - you have 8 lists
with different names, but there are 4 pairs having the same content - so
there are actually only 4 unique lists. Then you use in 'From' header of
the SUBSCRIBE not the name of the list but anther uri - this is not
important in the SIP logic - but it makes impossible for me to follow the
messages since the Notifies that the RLS sends and receives will have the
same To and From headers.
Please if you want to help run a simpler case - only two Subscriptions to
lists that can have different names but the same content. 
One more question - do you use a presence server that receives the
Subscribe messages sent by the rls server and also Publish messages from
the clients? Or you send the Subscribes directly to the clients and they
reply with Notifies?
Please also include a description with the entities in the scenario and
the IP address and port they run at.

Thanks,
Anca


----------------------------------------------------------------------

Comment By: Anca Vamanu (anca_vamanu)
Date: 2009-02-24 16:59

Message:
Hi Rmnathan,

If you really want to help me figure out what your problem is you have to
send simpler traces. Your trace is impossible to analize - you have 8 lists
with different names, but there are 4 pairs having the same content - so
there are actually only 4 unique lists. Then you use in 'From' header of
the SUBSCRIBE not the name of the list but anther uri - this is not
important in the SIP logic - but it makes impossible for me to follow the
messages since the Notifies that the RLS sends and receives will have the
same To and From headers.
Please if you want to help run a simpler case - only two Subscriptions to
lists that can have different names but the same content. 
One more question - do you use a presence server that receives the
Subscribe messages sent by the rls server and also Publish messages from
the clients? Or you send the Subscribes directly to the clients and they
reply with Notifies?
Please also include a description with the entities in the scenario and
the IP address and port they run at.

Thanks,
Anca


----------------------------------------------------------------------

Comment By: Nathan (rmnathan)
Date: 2009-02-24 16:13

Message:
Hi Anca,
After that i have tested. still the issue is not fixed. Now opensips is
generating notify for all the users(for first user) in the list but it
always sending to first user in the list only not for other users. 

Please see the attached pcap file.

Regards
rmnathan



----------------------------------------------------------------------

Comment By: Anca Vamanu (anca_vamanu)
Date: 2009-02-24 15:19

Message:
Hi Rmnathan,

A change was made for many tables - changing varchar type to char and
since the structure was changed, the version of the tables was increased.
You need to get the new mysql script and recreate the table and also
update the version for rls_presentity table in 'version' table. However
since there are many tables for which the version was increased I would
recommend recreating the whole database.

regards,
Anca

----------------------------------------------------------------------

Comment By: Nathan (rmnathan)
Date: 2009-02-24 11:53

Message:
Hi Anca,
I tried with latest trunk 5354 build. while starting opensips i got
following error message
stinbng46:/usr/local/trunk# /usr/local/sbin/opensips
Listening on
             udp: 10.6.2.246 [10.6.2.246]:5060
Aliases:
             udp: stinbng46:5060

stinbng46:/usr/local/trunk# Feb 24 11:46:35 [2520]
ERROR:core:db_check_table_version: invalid version 0 for table
rls_presentity found, expected 1
Feb 24 11:46:35 [2520] ERROR:rls:mod_init: error during table version
check.
Feb 24 11:46:35 [2520] ERROR:core:init_mod: failed to initialize module
rls
Feb 24 11:46:35 [2520] ERROR:core:main: error while initializing modules
i have   rls_presentity table also in opensips database.
mysql> desc rls_presentity
    -> ;
+----------------+------------------+------+-----+---------+----------------+
| Field          | Type             | Null | Key | Default | Extra        
 |
+----------------+------------------+------+-----+---------+----------------+
| id             | int(10) unsigned | NO   | PRI | NULL    |
auto_increment |
| rlsubs_did     | char(255)        | NO   | MUL |         |              
 |
| resource_uri   | char(128)        | NO   |     |         |              
 |
| content_type   | char(64)         | NO   |     |         |              
 |
| presence_state | blob             | NO   |     |         |              
 |
| expires        | int(11)          | NO   |     |         |              
 |
| updated        | int(11)          | NO   | MUL |         |              
 |
| auth_state     | int(11)          | NO   |     |         |              
 |
| reason         | char(64)         | NO   |     |         |              
 |
+----------------+------------------+------+-----+---------+----------------+
9 rows in set (0.00 sec)

I have changed and tried table version in script also 
INSERT INTO version (table_name, table_version) values
('rls_presentity','1');
  CREATE TABLE rls_presentity (
      id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
      rlsubs_did CHAR(255) NOT NULL,
      resource_uri CHAR(128) NOT NULL,
      content_type CHAR(64) NOT NULL,
      presence_state BLOB NOT NULL,
      expires INT(11) NOT NULL,
      updated INT(11) NOT NULL,
      auth_state INT(11) NOT NULL,
      reason CHAR(64) NOT NULL,
      CONSTRAINT rls_presentity_idx UNIQUE (rlsubs_did, resource_uri)
  ) ENGINE=MyISAM;
Again i got the same error.

Regards
rmnathan

----------------------------------------------------------------------

Comment By: Anca Vamanu (anca_vamanu)
Date: 2009-02-18 20:47

Message:
Hi Rmnathan,

Thank you for this report.
Indeed, you were right- not all update Notifies were sent due to a bug in
the code. I have fixed it. Please update to the new svn version and test it
yourself. I will wait for your feedback before closing this bug report.

regards,
Anca



----------------------------------------------------------------------

Comment By: Anca Vamanu (anca_vamanu)
Date: 2009-02-18 20:47

Message:
Hi Rmnathan,

Thank you for this report.
Indeed, you were right- not all update Notifies were sent due to a bug in
the code. I have fixed it. Please update to the new svn version and test it
yourself. I will wait for your feedback before closing this bug report.

regards,
Anca



----------------------------------------------------------------------

Comment By: Anca Vamanu (anca_vamanu)
Date: 2009-02-18 20:46

Message:
Hi Rmnathan,

Thank you for this report.
Indeed, you were right- not all update Notifies were sent due to a bug in
the code. I have fixed it. Please update to the new svn version and test it
yourself. I will wait for your feedback before closing this bug report.

regards,
Anca



----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=2591935&group_id=232389



More information about the Devel mailing list