<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-15">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    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 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 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 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 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 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 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: <sip:10.1.1.44:5060;transport=tcp><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 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 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 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: <sip:10.1.1.44:5060;transport=tcp><br>
          Subscription-State: active;expires=1200<br>
        </font></small></small><br>
    Thx<br>
    Klaus<br>
  </body>
</html>