Status: New
Owner: ----
Labels: Priority-Medium

New issue 28 by [email protected]: When a UAC receives a 2xx response to a target refresh request it must replace the remote target URI with the Contact Header field of the reponse, if present
http://code.google.com/p/jain-sip/issues/detail?id=28

What steps will reproduce the problem?

The Call Flow Tested is:

Jain Sip UA Remote UA (SIPP)
      |                                                              |
      |                                                              |
      |                        INVITE  (1)                           |
      | -----------------------------------------------------------> |
      |                                                              |
      |                                                              |
      |                    200 OK INVITE  (2)                        |
      |                with Header Contact: [CONTACT_VALUE_1]        |
      | <----------------------------------------------------------- |
      |                                                              |
      |                                                              |
      |                        ACK  (3)                              |
      |         with Request-Line: INVITE [CONTACT_VALUE_1] SIP/2.0  |
      | -----------------------------------------------------------> |
      |                                                              |
      |                   ***** Call Established ****                |
      |                                                              |
      |                                                              |
      |                      Re-INVITE  (4)                          |
      |     with Request-Line: INVITE [CONTACT_VALUE_1] SIP/2.0      |
      | -----------------------------------------------------------> |
      |                                                              |
      |                                                              |
      |                     200 OK Re-INVITE (5)                     |
      |              with Header Contact: [CONTACT_VALUE_2]          |
      | <----------------------------------------------------------- |
      |                                                              |
      |                                                              |
      |                 ACK  (6)                                     |
      |     with Request-Line: INVITE [CONTACT_VALUE_2] SIP/2.0      |
      |  ----------------------------------------------------------> |
      |                                                              |
      |                                                              |
      |                      BYE  (7)                                |
      |     with Request-Line: INVITE [CONTACT_VALUE_2] SIP/2.0      |
      | -----------------------------------------------------------> |
      |                                                              |
      |                                                              |
      |                     200 OK BYE (8)                           |
      | <----------------------------------------------------------- |


What is the expected output? What do you see instead?

 Considering the Rfcs:
   - RFC 3261 chapter 12.2.1.2:
When a UAC receives a 2xx response to a target refresh request, it MUST replace the dialog's remote target URI with the URI from the Contact header field in that response, if present. - RFC 6141 chapter 4.5: UA Updating the Dialog's Local Target in a Response. A UA processing an incoming target refresh request can update its local target by returning a reliable provisional response or a 2xx response to the target-refresh request. The response needs to contain the updated local target URI in its Contact header field. On sending the response, the UA can consider the target refresh operation completed.

What version of the product are you using? On what operating system?

Tested on the current version of jain-sip

Please provide any additional information below.

Proposed patch:

Save the remote Target Uri (when receiving 200 OK INVITE):

Add this code at line 3385 of gov.nist.javax.sip.stack.SIPDialog:

ContactList contactList = sipResponse.getContactHeaders();
if (contactList != null) {
  this.setRemoteTarget((ContactHeader) contactList.getFirst());
}

The remote target uri will be save and it seems that works.


Reply via email to