[Kamailio-Devel] presence/presence_mwi question

Juha Heinanen jh at tutpro.com
Tue Aug 26 16:31:42 CEST 2008


Klaus Darilion writes:

 > What is the exact purpose? From my understanding it is:
 > - receive SUBSCRIBEs for MWI and maintain the subscriptions
 > - receive PUBLISH requests and forward the body in NOTIFYs to the 
 > subscribed user.

klaus,

i wrote presence_mwi module and if i remember correctly, it just
processes publish bodies where event type is message-summary.  it
registers that capability to pua module, which itself does not know
how to handle various event types.

 > Is this correct? Then I wonder why there is no code for dealing with the 
 > subscriptions - is this all done automatically by the presence
 > module?

subscriptions are handled by presence module, which does not need to
know about event types.  if state of presentity changes and it sends a
new publish, presence module notices that and sends a notify to
subscribers.  again, when sending notifies, presence module does not
need to know about event types.

mwi is easy to implement because new publish replaced old one, i.e.,
there is no need to merge new into into old one like in some other
cases.

 > What If you want to write a "presence_dialoginfo" module which handles 
 > dialog-info (not draft-anil-sipping-bla-03.txt but RFC 4235). The module 
 > could add the "dialog" event to presence module (which should handle 
 > SUBSCRIBE/NOTIFY) and register callbacks from dialog module to get the 
 > dialog info. But how can I trigger sending new NOTIFYs with the 
 > corresponding body from within the presenece_dialoginfo module? Can this 
 > be done directly or do I have to use pua module to loop a PUBLISH to
 > myself?

i i have not read the quoted rfc, but i could imagine that you need to
add something to dialog module that sends a publish to presence module
using pua whenever the state of dialog changes.  then you have to
implement your presence_dialoginfo module that handles the body of the
dialog info event similar to mwi.

-- juha



More information about the Devel mailing list