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:[email protected]:5060>;tag=12345678 > To: <sip:[email protected]:5060>;tag=987654321-c8bd > > I *think* what I need to end up with in presence db is; > presently_uri = sip:[email protected] > 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 > [email protected] > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users -- Daniel-Constantin Mierla -- www.asipto.com www.twitter.com/miconda -- www.linkedin.com/in/miconda Kamailio Advanced Training - March 9-11, 2020, Berlin - www.asipto.com Kamailio World Conference - April 27-29, 2020, in Berlin -- www.kamailioworld.com _______________________________________________ Kamailio (SER) - Users Mailing List [email protected] https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
