Index: pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h
===================================================================
--- pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h	(revision 3451)
+++ pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h	(revision 3452)
@@ -3023,5 +3023,31 @@
 } pjsua_call_info;
 
-
+/**
+ * Flags to be given to various call APIs. More than one flags may be
+ * specified by bitmasking them.
+ */
+typedef enum pjsua_call_flag
+{
+    /**
+     * When the call is being put on hold, specify this flag to unhold it.
+     * This flag is only valid for #pjsua_call_reinvite() and
+     * #pjsua_call_update(). Note: for compatibility reason, this flag
+     * must have value of 1 because previously the unhold option is
+     * specified as boolean value.
+     */
+    PJSUA_CALL_UNHOLD = 1,
+
+    /**
+     * Update the local invite session's contact with the contact URI from
+     * the account. This flag is only valid for #pjsua_call_reinvite() and
+     * #pjsua_call_update(). This flag is useful in IP address change
+     * situation, after the local account's Contact has been updated
+     * (typically with re-registration) use this flag to update the invite
+     * session with the new Contact and to inform this new Contact to the
+     * remote peer with the outgoing re-INVITE or UPDATE
+     */
+    PJSUA_CALL_UPDATE_CONTACT = 2
+
+} pjsua_call_flag;
 
 /**
@@ -3313,6 +3339,7 @@
  *
  * @param call_id	Call identification.
- * @param unhold	If this argument is non-zero and the call is locally
- *			held, this will release the local hold.
+ * @param options	Bitmask of pjsua_call_flag constants. Note that
+ * 			for compatibility, specifying PJ_TRUE here is
+ * 			equal to specifying PJSUA_CALL_UNHOLD flag.
  * @param msg_data	Optional message components to be sent with
  *			the request.
@@ -3321,5 +3348,5 @@
  */
 PJ_DECL(pj_status_t) pjsua_call_reinvite(pjsua_call_id call_id,
-					 pj_bool_t unhold,
+					 unsigned options,
 					 const pjsua_msg_data *msg_data);
 
@@ -3328,5 +3355,5 @@
  *
  * @param call_id	Call identification.
- * @param options	Must be zero for now.
+ * @param options	Bitmask of pjsua_call_flag constants.
  * @param msg_data	Optional message components to be sent with
  *			the request.
Index: pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c
===================================================================
--- pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c	(revision 3451)
+++ pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c	(revision 3452)
@@ -1661,8 +1661,9 @@
  */
 PJ_DEF(pj_status_t) pjsua_call_reinvite( pjsua_call_id call_id,
-					 pj_bool_t unhold,
+                                         unsigned options,
 					 const pjsua_msg_data *msg_data)
 {
     pjmedia_sdp_session *sdp;
+    pj_str_t *new_contact = NULL;
     pjsip_tx_data *tdata;
     pjsua_call *call;
@@ -1685,5 +1686,5 @@
 
     /* Create SDP */
-    if (call->local_hold && !unhold) {
+    if (call->local_hold && (options & PJSUA_CALL_UNHOLD)==0) {
 	status = create_sdp_of_call_hold(call, &sdp);
     } else {
@@ -1700,6 +1701,12 @@
     }
 
+    if ((options & PJSUA_CALL_UPDATE_CONTACT) &
+	    pjsua_acc_is_valid(call->acc_id))
+    {
+	new_contact = &pjsua_var.acc[call->acc_id].contact;
+    }
+
     /* Create re-INVITE with new offer */
-    status = pjsip_inv_reinvite( call->inv, NULL, sdp, &tdata);
+    status = pjsip_inv_reinvite( call->inv, new_contact, sdp, &tdata);
     if (status != PJ_SUCCESS) {
 	pjsua_perror(THIS_FILE, "Unable to create re-INVITE", status);
@@ -1733,4 +1740,5 @@
 {
     pjmedia_sdp_session *sdp;
+    pj_str_t *new_contact = NULL;
     pjsip_tx_data *tdata;
     pjsua_call *call;
@@ -1758,6 +1766,12 @@
     }
 
+    if ((options & PJSUA_CALL_UPDATE_CONTACT) &
+	    pjsua_acc_is_valid(call->acc_id))
+    {
+	new_contact = &pjsua_var.acc[call->acc_id].contact;
+    }
+
     /* Create UPDATE with new offer */
-    status = pjsip_inv_update(call->inv, NULL, sdp, &tdata);
+    status = pjsip_inv_update(call->inv, new_contact, sdp, &tdata);
     if (status != PJ_SUCCESS) {
 	pjsua_perror(THIS_FILE, "Unable to create UPDATE request", status);
