<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Daniel<div class=""><br class=""></div><div class="">As always thanks for the quick response.  </div><div class=""><br class=""></div><div class="">I’ll have a dig through the presence module and try and see if my assumption on the usage of fields is correct. (watch presently_uri, send as to_user to watcher contact ).  If they do behave like that it should be a simple enough change to manage_subscribe</div><div class=""><br class=""></div><div class="">Thanks</div><div class="">Mark</div><div class=""><br class=""></div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 12 Feb 2020, at 20:21, Daniel-Constantin Mierla <<a href="mailto:miconda@gmail.com" class="">miconda@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Hello,<br class=""><br class="">the presence specs are quite rigid about user identities, in many cases<br class="">the user id appears in sip headers as well as in the xml body. If you<br class="">mangle identities for subscription, you may have to do changes in the<br class="">content of the notifies.<br class=""><br class="">I haven't analyzed in detail this case to be able to prose a solution,<br class="">but you can try updating the headers and then use msg_apply_changes()<br class="">before calling the handle_subscribe(). Or if you have some developer<br class="">expertise, add the option to specify the presentity id via function<br class="">parameter, right now it support given the watcher id as parameter. But<br class="">then, again, you have to see if NOTIFY request need to be updated as well.<br class=""><br class="">Cheers,<br class="">Daniel<br class=""><br class="">On 12.02.20 14:49, Mark Boyce wrote:<br class=""><blockquote type="cite" class="">Hi All<br class=""><br class="">Looking for the best way to achieve mapping from requested uri to actual uri in presence subscription.<br class=""><br class="">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.<br class=""><br class="">So for example;<br class=""><br class="">Extension 10 is mapped to SIP user sip-SomethingLong<br class="">Extension 11 is mapped to SIP user sip-SomethingEvenLonger<br class=""><br class="">When extension 10 subscribes to 11 we end up with something like this;<br class=""><br class="">From: “Extension 10" <<a href="sip:sip-SomethingLong@ourpbx.com:5060" class="">sip:sip-SomethingLong@ourpbx.com:5060</a>>;tag=12345678<br class="">To: <<a href="sip:11@ourpbx.com:5060" class="">sip:11@ourpbx.com:5060</a>>;tag=987654321-c8bd<br class=""><br class="">I *think* what I need to end up with in presence db is;<br class="">presently_uri = <a href="sip:sip-SomethingEvenLonger@ourpbx.com" class="">sip:sip-SomethingEvenLonger@ourpbx.com</a><br class="">to_user = 10<br class=""><br class="">(Is that right?)<br class=""><br class="">However I can’t see a standard way to achieve this.  Manage_subscribe will let me override the watcher uri but not the watched.<br class=""><br class=""><br class="">Anyone see a simple way to achieve this?<br class=""><br class="">Thanks<br class="">Mark<br class=""><br class=""><br class="">_______________________________________________<br class="">Kamailio (SER) - Users Mailing List<br class=""><a href="mailto:sr-users@lists.kamailio.org" class="">sr-users@lists.kamailio.org</a><br class="">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users<br class=""></blockquote><br class="">-- <br class="">Daniel-Constantin Mierla -- <a href="http://www.asipto.com" class="">www.asipto.com</a><br class=""><a href="http://www.twitter.com/miconda" class="">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda" class="">www.linkedin.com/in/miconda</a><br class="">Kamailio Advanced Training - March 9-11, 2020, Berlin - <a href="http://www.asipto.com" class="">www.asipto.com</a><br class="">Kamailio World Conference - April 27-29, 2020, in Berlin -- <a href="http://www.kamailioworld.com" class="">www.kamailioworld.com</a><br class=""><br class=""></div></div></blockquote></div><br class=""><div class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class=""><div style="orphans: 2; widows: 2;" class="">Mark</div><div style="orphans: 2; widows: 2;" class="">-- </div><div style="orphans: 2; widows: 2;" class="">Mark Boyce</div><div style="orphans: 2; widows: 2;" class="">Dark Origins Ltd</div><div style="orphans: 2; widows: 2;" class="">e: <a href="mailto:mark@darkorigins.com" class="">mark@darkorigins.com</a></div><div style="orphans: 2; widows: 2;" class="">t: 0345 0043 043</div><div style="orphans: 2; widows: 2;" class="">f: 0345 0043 044</div></div></div>
</div>
<br class=""></div></body></html>