[Devel] presence and to uri
Juha Heinanen
jh at tutpro.com
Thu May 10 10:14:21 CEST 2007
i sent yesterday privately an email to anca about this, but thought that
perhaps a broader discussion is appropriate, because it looks to me that
there is a fundamental flaw in current presence implementation.
while testing presence, i noticed that when processing subscribe
requests, presence module seems to take presentity uri from to uri and
not from the request uri. for example, when twinkle sends subscribe
SUBSCRIBE sip:jh at vm.test.fi SIP/2.0
To: "Juha Heinanen" <sip:+358442345670 at test.fi>
openser does not find presentity with username jh/domain vm.test.fi
although it does exists.
also, if state of presentity changes, twinkle does not get notification
of it, i guess, because in active_watchers table twinkle is listed with
to_user +358442345670/to_domain test.fi and there is no field in
active_watchers table that would include presentity uri
sip:jh at vm.test.fi that twinkle subscribed to.
RFC 3265 is clear on how target of subscribe is determined:
3.1.2. Identification of Subscribed Events and Event Classes
Identification of events is provided by three pieces of information:
Request URI, Event Type, and (optionally) message body.
it makes never (except in register request) sense by presence server or
proxy to examine to header, because to header has only local meaning.
for example, my proxy may accept subscribe request where r-uri and to
uri are both sip:my_mailbox and then rewrite request uri to
sip:jh at vm.test.fi.
another (minor) thing that i noticed while reading presence source code
is that it uses parse_uri functions to parse to header. these should
be changed to more efficient parse_to_uri, which checks if the uri has
already been parsed.
-- juha
More information about the Devel
mailing list