<p class="MsoNormal" style="margin:0in 0in 0pt"><font size="3"><font face="Calibri">Hello,</font></font></p>
<p class="MsoNormal" style="margin:0in 0in 0pt"><font size="3" face="Calibri"> </font></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><font size="3"><font face="Calibri">I’m wring you again about the Presence = xcap Problem on Kamailio related with the deleting of a contact.</font></font></p><font size="3"><font face="Calibri">Here a detailed description we have observed:<br>
User Case:<br>------------------<br>  - user A is a contact of B and viceversa.<br>  - then user A removes B from PC client<br><br><br>1) A sends SUBSCRIBE B to Kamail Presence Server (PS) with even type: presence and Expire:0 without body<br>
    a) PS removes A as wacther of B from the active_watchers table<br>    b) PS sends NOTIFY to B (from B to B) with event type: presence.winfo and Subscription State:active,expire=570 <br>    c) PS sends NOTIFY to A (from B to A) with event type: Presence and Subscription State: terminated,reason=timeout<br>
<br>2) A sends XCAP PUT to PS with updated pres-rules without B in presence_allow rule<br>    a) PS update xcap table the pres-rules record of A (without B)<br>   <br><br></font></font><font size="3"><font face="Calibri">3) A sends XCAP PUT to PS with updated resource-lists without B <br>
    a) PS update xcap table the resource-lists record of A</font></font><font size="3"><font face="Calibri"> (without B) <br></font></font><font size="3" face="Calibri"> <br>4)  the script kamailio.cfg calls pres_update_watchers<br>
    a) PS updates watcher table by setting the status = 2(pending) for the record of B is watcher of A (presentity), while the status remains   active (1) for the record of A is watcher of B<br>    b) PS sends NOTIFY to B(from A to B) with event type: presence and subscription state: pending<br>
<br>5) the script kamailio.cfg calls pres_refresh_watchers<br>     a) PS sends NOTIFY to B(from A to B) with event type: presence and content type:application:pdif+xml (open, online, pdif entity:A,...)<br>     b) the PC client of B shows a popup by saying 5has authorized the B adds A as contact request<br>
<br><br>Test environments:<br>--------------------------<br>- server: kamailio 3.1.3 with presence, xcap and mysql in Redhat5.6_x64<br>- transport: tcp<br>- db: mysql<br></font>- client: jitsi (ex SIP communicator) <br>- kamailio.cfg: please see the attached file kamailio.zip<br>
<br>Questions:<br>-----------------<br>1) is it correct the first SUBSCRIBE from the PC client of A?<br>2) are the over all call flows correct (see the attached wireshark trace)<br>3) are the steps 2 and 3 correct?<br>4) the steps 4 and 5 are very strange, is it the bug of xcap module or/and presence module?<br>
<br><br>Please help!!!!!<br><br>Best Regards,<br>Laura<br>