title: Validity of SIP ACK response to SIP 200 OK message
body: <p>We are sending a sip call to one of our partner. They are sending us “Record-Route” and “Contact” headers within 200 OK message. Our side is sending ACK to the IP address mentioned in the Record-Route but it is replacing the “Contact” header with “Route” header and other side is not honoring our ACK and sending us repeated 200 OK which results into call disconnection.</p>
  
  <p>I am not sure if we are violating any SIP RFC by changing "Contact" header to "Route" while maintaining the contents of the header. Can anyone shed a light on it?</p>
  
  <p><strong>Here is the 200 OK from partner side:</strong></p>
  
  <pre><code>SIP/2.0 200 OK
  Via: SIP/2.0/UDP 100.100.100.100;received=100.100.100.100;rport=5060
  Record-Route: &lt;sip:200.200.200.2:5060;lr&gt;
  Contact: &lt;sip:+100@10.10.10.135:7654&gt;
  To: +200&lt;sip:+200@200.200.200.2:5060&gt;;tag=784054843
  From: +100&lt;sip:+100@100.100.100.100:5060&gt;;tag=4244235125227
  Call-ID: CANTATA21.1a8.1200679.50@100.100.100.100
  CSeq: 1 INVITE
  Allow: ACK, INVITE, BYE, CANCEL
  Content-Type: application/sdp
  Server: YATE/3.0.0
  Content-Length: 195
  
  v=0
  o=yate 1441225325 1441225325 IN IP4 201.201.201.30
  s=SIP Call
  c=IN IP4 201.201.201.30
  t=0 0
  m=audio 19305 RTP/AVP 0 101
  a=rtpmap:0 PCMU/8000
  a=rtpmap:101 telephone-event/8000
  a=sendrecv
  </code></pre>
  
  <p><strong>Here is our ACK to 200 OK message:</strong></p>
  
  <pre><code>ACK sip:200.200.200.2:5060 SIP/2.0
  Via: SIP/2.0/UDP 100.100.100.100
  To: +200&lt;sip:+200@200.200.200.2:5060&gt;;tag=784054843
  From: +100&lt;sip:+100@100.100.100.100:5060&gt;;tag=4244235125227
  Call-ID: CANTATA21.1a8.1200679.50@100.100.100.100
  CSeq: 1 ACK
  Max-Forwards: 70
  Route: &lt;sip:+100@10.10.10.135:7654&gt;
  Content-Length: 0
  </code></pre>
  
  <p><strong>Here is the Entire SIP dialog:</strong></p>
  
  <pre><code>INVITE sip:+200@200.200.200.2:5060 SIP/2.0
  Via: SIP/2.0/UDP 100.100.100.100
  To: +200&lt;sip:+200@200.200.200.2:5060&gt;
  From: +100&lt;sip:+100@100.100.100.100:5060&gt;;tag=4244235125227
  Call-ID: CANTATA21.1a8.1200679.50@100.100.100.100
  Contact: +100&lt;sip:+100@100.100.100.100:5060&gt;
  User-Agent: Excel_CSP/84.11.34
  Supported: timer
  Session-Expires: 3660
  Min-SE: 300
  CSeq: 1 INVITE
  Max-Forwards: 70
  Content-Type: application/sdp
  Content-Length: 144
  
  v=0
  o=sip 0 0 IN IP4 100.100.100.100
  s=SIP_Call
  c=IN IP4 100.100.100.230
  t=0 0
  m=audio 46750 RTP/AVP 0 101
  a=rtpmap:101 telephone-event/8000
  
  SIP/2.0 100 Trying
  Via: SIP/2.0/UDP 100.100.100.100;received=100.100.100.100;rport=5060
  Record-Route: &lt;sip:200.200.200.2:5060;lr&gt;
  To: +200&lt;sip:+200@200.200.200.2:5060&gt;
  From: +100&lt;sip:+100@100.100.100.100:5060&gt;;tag=4244235125227
  Call-ID: CANTATA21.1a8.1200679.50@100.100.100.100
  CSeq: 1 INVITE
  Server: YATE/3.0.0
  Content-Length: 0
  
  SIP/2.0 180 Ringing
  Via: SIP/2.0/UDP 100.100.100.100;received=100.100.100.100;rport=5060
  Record-Route: &lt;sip:200.200.200.2:5060;lr&gt;
  Contact: &lt;sip:+100@10.10.10.135:7654&gt;
  To: +200&lt;sip:+200@200.200.200.2:5060&gt;;tag=784054843
  From: +100&lt;sip:+100@100.100.100.100:5060&gt;;tag=4244235125227
  Call-ID: CANTATA21.1a8.1200679.50@100.100.100.100
  CSeq: 1 INVITE
  Allow: ACK, INVITE, BYE, CANCEL
  Server: YATE/3.0.0
  Content-Length: 0
  
  SIP/2.0 200 OK
  Via: SIP/2.0/UDP 100.100.100.100;received=100.100.100.100;rport=5060
  Record-Route: &lt;sip:200.200.200.2:5060;lr&gt;
  Contact: &lt;sip:+100@10.10.10.135:7654&gt;
  To: +200&lt;sip:+200@200.200.200.2:5060&gt;;tag=784054843
  From: +100&lt;sip:+100@100.100.100.100:5060&gt;;tag=4244235125227
  Call-ID: CANTATA21.1a8.1200679.50@100.100.100.100
  CSeq: 1 INVITE
  Allow: ACK, INVITE, BYE, CANCEL
  Content-Type: application/sdp
  Server: YATE/3.0.0
  Content-Length: 195
  
  v=0
  o=yate 1441225325 1441225325 IN IP4 201.201.201.30
  s=SIP Call
  c=IN IP4 201.201.201.30
  t=0 0
  m=audio 19305 RTP/AVP 0 101
  a=rtpmap:0 PCMU/8000
  a=rtpmap:101 telephone-event/8000
  a=sendrecv
  
  ACK sip:200.200.200.2:5060 SIP/2.0
  Via: SIP/2.0/UDP 100.100.100.100
  To: +200&lt;sip:+200@200.200.200.2:5060&gt;;tag=784054843
  From: +100&lt;sip:+100@100.100.100.100:5060&gt;;tag=4244235125227
  Call-ID: CANTATA21.1a8.1200679.50@100.100.100.100
  CSeq: 1 ACK
  Max-Forwards: 70
  Route: &lt;sip:+100@10.10.10.135:7654&gt;
  Content-Length: 0
  
  SIP/2.0 200 OK
  Via: SIP/2.0/UDP 100.100.100.100;received=100.100.100.100;rport=5060
  Record-Route: &lt;sip:200.200.200.2:5060;lr&gt;
  Contact: &lt;sip:+100@10.10.10.135:7654&gt;
  To: +200&lt;sip:+200@200.200.200.2:5060&gt;;tag=784054843
  From: +100&lt;sip:+100@100.100.100.100:5060&gt;;tag=4244235125227
  Call-ID: CANTATA21.1a8.1200679.50@100.100.100.100
  CSeq: 1 INVITE
  Allow: ACK, INVITE, BYE, CANCEL
  Content-Type: application/sdp
  Server: YATE/3.0.0
  Content-Length: 195
  
  v=0
  o=yate 1441225325 1441225325 IN IP4 201.201.201.30
  s=SIP Call
  c=IN IP4 201.201.201.30
  t=0 0
  m=audio 19305 RTP/AVP 0 101
  a=rtpmap:0 PCMU/8000
  a=rtpmap:101 telephone-event/8000
  a=sendrecv
  ACK sip:200.200.200.2:5060 SIP/2.0
  Via: SIP/2.0/UDP 100.100.100.100
  To: +200&lt;sip:+200@200.200.200.2:5060&gt;;tag=784054843
  From: +100&lt;sip:+100@100.100.100.100:5060&gt;;tag=4244235125227
  Call-ID: CANTATA21.1a8.1200679.50@100.100.100.100
  CSeq: 1 ACK
  Max-Forwards: 70
  Route: &lt;sip:+100@10.10.10.135:7654&gt;
  Content-Length: 0
  
  SIP/2.0 200 OK
  Via: SIP/2.0/UDP 100.100.100.100;received=100.100.100.100;rport=5060
  Record-Route: &lt;sip:200.200.200.2:5060;lr&gt;
  Contact: &lt;sip:+100@10.10.10.135:7654&gt;
  To: +200&lt;sip:+200@200.200.200.2:5060&gt;;tag=784054843
  From: +100&lt;sip:+100@100.100.100.100:5060&gt;;tag=4244235125227
  Call-ID: CANTATA21.1a8.1200679.50@100.100.100.100
  CSeq: 1 INVITE
  Allow: ACK, INVITE, BYE, CANCEL
  Content-Type: application/sdp
  Server: YATE/3.0.0
  Content-Length: 195
  
  v=0
  o=yate 1441225325 1441225325 IN IP4 201.201.201.30
  s=SIP Call
  c=IN IP4 201.201.201.30
  t=0 0
  m=audio 19305 RTP/AVP 0 101
  a=rtpmap:0 PCMU/8000
  a=rtpmap:101 telephone-event/8000
  a=sendrecv
  ACK sip:200.200.200.2:5060 SIP/2.0
  Via: SIP/2.0/UDP 100.100.100.100
  To: +200&lt;sip:+200@200.200.200.2:5060&gt;;tag=784054843
  From: +100&lt;sip:+100@100.100.100.100:5060&gt;;tag=4244235125227
  Call-ID: CANTATA21.1a8.1200679.50@100.100.100.100
  CSeq: 1 ACK
  Max-Forwards: 70
  Route: &lt;sip:+100@10.10.10.135:7654&gt;
  Content-Length: 0
  
  SIP/2.0 200 OK
  Via: SIP/2.0/UDP 100.100.100.100;received=100.100.100.100;rport=5060
  Record-Route: &lt;sip:200.200.200.2:5060;lr&gt;
  Contact: &lt;sip:+100@10.10.10.135:7654&gt;
  To: +200&lt;sip:+200@200.200.200.2:5060&gt;;tag=784054843
  From: +100&lt;sip:+100@100.100.100.100:5060&gt;;tag=4244235125227
  Call-ID: CANTATA21.1a8.1200679.50@100.100.100.100
  CSeq: 1 INVITE
  Allow: ACK, INVITE, BYE, CANCEL
  Content-Type: application/sdp
  Server: YATE/3.0.0
  Content-Length: 195
  
  v=0
  o=yate 1441225325 1441225325 IN IP4 201.201.201.30
  s=SIP Call
  c=IN IP4 201.201.201.30
  t=0 0
  m=audio 19305 RTP/AVP 0 101
  a=rtpmap:0 PCMU/8000
  a=rtpmap:101 telephone-event/8000
  a=sendrecv
  ACK sip:200.200.200.2:5060 SIP/2.0
  Via: SIP/2.0/UDP 100.100.100.100
  To: +200&lt;sip:+200@200.200.200.2:5060&gt;;tag=784054843
  From: +100&lt;sip:+100@100.100.100.100:5060&gt;;tag=4244235125227
  Call-ID: CANTATA21.1a8.1200679.50@100.100.100.100
  CSeq: 1 ACK
  Max-Forwards: 70
  Route: &lt;sip:+100@10.10.10.135:7654&gt;
  Content-Length: 0
  
  SIP/2.0 200 OK
  Via: SIP/2.0/UDP 100.100.100.100;received=100.100.100.100;rport=5060
  Record-Route: &lt;sip:200.200.200.2:5060;lr&gt;
  Contact: &lt;sip:+100@10.10.10.135:7654&gt;
  To: +200&lt;sip:+200@200.200.200.2:5060&gt;;tag=784054843
  From: +100&lt;sip:+100@100.100.100.100:5060&gt;;tag=4244235125227
  Call-ID: CANTATA21.1a8.1200679.50@100.100.100.100
  CSeq: 1 INVITE
  Allow: ACK, INVITE, BYE, CANCEL
  Content-Type: application/sdp
  Server: YATE/3.0.0
  Content-Length: 195
  
  v=0
  o=yate 1441225325 1441225325 IN IP4 201.201.201.30
  s=SIP Call
  c=IN IP4 201.201.201.30
  t=0 0
  m=audio 19305 RTP/AVP 0 101
  a=rtpmap:0 PCMU/8000
  a=rtpmap:101 telephone-event/8000
  a=sendrecv
  ACK sip:200.200.200.2:5060 SIP/2.0
  Via: SIP/2.0/UDP 100.100.100.100
  To: +200&lt;sip:+200@200.200.200.2:5060&gt;;tag=784054843
  From: +100&lt;sip:+100@100.100.100.100:5060&gt;;tag=4244235125227
  Call-ID: CANTATA21.1a8.1200679.50@100.100.100.100
  CSeq: 1 ACK
  Max-Forwards: 70
  Route: &lt;sip:+100@10.10.10.135:7654&gt;
  Content-Length: 0
  
  SIP/2.0 200 OK
  Via: SIP/2.0/UDP 100.100.100.100;received=100.100.100.100;rport=5060
  Record-Route: &lt;sip:200.200.200.2:5060;lr&gt;
  Contact: &lt;sip:+100@10.10.10.135:7654&gt;
  To: +200&lt;sip:+200@200.200.200.2:5060&gt;;tag=784054843
  From: +100&lt;sip:+100@100.100.100.100:5060&gt;;tag=4244235125227
  Call-ID: CANTATA21.1a8.1200679.50@100.100.100.100
  CSeq: 1 INVITE
  Allow: ACK, INVITE, BYE, CANCEL
  Content-Type: application/sdp
  Server: YATE/3.0.0
  Content-Length: 195
  
  v=0
  o=yate 1441225325 1441225325 IN IP4 201.201.201.30
  s=SIP Call
  c=IN IP4 201.201.201.30
  t=0 0
  m=audio 19305 RTP/AVP 0 101
  a=rtpmap:0 PCMU/8000
  a=rtpmap:101 telephone-event/8000
  a=sendrecv
  
  
  ACK sip:200.200.200.2:5060 SIP/2.0
  Via: SIP/2.0/UDP 100.100.100.100
  To: +200&lt;sip:+200@200.200.200.2:5060&gt;;tag=784054843
  From: +100&lt;sip:+100@100.100.100.100:5060&gt;;tag=4244235125227
  Call-ID: CANTATA21.1a8.1200679.50@100.100.100.100
  CSeq: 1 ACK
  Max-Forwards: 70
  Route: &lt;sip:+100@10.10.10.135:7654&gt;
  Content-Length: 0
  
  BYE sip:+100@100.100.100.100:5060 SIP/2.0
  Via: SIP/2.0/UDP 200.200.200.2:5060;branch=z9hG4bK-524287-1---baf0e608a3be462e3d9534147efb1150;rport
  Via: SIP/2.0/UDP 10.10.10.135:7654;rport=7654;branch=z9hG4bK962836463;received=10.10.10.135
  Max-Forwards: 69
  Record-Route: &lt;sip:200.200.200.2:5060;lr&gt;
  To: &lt;sip:+100@100.100.100.100:5060&gt;;tag=4244235125227
  From: &lt;sip:+200@200.200.200.2:5060&gt;;tag=784054843
  Call-ID: CANTATA21.1a8.1200679.50@100.100.100.100
  CSeq: 95618 BYE
  Allow: ACK, INVITE, BYE, CANCEL
  User-Agent: YATE/3.0.0
  Reason: SIP;cause=408;text="Request Timeout"
  Content-Length: 0
  
  SIP/2.0 200 OK 
  To: &lt;sip:+100@100.100.100.100:5060&gt;;tag=4244235125227
  From: &lt;sip:+200@200.200.200.2:5060&gt;;tag=784054843
  Call-ID: CANTATA21.1a8.1200679.50@100.100.100.100
  CSeq: 95618 BYE
  Record-Route: &lt;sip:200.200.200.2:5060;lr&gt;
  Via: SIP/2.0/UDP 200.200.200.2:5060;branch=z9hG4bK-524287-1---baf0e608a3be462e3d9534147efb1150;rport
  Via: SIP/2.0/UDP 10.10.10.135:7654;rport=7654;branch=z9hG4bK962836463;received=10.10.10.135
  User-Agent: Excel_CSP/84.11.34
  Content-Length: 0
  </code></pre>
  
  <p>IP addresses and SIP TO/FROM information has been manually updated to conceal the original identity.</p>
  
  <p>I have gone through RFC 3261 I found following on page # 161. I am not sure, how to read the following table. Does it mean that Contact header is not applicable in ACK to 2xx messages?</p>
  
  <pre><code>Header field          where   proxy ACK BYE CAN INV OPT REG
        ___________________________________________________________
        Contact          2xx           -   -    -   m   o   o
  </code></pre>