Hello,
Indeed pua_usrloc reacts only to Register message.
There are a lot of possibilities add that functionality for Invite and
Bye. In short, you need to:
- first parse the Invite or Bye message to extract the destination and
the source of the call
- then, get from database table 'presentity' used by the presence
server, the current E-TAG value used for the publications for the
respective user
- and finally construct the PUBLISH message and send it to the presence
server
Of course that one option is to write a module for OpenSER. It is in
fact quite easy, probably the easiest way. The module will use as a
engine the 'pua' module, as all pua_* modules use. The pua module
exports a function 'send_publish' that receives as a parameter a
structure with the necessary informations. It also stores all the
current E-TAGS locally, so there is no need to worry about that either
and to query a remote database. Then, you can use the functions from
core to parse the INVITE message and extract info. You can use as an
example the pua modules for linkage with pua module, my recommendation
is pua_mi because it is the simplest.
regards,
Anca
Schumann Sebastian wrote:
Dear all
I have a problem, which I thought I can solve with PUA_USRLOC. I have
a OpenSER SIP Proxy and want him to create presence information about
the messages that pass him.
Some examples:
- REGISTER: Publish as online/available
- REGISTER+Expires=0: Publish as offline
- INVITE/200 OK: Publish as busy
- BYE: Publish as available again.
PUA_USRLOC seems to me can handle only simple on/offline according
registration state, that is saved on the server. As I have only a
proxy server and messages just pass by, this solution seems not the best.
What would you recommend me to solve the problem? Change the module,
add a module? As I don't have that much of experience in that area I
was thinking about using perl module and trigger some perl functions
that parse the messages that pass the proxy and make perl send the
PUBLISHes to the presence server.
Maybe some of you have other ideas or suggestions about that.... I
would be happy if you share them with me.
Best regards
Sebastian
------------------------------------------------------------------------
_______________________________________________
Users mailing list
Users(a)lists.openser.org
http://lists.openser.org/cgi-bin/mailman/listinfo/users