<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <br>
    the request within dialogs are sent to the address in the Contact
    header of the request/response creating the dialog. In you trace,
    the SUBSCRIBE has a Contact with no transport, the default one being
    UDP.<br>
    <br>
    Of course, a higher priority than Contact in sending would be
    Record-Route, but it is not the case of your example.<br>
    <br>
    In other words, SIP allows to create dialogs on one transport and
    request a follow up on another transport. Even the response to a
    request can have different destination (ip, port or protocol) than
    the address from where the request was sent, Via header specifying
    where it should be sent.<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <br>
    <div class="moz-cite-prefix">On 11/06/14 21:32, Klaus Feichtinger
      wrote:<br>
    </div>
    <blockquote cite="mid:5398AEE0.7080004@inode.at" type="cite">
      <meta http-equiv="content-type" content="text/html;
        charset=ISO-8859-1">
      Hello,<br>
      <br>
      I wonder if it is allowed using transport protocol UDP for SIP
      NOTIFY requests (which are generated by Kamailio/presence module),
      when the SUBSCRIBE dialog was established using TCP as transport
      protocol.<br>
      In other words: this is a principal question if it is allowed
      changing the transport protocol for in-dialog transactions e.g.
      from TCP to UDP. Initially I rather thought that in-dialog
      transactions shall use the same transport protocol as the dialog
      itself (e.g. SIP INFO requests within a standard media session),
      except the message would be too big for UDP, where a change to TCP
      is recommended.<br>
      <br>
      Can anybody give me a hint, if the current behaviour of Kamailio
      is correct or not? Or - how can I bind Kamailio to a specific
      transport protocol (for messages that are created by modules
      themselves)? Kamailio is sending NOTIFY requests with UDP, even
      when the subscription was done with TCP (see excerpt below).<br>
      <br>
      <small><small><font face="Courier New">09:58:10.360749 IP (tos
            0x0, ttl 64, id 35302, offset 0, flags [DF], proto TCP (6),
            length 444) 10.1.1.14.37883 > 10.1.1.44.5060: P, cksum
            0x1cb3 (correct), 1:393(392) ack 1 win 457
            <nop,nop,timestamp 624699305 795715664><br>
            SUBSCRIBE <a moz-do-not-send="true"
              class="moz-txt-link-abbreviated"
              href="mailto:sip:116006@10.1.1.44;transport=TCP">sip:116006@10.1.1.44;transport=TCP</a>
            SIP/2.0<br>
            Via: SIP/2.0/TCP
            10.1.1.14:5070;rport;branch=z9hG4bK1540213071<br>
            From: <a moz-do-not-send="true"
              class="moz-txt-link-rfc2396E"
              href="mailto:sip:1@10.1.1.14:5070"><sip:1@10.1.1.14:5070></a>;tag=620071678<br>
            To: <a moz-do-not-send="true" class="moz-txt-link-rfc2396E"
              href="mailto:sip:116006@10.1.1.44;transport=TCP"><sip:116006@10.1.1.44;transport=TCP></a><br>
            Call-ID: 449986375<br>
            CSeq: 20 SUBSCRIBE<br>
            Contact: <a moz-do-not-send="true"
              class="moz-txt-link-rfc2396E"
              href="mailto:sip:1@10.1.1.14:37883"><sip:1@10.1.1.14:37883></a><br>
            Max-Forwards: 70<br>
            Expires: 1200<br>
            Event: presence<br>
            Content-Length: 0<br>
             <br>
             <br>
            09:58:10.361324 IP (tos 0x10, ttl 64, id 65438, offset 0,
            flags [DF], proto TCP (6), length 431) 10.1.1.44.5060 >
            10.1.1.14.37883: P, cksum 0x29fb (correct), 1:380(379) ack
            393 win 215 <nop,nop,timestamp 795715792 624699305><br>
            SIP/2.0 202 OK<br>
            Via: SIP/2.0/TCP
            10.1.1.14:5070;rport=37883;branch=z9hG4bK1540213071<br>
            From: <a moz-do-not-send="true"
              class="moz-txt-link-rfc2396E"
              href="mailto:sip:1@10.1.1.14:5070"><sip:1@10.1.1.14:5070></a>;tag=620071678<br>
            To:
            <a moz-do-not-send="true" class="moz-txt-link-rfc2396E"
              href="mailto:sip:116006@10.1.1.44;transport=TCP"><sip:116006@10.1.1.44;transport=TCP></a>;tag=4f7a7e54f75c89f5b968c90011d693b5-9eed<br>
            Call-ID: 449986375<br>
            CSeq: 20 SUBSCRIBE<br>
            Expires: 1200<br>
            Contact: <a class="moz-txt-link-rfc2396E" href="sip:10.1.1.44:5060;transport=tcp"><sip:10.1.1.44:5060;transport=tcp></a><br>
            Content-Length: 0<br>
             <br>
             <br>
            09:58:10.361507 IP (tos 0x10, ttl 64, id 32295, offset 0,
            flags [none], proto UDP (17), length 484) 10.1.1.44.5060
            > 10.1.1.14.37883: SIP, length: 456<br>
            NOTIFY <a moz-do-not-send="true"
              class="moz-txt-link-abbreviated"
              href="mailto:sip:1@10.1.1.14:37883">sip:1@10.1.1.14:37883</a>
            SIP/2.0<br>
            Via: SIP/2.0/UDP
            10.1.1.44;branch=z9hG4bKc408.509e6347000000000000000000000000.0<br>
            To: <a moz-do-not-send="true"
              class="moz-txt-link-abbreviated"
              href="mailto:sip:1@10.1.1.14;tag=620071678">sip:1@10.1.1.14;tag=620071678</a><br>
            From: <a moz-do-not-send="true"
              class="moz-txt-link-abbreviated"
href="mailto:sip:116006@10.1.1.44;tag=4f7a7e54f75c89f5b968c90011d693b5-9eed">sip:116006@10.1.1.44;tag=4f7a7e54f75c89f5b968c90011d693b5-9eed</a><br>
            CSeq: 2 NOTIFY<br>
            Call-ID: 449986375<br>
            Content-Length: 0<br>
            User-Agent: kamailio (4.0.4 (i386/linux))<br>
            Max-Forwards: 70<br>
            Event: presence<br>
            Contact: <a class="moz-txt-link-rfc2396E" href="sip:10.1.1.44:5060;transport=tcp"><sip:10.1.1.44:5060;transport=tcp></a><br>
            Subscription-State: active;expires=1200<br>
          </font></small></small><br>
      Thx<br>
      Klaus<br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a></pre>
  </body>
</html>