Hello,
the presence specs are quite rigid about user identities, in many cases the user id appears in sip headers as well as in the xml body. If you mangle identities for subscription, you may have to do changes in the content of the notifies.
I haven't analyzed in detail this case to be able to prose a solution, but you can try updating the headers and then use msg_apply_changes() before calling the handle_subscribe(). Or if you have some developer expertise, add the option to specify the presentity id via function parameter, right now it support given the watcher id as parameter. But then, again, you have to see if NOTIFY request need to be updated as well.
Cheers, Daniel
On 12.02.20 14:49, Mark Boyce wrote:
Hi All
Looking for the best way to achieve mapping from requested uri to actual uri in presence subscription.
The scenario I’ve been presented with is that there is a direct relation between extension number and sip user but they are not the same thing.
So for example;
Extension 10 is mapped to SIP user sip-SomethingLong Extension 11 is mapped to SIP user sip-SomethingEvenLonger
When extension 10 subscribes to 11 we end up with something like this;
From: “Extension 10" sip:sip-SomethingLong@ourpbx.com:5060;tag=12345678 To: sip:11@ourpbx.com:5060;tag=987654321-c8bd
I *think* what I need to end up with in presence db is; presently_uri = sip:sip-SomethingEvenLonger@ourpbx.com to_user = 10
(Is that right?)
However I can’t see a standard way to achieve this. Manage_subscribe will let me override the watcher uri but not the watched.
Anyone see a simple way to achieve this?
Thanks Mark
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users