<div dir="ltr">The RLS module uses PUA and Presence module. I think I will do the same. PUA for sending the remote subscribe (+ timer to refresh subscriptions) and Presence for the local subscribes and notifies.<div>I tried using PUA's send_publish for sending an internal publish message so that I could use directly the Presence's handle_publish functions to send the notify to the agents, but I ran into a problem converting the incoming notify message into a publish because I needed the correct If-Match and e-tag headers. And beside that, this would mean two additional messages for each incoming Notify.</div>

<div><br></div><div>Regards</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Oct 24, 2013 at 10:17 AM, Klaus Darilion <span dir="ltr"><<a href="mailto:klaus.mailinglists@pernau.at" target="_blank">klaus.mailinglists@pernau.at</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">btw: what is the problem with using PUA module?<div class="im"><br>
<br>
On 23.10.2013 15:37, Jan Gaida wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
Thank you very much for your answer, Klaus.<br>
<br>
The problem with RLS is (like you said) that it's working with<br>
synchronous subscriptions and with asynchronous notifies. But I want to<br>
subscribe only once for each resource and then deliver each Notify<br>
instantaneously.<br>
<br>
Nevertheless, looking at the code of the RLS module has given me new<br>
ideas for the implementation of my presence-proxy. I think I can reuse<br>
quite a big part of it.<br>
<br>
By the way, does anyone know if there is a RFC for a presence proxy like<br>
the one I describe?<br>
<br>
Kind regards<br>
Jan<br>
<br>
<br>
On Wed, Oct 23, 2013 at 9:36 AM, Klaus Darilion<br></div><div><div class="h5">
<<a href="mailto:klaus.mailinglists@pernau.at" target="_blank">klaus.mailinglists@pernau.at</a> <mailto:<a href="mailto:klaus.mailinglists@pernau.at" target="_blank">klaus.mailinglists@<u></u>pernau.at</a>>> wrote:<br>


<br>
    MAybe you could implement it with resource lists (RLS module<br>
    subscribes to domain B if a lists in domain A is subscribed).<br>
<br>
    But above scenario does not reduce the traffic, as for every<br>
    subscription to A, a subscription to B is done. This is necessary,<br>
    as usually you have authorization at B to verify if the the user is<br>
    allowed to subscribe a resource at B.<br>
<br>
    regards<br>
    Klaus<br>
<br>
<br>
    On 22.10.2013 16:24, Jan Gaida wrote:<br>
<br>
        Hello<br>
<br>
        I'd like to explain my scenario and the module I'd like to<br>
        develop. I am<br>
        hoping for comments whether there are already modules like that<br>
        or which<br>
        modules' API I could use to make the development easier.<br>
<br>
        Scenario:<br>
        I have two domains (A and B) with a Kamailio server in each of them<br>
        configured as presence servers.  The agents from both domains<br>
        want to<br>
        subscribe to few resources from domain A.<br>
<br>
        Idea:<br>
        In order to reduce traffic between the domains, the presence<br>
        server from<br>
        domain B shall handle the subscriptions internally and use an<br>
        internal<br>
        virtual presence-user-agent to subscribe to the resources in<br>
        domain A.<br>
<br>
        SIP Messages:<br>
<br>
        Subscription:<br>
        1) Subscribe resource.domain.a, from each user agent ua_n.domain.b<br>
        2) 202 OK from kamailio.domain.b<br>
        3) If not already subscribed, Subscribe resource.domain.a from<br>
        kamailio.domain.b with virtual user-agent<br>
        4) 202 OK from kamailio.domain.a<br>
<br>
        (Repeat for each susbcriber)<br>
        (Subscription has to be refreshed by an internal timer)<br>
        Events:<br>
        1) Publish resouce.domain.a to kamailio.domain.a<br>
        2) 200 OK from kamailio.domain.a<br>
        3) Notify resource.domain.a to kamailio.domain.b<br>
        4) 200 OK from kamailio.domain.b<br>
        5) Notify resource.domain.a to each user agent ua_n.domain.b<br>
        6) 200 OK from each ua_n.domain.b<br>
<br>
        (Internally, Kamailio of domain B has to forward the incoming<br>
        Notify to<br>
        all locally subscribed user-agents)<br>
<br>
        I tried using the PUA module but it does not fit all my needs. Now I<br>
        think I will have to develop my own module in order to achieve<br>
        everything.  Any ideas?<br>
<br>
        Kind regards<br>
<br>
        --<br>
        *Jan **Gaida*<br>
        Ingeniero Desarrollo Software<br>
        C/ Marconi 3 (PTM)<br>
        28760 Tres Cantos<br>
        Spain<br>
        <a href="mailto:jan.gaida@grupoamper.com" target="_blank">jan.gaida@grupoamper.com</a> <mailto:<a href="mailto:jan.gaida@grupoamper.com" target="_blank">jan.gaida@grupoamper.<u></u>com</a>><br></div></div>
        <mailto:<a href="mailto:jan.gaida@grupoamper." target="_blank">jan.gaida@grupoamper.</a>_<u></u>_com<div><div class="h5"><br>
        <mailto:<a href="mailto:jan.gaida@grupoamper.com" target="_blank">jan.gaida@grupoamper.<u></u>com</a>>> |<br>
        <a href="http://www.grupoamper.com" target="_blank">www.grupoamper.com</a> <<a href="http://www.grupoamper.com" target="_blank">http://www.grupoamper.com</a>><br>
        <<a href="http://www.grupoamper.com" target="_blank">http://www.grupoamper.com</a>><br>
<br>
<br>
<br>
<br>
        This message and any attachments are intended only for the use<br>
        of the<br>
        individual to whom they are addressed and it may contain information<br>
        that is privileged or confidential. If you have received this<br>
        communication by mistake, please notify us immediately by e-mail or<br>
        telephone.The storage, recording, use or disclosure of this<br>
        e-mail and<br>
        its attachments by anyone other than the intended recipient is<br>
        strictly<br>
        prohibited. This message has been verified using antivirus software;<br>
        however, the sender is not responsible for any damage to hardware or<br>
        software resulting from the presence of any virus.<br>
<br>
<br>
        Este mensaje y cualquier anexo son exclusivamente para la persona a<br>
        quien van dirigidos y pueden contener información privilegiada o<br>
        confidencial. Si usted ha recibido esta comunicación por error, le<br>
        agradecemos notificarlo de inmediato por esta misma vía o por<br>
        teléfono.<br>
        Está prohibida su retención, grabación, utilización o<br>
        divulgación con<br>
        cualquier propósito. Este mensaje ha sido verificado con software<br>
        antivirus; sin embargo, el remitente no se hace responsable en<br>
        caso de<br>
        que en éste o en los archivos adjuntos haya presencia de algún<br>
        virus que<br>
        pueda generar daños en los equipos o programas del destinatario.<br>
<br>
<br>
<br></div></div>
        ______________________________<u></u>___________________<br>
        sr-dev mailing list<br>
        <a href="mailto:sr-dev@lists.sip-router.org" target="_blank">sr-dev@lists.sip-router.org</a> <mailto:<a href="mailto:sr-dev@lists.sip-router.org" target="_blank">sr-dev@lists.sip-<u></u>router.org</a>><br>
        <a href="http://lists.sip-router.org/__cgi-bin/mailman/listinfo/sr-__dev" target="_blank">http://lists.sip-router.org/__<u></u>cgi-bin/mailman/listinfo/sr-__<u></u>dev</a><br>
        <<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev" target="_blank">http://lists.sip-router.org/<u></u>cgi-bin/mailman/listinfo/sr-<u></u>dev</a>><div><div class="h5"><br>
<br>
<br>
<br>
<br>
--<br>
*Jan **Gaida*<br>
Ingeniero Desarrollo Software   <br>
C/ Marconi 3 (PTM)<br>
28760 Tres Cantos<br>
Spain<br>
<a href="mailto:jan.gaida@grupoamper.com" target="_blank">jan.gaida@grupoamper.com</a> <mailto:<a href="mailto:jan.gaida@grupoamper.com" target="_blank">jan.gaida@grupoamper.<u></u>com</a>> |<br>
<a href="http://www.grupoamper.com" target="_blank">www.grupoamper.com</a> <<a href="http://www.grupoamper.com" target="_blank">http://www.grupoamper.com</a>>  <br>
<br>
<br>
<br>
<br>
This message and any attachments are intended only for the use of the<br>
individual to whom they are addressed and it may contain information<br>
that is privileged or confidential. If you have received this<br>
communication by mistake, please notify us immediately by e-mail or<br>
telephone.The storage, recording, use or disclosure of this e-mail and<br>
its attachments by anyone other than the intended recipient is strictly<br>
prohibited. This message has been verified using antivirus software;<br>
however, the sender is not responsible for any damage to hardware or<br>
software resulting from the presence of any virus.<br>
<br>
<br>
Este mensaje y cualquier anexo son exclusivamente para la persona a<br>
quien van dirigidos y pueden contener información privilegiada o<br>
confidencial. Si usted ha recibido esta comunicación por error, le<br>
agradecemos notificarlo de inmediato por esta misma vía o por teléfono.<br>
Está prohibida su retención, grabación, utilización o divulgación con<br>
cualquier propósito. Este mensaje ha sido verificado con software<br>
antivirus; sin embargo, el remitente no se hace responsable en caso de<br>
que en éste o en los archivos adjuntos haya presencia de algún virus que<br>
pueda generar daños en los equipos o programas del destinatario.<br>
<br>
<br>
<br>
______________________________<u></u>_________________<br>
sr-dev mailing list<br>
<a href="mailto:sr-dev@lists.sip-router.org" target="_blank">sr-dev@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev" target="_blank">http://lists.sip-router.org/<u></u>cgi-bin/mailman/listinfo/sr-<u></u>dev</a><br>
<br>
</div></div></blockquote>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">

<table border="0" cellpadding="0" cellspacing="0">
        <tbody>
                <tr>
                        <td bgcolor="#004054" colspan="2" height="8px" width="570">
                                <img alt="" border="0" height="8" src="http://icons/ecblank.gif" width="1"></td>
                </tr>
                <tr valign="top">
                        <td bgcolor="#FFFFFF" width="380">
                                <font color="#004054" face="Arial"><b>Jan </b></font><b><font color="#004054" face="Arial">Gaida</font></b><br>
                                <font color="#99cc33" face="Arial" size="1">Ingeniero Desarrollo Software</font></td>
                        <td>
                                <img src="http://www.amper.es/image/logoamperH.jpg" style="float:right"></td>
                </tr>
                <tr>
                        <td colspan="2">
                                <img alt="" border="0" height="5" src="http://icons/ecblank.gif" width="1"></td>
                </tr>
                <tr valign="top">
                        <td valign="bottom" width="380"><span style="color:rgb(0,0,0);font-family:Arial;font-size:x-small">C/ Marconi 3 (PTM)</span><br><font color="#000000" face="Arial" size="1">28760 Tres Cantos<br>Spain</font><br>
                                <font color="#8f8f8f" face="Arial" size="1"><a href="mailto:jan.gaida@grupoamper.com" target="_blank">jan.gaida@grupoamper.com</a> | </font><a href="http://www.grupoamper.com" target="_blank"><font color="#8f8f8f" face="Arial" size="1">www.grupoamper.com</font></a></td>


                        <td valign="bottom">
                                <img src="http://www.amper.es/image/lineasamper.jpg" style="float:right"></td>
                </tr>
        </tbody>
</table>
<br></div>
</div>

<br>
<div><br></div><div><p><font color="#5f497a" size="1" face="Times New Roman">This message and any attachments are intended only for the use of the individual to whom they are addressed and it may contain information that is privileged or confidential. If you have received this communication by mistake, please notify us immediately by e-mail or telephone.The storage, recording, use or disclosure of this e-mail and its attachments by anyone other than the intended recipient is strictly prohibited. This message has been verified using antivirus software; however, the sender is not responsible for any damage to hardware or software resulting from the presence of any virus.</font></p><p><font color="#5f497a" size="1" face="Times New Roman"><br></font></p><p><font color="#5f497a" size="1" face="Times New Roman">Este mensaje y cualquier anexo son exclusivamente para la persona a quien van dirigidos y pueden contener información privilegiada o confidencial. Si usted ha recibido esta comunicación por error, le agradecemos notificarlo de inmediato por esta misma vía o por teléfono. Está prohibida su retención, grabación, utilización o divulgación con cualquier propósito. Este mensaje ha sido verificado con software antivirus; sin embargo, el remitente no se hace responsable en caso de que en éste o en los archivos adjuntos haya presencia de algún virus que pueda generar daños en los equipos o programas del destinatario.</font></p></div>