[OpenSIPS-Users] RLS(Resource List Server)

Anca Vamanu anca at voice-system.ro
Wed Oct 29 11:27:22 CET 2008


Hi Jeon,

Yoo Chan Jeon wrote:
> Now I understand how Openser RLS works.
>  
> My answers are in the red texts.
> I am wondering if I have to change the codes.
>  
> Thanks.
> Jeon
>
> On Tue, Oct 28, 2008 at 12:15 PM, Anca Vamanu <anca at voice-system.ro 
> <mailto:anca at voice-system.ro>> wrote:
>
>     Hi Jeon,
>
>     You are almost there :) but missing one piece of information that
>     I will provide to you now.
>
>
>     Yoo Chan Jeon wrote:
>>
>>     Thanks Anca.
>>     I checked the Wireshark trace, and your presentation.
>>     Openser RLS seems to send a notify to the user before it
>>     receives notify msgs from the presence server.
>>     The  Wireshark trace steps are following:
>>     I explained  the trace using your  presentation: 
>>      
>>     1.Eyebeam  subscibes to my list
>>     2. Openser RLS  subscribes  to Presence server.
>>     3. Openser RLS sends a 200 to the Eyebeam.
>>     4. Openser RLS sends a full notify to the Eyebeam without
>>     presence states.
>     When receiving a Subscribe, RLS , as any notifier is obliged to
>     send an immediate Notify. So RLS check what state information it
>     has , and since it has none at that time - it sends a Notify with
>     empty body.
>     On the other hand, does this Notify receive a 200 OK from Eyebeam?
>      
>
>    I am using the UA built using Sofia SIp
>
>     No, it receives the 400  Bad content Type header
>
>    I looked at the Notify msg which is sent from RLS.
>    It has a minor problem in the  Content-Type header
>    Our RLS has a
>    
> ("multi-part/related;type="application/rlmi+xml";start=<12223.....>;boundary=..).
>    I checked this type with  rfc 4662
>    rfc 4662 has a
>    
> (multi-part/related;type="application/rlmi+xml";start="<12223.....>";boundary=..).
>  
>    There are three ''(doulbe quote) difference.
>    After I changed the  rls_notify_extra_hdr()  in the rls/notify.c  
> to the same as in the rfc 4662 .
>    Notify msg does not inlcude xml body anymore.
>    Before the change, it has a xml body.
>    The chages are made in the following. I only changed the two lines
>   if(start_cid && boundary_string)
>
>  {
>
>  str_hdr->len+= sprintf(str_hdr->s+str_hdr->len,
>
>  //"Content-Type: \"multipart/related;type=\"application/rlmi+xml\"");
>
>   "Content-Type: multipart/related;type=\"application/rlmi+xml\"");
>
>  str_hdr->len+= sprintf(str_hdr->s+str_hdr->len,
>
>  //";start= <%s>;boundary=%s\r\n", start_cid, boundary_string);
>
>   ";start=\"<%s>\";boundary=%s\r\n", start_cid, boundary_string);
>
> }
>
>  
>  
Thank you for noticing this. I will also fix it and test. I should not 
affect at all the body of the message. I think I will finish my patch in 
RLS today and commit it on svn. Then you can update and test with the 
fixed version.

regards,
Anca
>  
>
>
>
>>     5. Presence server sends notify msgs to the Openser RLS.
>     Now, when receiving a Notify from the presence server, the RLS
>     should send a Notify to Eyebeam with the update of the state. Do
>     you see that?
>
>     I want to mention that there were some problems discovered in RLS
>     at SIPIT, two weeks ago and I am working now at fixing those. They
>     could also appear in your tests. Anyhow any trouble that you find,
>     please report and I will check to see if it is a new or know one.
>
>     Do you use the latest version of Eyebeam? Does it have RLS support
>     again?
>
>     regards,
>     Anca Vamanu
>
>>      
>>     I guess that step 4 should be called after step 5.
>>      
>>     I checked the codes again.
>>     The rls_handle_subscribe() calls resource_subscription(),
>>     reply_200(), and send_full_notify().
>>     The resource_suscription() does the step 2.
>>     The reply_200() does the step 3.
>>     The send_full_notify() dose the step 4.
>>      
>>     The rls_handle_subscribe() never wait for step 5.
>>     What did I do wrong ? 
>>      
>>     Thanks
>>     Jeon
>>
>>      
>>     On Tue, Oct 28, 2008 at 9:14 AM, Anca Vamanu
>>     <anca at voice-system.ro <mailto:anca at voice-system.ro>> wrote:
>>
>>         You can also find the slide presentation here:
>>         http://opensips.org/index.php?n=Resources.DocsPapPa.
>>
>>         Anca
>>
>>         Anca Vamanu wrote:
>>
>>             Hi Jeon,
>>
>>             You are missing something.
>>             Here is a link at the slides from the presentation I held
>>             at VON, San Jose this year -
>>             http://www.slideshare.net/alwaysoncarl/vamanu-anca/ ( we
>>             will put it on our site also).
>>             At page 24 there is a scheme with how RLS works.
>>             It interacts with the client by receiving a Subscribe to
>>             a list and sending it an aggregate Notify.
>>             To get the info to put in the Notify it sends Notifies
>>             for each buddy in list to the presence server ( where the
>>             clients have sent Publish messages). The server will then
>>             reply with Notifies that will be processed with
>>             rls_handle_notify function.
>>
>>             regards,
>>             Anca
>>
>>
>>             Yoo Chan Jeon wrote:
>>              
>>
>>                 Hi,
>>                 I looked at the codes.
>>                 The send_full_notify() api in the rls/notif.c sends
>>                 the notify msg. That api is called in the
>>                 rls_handle_subscribe().
>>                 It is checking the rls_presentity table if the list
>>                 has  presence states.
>>                 The rls_presentity table is written  in the
>>                 rls_handle_notify() which is called if the server
>>                 receives a notify msg.
>>                 The server recieves a subscribe(list) msg , sends a
>>                 200 msg, and a notify msg.
>>                 I do not think the notify msg  will never have  the
>>                 presence states.
>>                 Is this a bug in the codes or am I missing something?
>>                  Thanks.
>>                 Jeon
>>                    
>>
>>                  On Mon, Oct 27, 2008 at 10:49 AM, Yoo Chan Jeon
>>                 <yoojeon at gmail.com <mailto:yoojeon at gmail.com>
>>                 <mailto:yoojeon at gmail.com
>>                 <mailto:yoojeon at gmail.com>>> wrote:
>>
>>                    Thanks Anca.
>>                        I copied the xml file to the xcap.doc column.
>>                 I put the
>>                    username(list), doc_type(4), and domain(domain)  
>>                  I published the joe, bob and tom's  state.      I
>>                 sent a  subscribe msg to the list at domain
>>                 <mailto:list at domain <mailto:list at domain>>.
>>                    I received the notify msg with the following xml
>>                 message body.
>>                    I got a list of uri, but the xml body did not have
>>                 a each uri's state.
>>                    I checekd the presentity database. it has the joe,
>>                 bob, and
>>                    tom presentity state.
>>                    What am I missing?
>>                             <?xml version="1.0" encoding="UTF-8"?>
>>                      <list uri="sip:list at domain"
>>                 xmlns="urn:ietf:params:xml:ns:rlmi"
>>                    version="1" fullState="true">
>>                       <resource uri="sip: joe at domain"
>>                 <mailto:joe at domain <mailto:joe at domain>>>      
>>                 <resource uri="sip: bob at domain">
>>                       <resource uri="sip: tom at domain"
>>                 <mailto:tom at domain <mailto:tom at domain>%22>>       </list>
>>
>>                    Thanks.
>>                    Jeon
>>                    
>>                        On Thu, Oct 23, 2008 at 7:08 AM, Anca Vamanu
>>                 <anca at voice-system.ro <mailto:anca at voice-system.ro>
>>                    <mailto:anca at voice-system.ro
>>                 <mailto:anca at voice-system.ro>>> wrote:
>>
>>                        Hi Jeon,
>>
>>                        The column was changed from type text to type
>>                 blob because
>>                        there was a problem with postgres db. However
>>                 the text is not
>>                        transformed into binary but written as text
>>                 and extracted as text.
>>                        And yes, you should put the whole xml in the
>>                 doc column.
>>
>>                        regards,
>>                        Anca
>>
>>                        Yoo Chan Jeon wrote:
>>
>>                            Hi, Anca
>>                             Thanks for your information.
>>                            I  was busy doing other issues in the
>>                 presence server.
>>                            Now I am back to this issue.
>>                            I checked the xcap data structure, and
>>                 source codes.
>>                            The xcap doc column's type is a BLOB in
>>                 the database. But
>>                            I looked at the codes. It seems to save
>>                 the doc  as a
>>                            string not a BLOB.
>>                            I am still confused.
>>                            How do I save the xml sample you wrote to
>>                 the doc column?
>>                            I mean the list.
>>                            Should I put the whole xml to the doc
>>                 column in the xcap
>>                            table?
>>                             Thanks.
>>                             Jeon
>>
>>                             On Thu, Oct 2, 2008 at 9:38 AM, Anca Vamanu
>>                            <anca at voice-system.ro
>>                 <mailto:anca at voice-system.ro>
>>                 <mailto:anca at voice-system.ro
>>                 <mailto:anca at voice-system.ro>>
>>                            <mailto:anca at voice-system.ro
>>                 <mailto:anca at voice-system.ro>
>>                            <mailto:anca at voice-system.ro
>>                 <mailto:anca at voice-system.ro>>>> wrote:
>>
>>                               Hi Jeon,
>>
>>                               If you want to simulate an xcap server
>>                 for rls you can
>>                            do that by
>>                               doing the following:
>>                               1. set integrated_xcap_server parameter
>>                 in rls module to 1.
>>                               2. write the list in xcap table ,
>>                 putting value '4' in
>>                            'doc_type'
>>                               column.
>>                               You should complete only columns:
>>                 username, domain, doc and
>>                               doc_type, because these are the only
>>                 ones used by the
>>                            rls server.
>>                               The list must have the format described
>>                 in RFC 4826
>>                               <http://www.ietf.org/rfc/rfc4826.txt>.
>>                 For the example
>>                            that you
>>                               gave it would look something like this:
>>
>>                               <?xml version="1.0" encoding="UTF-8"?>
>>                               <resource-lists
>>                            xmlns="urn:ietf:params:xml:ns:resource-lists">
>>                               <list name="SIMPLE Buddy List">
>>                               <display-name>SIMPLE Buddy
>>                 List</display-name>
>>                               <entry uri="sip: joe at domain
>>                 <mailto:joe at domain <mailto:joe at domain>
>>                            <mailto:joe at domain <mailto:joe at domain>>
>>                 <mailto:joe at domain <mailto:joe at domain>
>>                            <mailto:joe at domain <mailto:joe at domain>>>>">
>>
>>                               <display-name>joe</display-name>
>>                               </entry>
>>                               <entry uri="sip: bob at domain
>>                 <mailto:joe at domain <mailto:joe at domain>
>>                            <mailto:joe at domain <mailto:joe at domain>>
>>                 <mailto:joe at domain <mailto:joe at domain>
>>                            <mailto:joe at domain <mailto:joe at domain>>>>">
>>
>>                               <display-name>bob</display-name>
>>                               </entry>
>>                               <entry uri="sip:tom at domain
>>                 <mailto:tom at domain <mailto:tom at domain>
>>                            <mailto:tom at domain <mailto:tom at domain>>
>>                 <mailto:tom at domain <mailto:tom at domain>
>>                            <mailto:tom at domain <mailto:tom at domain>>>>">
>>
>>                               <display-name>tom</display-name>
>>                               </entry>
>>                               </list></resource-lists>
>>
>>                               regards,
>>                               Anca Vamanu
>>
>>                               Yoo Chan Jeon wrote:
>>
>>
>>                                   Hi,
>>                                   I just want to know how RLS handles
>>                 SUBSCRIBE
>>                            messages without
>>                                   using XCAP.
>>                                   I assume that the server already
>>                 has the list
>>                            information.
>>                                   I want send the SUBSRIBE message
>>                 with resource list
>>                            format:
>>
>>                                   SUBSCRIBE sip:list at domain
>>                                   .
>>                                   .
>>                                   supported:eventlist
>>                                   Accept:application/rlmi+xml
>>                                   Accept:multipart/related
>>                                     I added rls, presence,
>>                 presence_xml, and pua
>>                            modlues in the
>>                                   configuration file.
>>                                   I do not have any problems to run
>>                 the server.
>>                                   Which database should I add list at doamin
>>                            <mailto:list at doamin <mailto:list at doamin>
>>                 <mailto:list at doamin <mailto:list at doamin>>
>>                                   <mailto:list at doamin
>>                 <mailto:list at doamin> <mailto:list at doamin
>>                 <mailto:list at doamin>>>> to?
>>
>>                                   How do I add the resource list?
>>                                   What kind of format do I need to
>>                 add a list if I
>>                            want to add
>>                                   joe at domain <mailto:joe at domain
>>                 <mailto:joe at domain> <mailto:joe at domain
>>                 <mailto:joe at domain>>
>>                            <mailto:joe at domain <mailto:joe at domain>
>>                 <mailto:joe at domain <mailto:joe at domain>>>>, bob at domain
>>                                   <mailto:bob at domain
>>                 <mailto:bob at domain> <mailto:bob at domain
>>                 <mailto:bob at domain>>
>>                            <mailto:bob at domain <mailto:bob at domain>
>>                 <mailto:bob at domain <mailto:bob at domain>>>>, tom at domain
>>                                   <mailto:tom at domain
>>                 <mailto:tom at domain> <mailto:tom at domain
>>                 <mailto:tom at domain>>
>>                            <mailto:tom at domain <mailto:tom at domain>
>>                 <mailto:tom at domain <mailto:tom at domain>>>> ?
>>
>>
>>                                   Do you have some kind of examples?
>>
>>                                   Thanks you.
>>                                   Jeon
>>
>>                                            
>>                 ------------------------------------------------------------------------
>>
>>                                  
>>                 _______________________________________________
>>                                   Users mailing list
>>                                   Users at lists.opensips.org
>>                 <mailto:Users at lists.opensips.org>
>>                            <mailto:Users at lists.opensips.org
>>                 <mailto:Users at lists.opensips.org>>
>>                            <mailto:Users at lists.opensips.org
>>                 <mailto:Users at lists.opensips.org>
>>                            <mailto:Users at lists.opensips.org
>>                 <mailto:Users at lists.opensips.org>>>
>>
>>                                            
>>                 http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>                                  
>>
>>
>>
>>
>>                    
>>
>>
>>
>>             _______________________________________________
>>             Users mailing list
>>             Users at lists.opensips.org <mailto:Users at lists.opensips.org>
>>             http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>              
>>
>>
>>
>
>




More information about the Users mailing list