Index: pjproject/trunk/tests/pjsua/scripts-sipp/uas-register-ip-change.xml
===================================================================
--- pjproject/trunk/tests/pjsua/scripts-sipp/uas-register-ip-change.xml	(revision 4547)
+++ pjproject/trunk/tests/pjsua/scripts-sipp/uas-register-ip-change.xml	(revision 4586)
@@ -8,6 +8,21 @@
   <send>
     <![CDATA[
+      SIP/2.0 100 Trying
+      [last_Via:];received=1.1.1.1;rport=1111
+      [last_From:]
+      [last_To:];tag=[call_number]
+      [last_Call-ID:]
+      [last_CSeq:]
+      WWW-Authenticate: digest realm="test"
+      Content-Length: 0
+    ]]>
+  </send>
+
+  <pause milliseconds="2000"/>
+
+  <send>
+    <![CDATA[
       SIP/2.0 401 Unauthorized
-      [last_Via:];received=1.1.1.1;rport=1111
+      [last_Via:];received=2.2.2.2;rport=2222
       [last_From:]
       [last_To:];tag=[call_number]
@@ -24,6 +39,24 @@
   <send>
     <![CDATA[
+      SIP/2.0 401 Unauthorized again
+      [last_Via:];received=3.3.3.3;rport=3333
+      [last_From:]
+      [last_To:];tag=[call_number]
+      [last_Call-ID:]
+      [last_CSeq:]
+      [last_Contact:]
+      WWW-Authenticate: digest realm="test", stale=true
+      Content-Length: 0
+    ]]>
+  </send>
+
+
+  <recv request="REGISTER" crlf="true">
+  </recv>
+
+  <send>
+    <![CDATA[
       SIP/2.0 200 OK
-      [last_Via:];received=1.1.1.1;rport=1111
+      [last_Via:];received=4.4.4.4;rport=4444
       [last_From:]
       [last_To:];tag=[call_number]
@@ -35,5 +68,40 @@
   </send>
 
-  <!-- REREGISTER -->
+  <!-- IP CHANGE FOR 200/OK -->
+
+  <recv request="REGISTER" crlf="true">
+  </recv>
+
+  <send>
+    <![CDATA[
+      SIP/2.0 401 Unauthorized
+      [last_Via:];received=5.5.5.5;rport=5555
+      [last_From:]
+      [last_To:];tag=[call_number]
+      [last_Call-ID:]
+      [last_CSeq:]
+      [last_Contact:]
+      WWW-Authenticate: digest realm="test"
+      Content-Length: 0
+    ]]>
+  </send>
+
+  <recv request="REGISTER" crlf="true">
+  </recv>
+
+  <send>
+    <![CDATA[
+      SIP/2.0 401 Nasty Unauthorized
+      [last_Via:];received=6.6.6.6;rport=6666
+      [last_From:]
+      [last_To:];tag=[call_number]
+      [last_Call-ID:]
+      [last_CSeq:]
+      [last_Contact:]
+      WWW-Authenticate: digest realm="test", stale=true
+      Content-Length: 0
+    ]]>
+  </send>
+
   <recv request="REGISTER" crlf="true">
   </recv>
@@ -42,5 +110,5 @@
     <![CDATA[
       SIP/2.0 200 OK
-      [last_Via:];received=1.1.1.1;rport=1111
+      [last_Via:];received=8.8.8.8;rport=8888
       [last_From:]
       [last_To:];tag=[call_number]
@@ -48,11 +116,8 @@
       [last_CSeq:]
       [last_Contact:]
-      Subject: Reregister due to IP change, this has two Contacts
       Content-Length: 0
     ]]>
   </send>
 
-
-  <!-- REFRESH, GOT IP CHANGE AGAIN -->
   <recv request="REGISTER" crlf="true">
   </recv>
@@ -61,5 +126,5 @@
     <![CDATA[
       SIP/2.0 200 OK
-      [last_Via:];received=2.2.2.2;rport=2222
+      [last_Via:];received=8.8.8.8;rport=8888
       [last_From:]
       [last_To:];tag=[call_number]
@@ -67,61 +132,4 @@
       [last_CSeq:]
       [last_Contact:]
-      Subject: Refresh, got IP change again
-      Content-Length: 0
-    ]]>
-  </send>
-
-
-  <!-- REREGISTER -->
-  <recv request="REGISTER" crlf="true">
-  </recv>
-
-  <send>
-    <![CDATA[
-      SIP/2.0 200 OK
-      [last_Via:];received=2.2.2.2;rport=2222
-      [last_From:]
-      [last_To:];tag=[call_number]
-      [last_Call-ID:]
-      [last_CSeq:]
-      [last_Contact:]
-      Subject: Reregister due to IP change to 2.2.2.2, this has two Contacts
-      Content-Length: 0
-    ]]>
-  </send>
-
-
-  <!-- WHATEVER -->
-  <recv request="REGISTER" crlf="true">
-  </recv>
-
-  <send>
-    <![CDATA[
-      SIP/2.0 200 OK
-      [last_Via:];received=2.2.2.2;rport=2222
-      [last_From:]
-      [last_To:];tag=[call_number]
-      [last_Call-ID:]
-      [last_CSeq:]
-      [last_Contact:]
-      Subject: Whatever 1
-      Content-Length: 0
-    ]]>
-  </send>
-
-  <!-- WHATEVER -->
-  <recv request="REGISTER" crlf="true">
-  </recv>
-
-  <send>
-    <![CDATA[
-      SIP/2.0 200 OK
-      [last_Via:];received=2.2.2.2;rport=2222
-      [last_From:]
-      [last_To:];tag=[call_number]
-      [last_Call-ID:]
-      [last_CSeq:]
-      [last_Contact:]
-      Subject: Whatever 2
       Content-Length: 0
     ]]>
