<div dir="auto">I mean i tried to change $du and print it. It was changed but notify was set to original ruri. I know that it worked for register requests and invite. I built services using it.<div dir="auto"><br></div><div dir="auto">I found this trouble only with NOTIFY</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Oct 4, 2017 14:35, "Daniel-Constantin Mierla" <<a href="mailto:miconda@gmail.com">miconda@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <p>Can you print $du there and see if it set? looks like it is not
      routed by r-uri, but dst uri.</p>
    <p>Cheers,<br>
      Daniel<br>
    </p>
    <br>
    <div class="m_-6465158562263467355moz-cite-prefix">On 03.10.17 22:58, Yuriy Gorlichenko
      wrote:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">Found that at the tm:local-request $ru modifies but
        anyway - request sent to old RURI.<br>
        <div> INFO: NOTIFY to WS, update RURI</div>
        <div><br>
        </div>
        <div>-- here is making <br>
          $ru = $ru+";transport=ws";</div>
        <div>---</div>
        <div><br>
        </div>
        <div> INFO: NOTIFY to WS, new RURI:
<a class="m_-6465158562263467355moz-txt-link-freetext">sip:94e51c30bdf28de52519@93.<wbr>81.99.68:54733;gr=urn:uuid:<wbr>88b3033f-e65d-4694-ac45-<wbr>2a1d1a44501c;transport=ws</a></div>
        <div><br>
          --- for now $ru is updated</div>
        <div><br>
        </div>
        <div>-- but here also same result:<br>
          <br>
        </div>
        <div> INFO: presence [notify.c:1619]: send_notify_request():
          NOTIFY
          <a class="m_-6465158562263467355moz-txt-link-freetext">sip:94e51c30Bdf28de52519@<wbr>d0c20d13-e5b4-4649-821e-<wbr>9ab8ec94b141</a>
          via
<a class="m_-6465158562263467355moz-txt-link-freetext">sip:94e51c30bdf28de52519@93.<wbr>81.99.68:54733;gr=urn:uuid:<wbr>88b3033f-e65d-4694-ac45-<wbr>2a1d1a44501c</a>
          on behalf of
          <a class="m_-6465158562263467355moz-txt-link-freetext">sip:8dc08f881f2105dD3d75@<wbr>d0c20d13-e5b4-4649-821e-<wbr>9ab8ec94b141</a>
          for event presence : 3biad4n635ugovv7vmjv</div>
        <div><br>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">2017-10-03 21:31 GMT+03:00 Yuriy
          Gorlichenko <span dir="ltr"><<a href="mailto:ovoshlook@gmail.com" target="_blank">ovoshlook@gmail.com</a>></span>:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div dir="ltr">Can not find any entry of this device at the
              active watchers.<br>
              Suppose after module found sockets mistmatch and didnt got
              NOTIFY response it removes entry from active watchers...<br>
              <br>
              I added handling at the event route as you sugested and
              tried to do next<br>
              <br>
              Firs i tried fix $ru here but it does not work<br>
              Also tried to force socket but same<br>
              <br>
              <br>
              I see at the logs that first kamailio says about proto
              mistmatch and only then calling <span style="font-size:12.8px"> event_route[tm:local-<wbr>request]...</span><br>
              <br>
              <span style="font-size:12.8px">This is my log with most
                important variables for understanding</span><br>
              <br>
              <div><span style="font-size:12.8px">  INFO:
                  <script>: ------------------------------<wbr>---------</span></div>
              <div><span style="font-size:12.8px">  INFO:
                  <script>: #012SUBSCRIBE | source: <a href="http://93.81.99.68:57031" target="_blank">93.81.99.68:57031</a>,</span></div>
              <div><span style="font-size:12.8px">  INFO:
                  <script>: #012SUBSCRIBE | proto: wss,</span></div>
              <div><span style="font-size:12.8px">  INFO:
                  <script>: #012SUBSCRIBE | RURI:
                  <a class="m_-6465158562263467355moz-txt-link-freetext">sip:8dc08f881f2105dD3d75@</a>d0c20<wbr>d13-e5b4-4649-821e-9ab8ec94b14<wbr>1,</span></div>
              <div><span style="font-size:12.8px">  INFO:
                  <script>: #012SUBSCRIBE | contact:
                  <<a class="m_-6465158562263467355moz-txt-link-freetext">sip:94e51c30bdf28de52519@</a>d0c2<wbr>0d13-e5b4-4649-821e-9ab8ec94b1<wbr>41;gr=urn:uuid:14f23c6c-166f-<wbr>4649-9b7e-71a66b20450f></span></div>
              <div><span style="font-size:12.8px">  INFO:
                  <script>: #012SUBSCRIBE | from :
                  94e51c30Bdf28de52519</span></div>
              <div><span style="font-size:12.8px">  INFO:
                  <script>: #012SUBSCRIBE | to :
                  8dc08f881f2105dD3d75</span></div>
              <div><span style="font-size:12.8px">  INFO:
                  <script>: ------------------------------<wbr>---------</span></div>
              <div><span style="font-size:12.8px">  INFO:
                  <script>: SUBSCRIBE : fixing nated contact</span></div>
              <div><span style="font-size:12.8px">  INFO:
                  <script>: SUBSCRIBE from WSS proto<br>
                  <br>
                  ----- Here is handle_subscribe happens<br>
                  <br>
                </span></div>
              <div><span style="font-size:12.8px">  WARNING:
                  <core> [core/forward.c:231]: get_send_socket2():
                  protocol/port mismatch (forced tls:<a href="http://172.31.13.191:7443" target="_blank">172.31.13.191:7443</a>, to
                  udp:<a href="http://93.81.99.68:57031" target="_blank">93.81.99.68:57031</a>)<br>
                  <br>
                  ---- </span><span style="font-size:12.8px"> event_route[tm:local-req<wbr>uest]</span><span style="font-size:12.8px"><br>
                  <br>
                </span></div>
              <div><span style="font-size:12.8px">  INFO:
                  <script>: ------------------------------<wbr>---------</span></div>
              <div><span style="font-size:12.8px">  INFO:
                  <script>: #012NOTIFY | source: <a href="http://172.31.13.191:5060" target="_blank">172.31.13.191:5060</a>,</span></div>
              <div><span style="font-size:12.8px">  INFO:
                  <script>: #012NOTIFY | proto: udp,</span></div>
              <div><span style="font-size:12.8px">  INFO:
                  <script>: #012NOTIFY | RURI:
                  <a class="m_-6465158562263467355moz-txt-link-freetext">sip:94e51c30bdf28de52519@93</a>.81<wbr>.99.68:57031;gr=urn:uuid:14f23<wbr>c6c-166f-4649-9b7e-71a66b20450<wbr>f,</span></div>
              <div><span style="font-size:12.8px">  INFO:
                  <script>: #012NOTIFY | contact: <sip:<a href="http://34.192.121.47:5060" target="_blank">34.192.121.47:5060</a>;transp<wbr>ort=tls></span></div>
              <div><span style="font-size:12.8px">  INFO:
                  <script>: #012NOTIFY | from :
                  8dc08f881f2105dD3d75</span></div>
              <div><span style="font-size:12.8px">  INFO:
                  <script>: #012NOTIFY | to : 94e51c30Bdf28de52519</span></div>
              <div><span style="font-size:12.8px">  INFO:
                  <script>: ------------------------------<wbr>---------</span></div>
              <div><span style="font-size:12.8px">  INFO:
                  <script>: NOTIFY to WS, forsing socket to TLS<br>
                  <br>
                  ---- here is i trying to fix $ru and $fs<br>
                  <br>
                </span></div>
              <div><span style="font-size:12.8px">  INFO: presence
                  [notify.c:1619]: send_notify_request(): NOTIFY
                  <a class="m_-6465158562263467355moz-txt-link-freetext">sip:94e51c30Bdf28de52519@</a>d0c20<wbr>d13-e5b4-4649-821e-9ab8ec94b14<wbr>1
                  via <a class="m_-6465158562263467355moz-txt-link-freetext">sip:94e51c30bdf28de52519@93</a>.81<wbr>.99.68:57031;gr=urn:uuid:14f23<wbr>c6c-166f-4649-9b7e-71a66b20450<wbr>f
                  on behalf of <a class="m_-6465158562263467355moz-txt-link-freetext">sip:8dc08f881f2105dD3d75@</a>d0c20<wbr>d13-e5b4-4649-821e-9ab8ec94b14<wbr>1
                  for event presence : 8n0erm4mtff6pn9ljgdq</span></div>
              <div style="font-size:12.8px"><br>
              </div>
              <br>
              <br>
            </div>
            <div class="m_-6465158562263467355HOEnZb">
              <div class="m_-6465158562263467355h5">
                <div class="gmail_extra"><br>
                  <div class="gmail_quote">2017-10-03 18:43 GMT+03:00
                    Daniel-Constantin Mierla <span dir="ltr"><<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>></span>:<br>
                    <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                      <div text="#000000" bgcolor="#FFFFFF">
                        <p>Hello,</p>
                        <p>you should use set_contact_alias() for
                          subscribe instead of fixed_nated_contact(), is
                          a better option.</p>
                        <p>Back to the reported topic, can you paste
                          here the db record from active_watchers table?</p>
                        <p>Then, you should be able to update some parts
                          of the local generated requests by having an
                          event_route[tm:local-request] block in your
                          kamailio.cfg.</p>
                        <p>Cheers,<br>
                          Daniel<br>
                        </p>
                        <div>
                          <div class="m_-6465158562263467355m_1789460293855678517h5"> <br>
                            <div class="m_-6465158562263467355m_1789460293855678517m_-8712470815786586704moz-cite-prefix">On
                              03.10.17 10:44, Yuriy Gorlichenko wrote:<br>
                            </div>
                          </div>
                        </div>
                        <blockquote type="cite">
                          <div>
                            <div class="m_-6465158562263467355m_1789460293855678517h5">
                              <div dir="ltr">Also found at the lists
                                some solutions like "accept
                                fix_nated_register() and
                                fix_nated_contact() for REGISTER and
                                SUBSCRIBE"<br>
                                <br>
                                Done it. But still protos mistmatch...<br>
                                <br>
                                kamailio founds tls:myip:myport and
                                forces t to udp...</div>
                              <div class="gmail_extra"><br>
                                <div class="gmail_quote">2017-10-03
                                  10:49 GMT+03:00 Yuriy Gorlichenko <span dir="ltr"><<a href="mailto:ovoshlook@gmail.com" target="_blank">ovoshlook@gmail.com</a>></span>:<br>
                                  <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                                    <div dir="ltr">Hi. I have presence
                                      server and it works fine for
                                      UDP/TCP/TLS endpoints.<br>
                                      For now i have new one type of
                                      endpoints that runs via WebSockets<br>
                                      <br>
                                      It sends SUBSCRIBE request to the
                                      and then after handle_subscribe()
                                      NOTIFY not comes to the subscriber
                                      because of <br>
                                      [core/forward.c:231]:
                                      get_send_socket2(): protocol/port
                                      mismatch <br>
                                      <br>
                                      I already had some issues
                                      regarding this for ACK for example
                                      but i resolved it cimply doing<br>
                                      <br>
                                      $ru = $ru+";transport=wss"<br>
                                      <br>
                                      but NOTIFY sending is internal
                                      process and can't be controlled by
                                      config file. So i can not change
                                      $ru for NOTIFY directly. <br>
                                      <br>
                                      Any ideas how to fix this?</div>
                                  </blockquote>
                                </div>
                                <br>
                              </div>
                              <br>
                              <fieldset class="m_-6465158562263467355m_1789460293855678517m_-8712470815786586704mimeAttachmentHeader"></fieldset>
                              <br>
                            </div>
                          </div>
                          <pre>______________________________<wbr>_________________
Kamailio (SER) - Users Mailing List
<a class="m_-6465158562263467355m_1789460293855678517m_-8712470815786586704moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a>
<a class="m_-6465158562263467355m_1789460293855678517m_-8712470815786586704moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">https://lists.kamailio.org/cgi<wbr>-bin/mailman/listinfo/sr-users</a><span class="m_-6465158562263467355m_1789460293855678517HOEnZb"><font color="#888888">
</font></span></pre>
                          <span class="m_-6465158562263467355m_1789460293855678517HOEnZb"><font color="#888888"> </font></span></blockquote>
                        <span class="m_-6465158562263467355m_1789460293855678517HOEnZb"><font color="#888888"> <br>
                            <pre class="m_-6465158562263467355m_1789460293855678517m_-8712470815786586704moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<a class="m_-6465158562263467355m_1789460293855678517m_-8712470815786586704moz-txt-link-abbreviated" href="http://www.twitter.com/miconda" target="_blank">www.twitter.com/miconda</a> -- <a class="m_-6465158562263467355m_1789460293855678517m_-8712470815786586704moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda" target="_blank">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - <a class="m_-6465158562263467355m_1789460293855678517m_-8712470815786586704moz-txt-link-abbreviated" href="http://www.asipto.com" target="_blank">www.asipto.com</a>
Kamailio World Conference - <a class="m_-6465158562263467355m_1789460293855678517m_-8712470815786586704moz-txt-link-abbreviated" href="http://www.kamailioworld.com" target="_blank">www.kamailioworld.com</a></pre>
                          </font></span></div>
                    </blockquote>
                  </div>
                  <br>
                </div>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
    </blockquote>
    <br>
    <pre class="m_-6465158562263467355moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<a class="m_-6465158562263467355moz-txt-link-abbreviated" href="http://www.twitter.com/miconda" target="_blank">www.twitter.com/miconda</a> -- <a class="m_-6465158562263467355moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda" target="_blank">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - <a class="m_-6465158562263467355moz-txt-link-abbreviated" href="http://www.asipto.com" target="_blank">www.asipto.com</a>
Kamailio World Conference - <a class="m_-6465158562263467355moz-txt-link-abbreviated" href="http://www.kamailioworld.com" target="_blank">www.kamailioworld.com</a></pre>
  </div>

</blockquote></div></div>