Hello
I'd like to explain my scenario and the module I'd like to develop. I am hoping for comments whether there are already modules like that or which modules' API I could use to make the development easier.
Scenario: I have two domains (A and B) with a Kamailio server in each of them configured as presence servers. The agents from both domains want to subscribe to few resources from domain A.
Idea: In order to reduce traffic between the domains, the presence server from domain B shall handle the subscriptions internally and use an internal virtual presence-user-agent to subscribe to the resources in domain A.
SIP Messages:
Subscription: 1) Subscribe resource.domain.a, from each user agent ua_n.domain.b 2) 202 OK from kamailio.domain.b 3) If not already subscribed, Subscribe resource.domain.a from kamailio.domain.b with virtual user-agent 4) 202 OK from kamailio.domain.a
(Repeat for each susbcriber) (Subscription has to be refreshed by an internal timer)
Events: 1) Publish resouce.domain.a to kamailio.domain.a 2) 200 OK from kamailio.domain.a 3) Notify resource.domain.a to kamailio.domain.b 4) 200 OK from kamailio.domain.b 5) Notify resource.domain.a to each user agent ua_n.domain.b 6) 200 OK from each ua_n.domain.b
(Internally, Kamailio of domain B has to forward the incoming Notify to all locally subscribed user-agents)
I tried using the PUA module but it does not fit all my needs. Now I think I will have to develop my own module in order to achieve everything. Any ideas?
Kind regards
MAybe you could implement it with resource lists (RLS module subscribes to domain B if a lists in domain A is subscribed).
But above scenario does not reduce the traffic, as for every subscription to A, a subscription to B is done. This is necessary, as usually you have authorization at B to verify if the the user is allowed to subscribe a resource at B.
regards Klaus
On 22.10.2013 16:24, Jan Gaida wrote:
Thank you very much for your answer, Klaus.
The problem with RLS is (like you said) that it's working with synchronous subscriptions and with asynchronous notifies. But I want to subscribe only once for each resource and then deliver each Notify instantaneously.
Nevertheless, looking at the code of the RLS module has given me new ideas for the implementation of my presence-proxy. I think I can reuse quite a big part of it.
By the way, does anyone know if there is a RFC for a presence proxy like the one I describe?
Kind regards Jan
On Wed, Oct 23, 2013 at 9:36 AM, Klaus Darilion < klaus.mailinglists@pernau.at> wrote:
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. 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.
Regards
On Thu, Oct 24, 2013 at 10:17 AM, Klaus Darilion < klaus.mailinglists@pernau.at> wrote: