Index: /pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app.c
===================================================================
--- /pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app.c	(revision 2372)
+++ /pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app.c	(revision 2373)
@@ -178,4 +178,5 @@
     puts  ("  --id=url            Set the URL of local ID (used in From header)");
     puts  ("  --contact=url       Optionally override the Contact information");
+    puts  ("  --contact-params=S  Append the specified parameters S in Contact URI");
     puts  ("  --proxy=url         Optional URL of proxy server to visit");
     puts  ("                      May be specified multiple times");
@@ -463,4 +464,5 @@
 	   OPT_LOCAL_PORT, OPT_IP_ADDR, OPT_PROXY, OPT_OUTBOUND_PROXY, 
 	   OPT_REGISTRAR, OPT_REG_TIMEOUT, OPT_PUBLISH, OPT_ID, OPT_CONTACT,
+	   OPT_CONTACT_PARAMS,
 	   OPT_100REL, OPT_USE_IMS, OPT_REALM, OPT_USERNAME, OPT_PASSWORD,
 	   OPT_NAMESERVER, OPT_STUN_DOMAIN, OPT_STUN_SRV,
@@ -518,4 +520,5 @@
 	{ "id",		1, 0, OPT_ID},
 	{ "contact",	1, 0, OPT_CONTACT},
+	{ "contact-params",1,0, OPT_CONTACT_PARAMS},
 	{ "auto-update-nat",	1, 0, OPT_AUTO_UPDATE_NAT},
         { "use-compact-form",	0, 0, OPT_USE_COMPACT_FORM},
@@ -827,4 +830,8 @@
 	    break;
 
+	case OPT_CONTACT_PARAMS:
+	    cur_acc->contact_params = pj_str(pj_optarg);
+	    break;
+
 	case OPT_AUTO_UPDATE_NAT:   /* OPT_AUTO_UPDATE_NAT */
             cur_acc->allow_contact_rewrite  = pj_strtoul(pj_cstr(&tmp, pj_optarg));
@@ -1368,4 +1375,12 @@
 			(int)acc_cfg->force_contact.slen, 
 			acc_cfg->force_contact.ptr);
+	pj_strcat2(result, line);
+    }
+
+    /* Contact parameters */
+    if (acc_cfg->contact_params.slen) {
+	pj_ansi_sprintf(line, "--contact-params %.*s\n", 
+			(int)acc_cfg->contact_params.slen, 
+			acc_cfg->contact_params.ptr);
 	pj_strcat2(result, line);
     }
Index: /pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h
===================================================================
--- /pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h	(revision 2372)
+++ /pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h	(revision 2373)
@@ -2132,4 +2132,16 @@
 
     /**
+     * Additional URI parameters that will be appended in the Contact header
+     * for this account. This will affect the Contact header in all SIP 
+     * messages sent on behalf of this account, including but not limited to
+     * REGISTER, INVITE, and SUBCRIBE requests or responses.
+     *
+     * The parameters should be preceeded by semicolon, and all strings must
+     * be properly escaped. Example:
+     *	 ";my-param=X;another-param=Hi%20there"
+     */
+    pj_str_t	    contact_params;
+
+    /**
      * Specify whether support for reliable provisional response (100rel and
      * PRACK) should be required for all sessions of this account.
Index: /pjproject/trunk/pjsip/src/pjsua-lib/pjsua_acc.c
===================================================================
--- /pjproject/trunk/pjsip/src/pjsua-lib/pjsua_acc.c	(revision 2372)
+++ /pjproject/trunk/pjsip/src/pjsua-lib/pjsua_acc.c	(revision 2373)
@@ -682,5 +682,5 @@
 	tmp = (char*) pj_pool_alloc(pool, PJSIP_MAX_URL_SIZE);
 	len = pj_ansi_snprintf(tmp, PJSIP_MAX_URL_SIZE,
-			       "<sip:%.*s%s%.*s:%d;transport=%s>",
+			       "<sip:%.*s%s%.*s:%d;transport=%s%.*s>",
 			       (int)acc->user_part.slen,
 			       acc->user_part.ptr,
@@ -689,5 +689,7 @@
 			       via_addr->ptr,
 			       rport,
-			       tp->type_name);
+			       tp->type_name,
+			       (int)acc->cfg.contact_params.slen,
+			       acc->cfg.contact_params.ptr);
 	if (len < 1) {
 	    PJ_LOG(1,(THIS_FILE, "URI too long"));
@@ -1664,5 +1666,5 @@
     contact->ptr = (char*)pj_pool_alloc(pool, PJSIP_MAX_URL_SIZE);
     contact->slen = pj_ansi_snprintf(contact->ptr, PJSIP_MAX_URL_SIZE,
-				     "%.*s%s<%s:%.*s%s%s%.*s%s:%d%s>",
+				     "%.*s%s<%s:%.*s%s%s%.*s%s:%d%s%.*s>",
 				     (int)acc->display.slen,
 				     acc->display.ptr,
@@ -1677,5 +1679,7 @@
 				     endquote,
 				     local_port,
-				     transport_param);
+				     transport_param,
+				     (int)acc->cfg.contact_params.slen,
+				     acc->cfg.contact_params.ptr);
 
     return PJ_SUCCESS;
@@ -1814,5 +1818,5 @@
     contact->ptr = (char*) pj_pool_alloc(pool, PJSIP_MAX_URL_SIZE);
     contact->slen = pj_ansi_snprintf(contact->ptr, PJSIP_MAX_URL_SIZE,
-				     "%.*s%s<%s:%.*s%s%s%.*s%s:%d%s>",
+				     "%.*s%s<%s:%.*s%s%s%.*s%s:%d%s%.*s>",
 				     (int)acc->display.slen,
 				     acc->display.ptr,
@@ -1827,5 +1831,7 @@
 				     endquote,
 				     local_port,
-				     transport_param);
+				     transport_param,
+				     (int)acc->cfg.contact_params.slen,
+				     acc->cfg.contact_params.ptr);
 
     return PJ_SUCCESS;
