Index: /pjproject/branches/pjproject-0.5-stable/pjsip/src/pjsip/sip_msg.c
===================================================================
--- /pjproject/branches/pjproject-0.5-stable/pjsip/src/pjsip/sip_msg.c	(revision 1217)
+++ /pjproject/branches/pjproject-0.5-stable/pjsip/src/pjsip/sip_msg.c	(revision 1218)
@@ -1726,8 +1726,20 @@
     copy_advance_pair(buf, ";received=", 10, hdr->recvd_param);
     copy_advance_pair(buf, ";branch=", 8, hdr->branch_param);
-    
+
+    /* Via's via-extension params should be printed with token spec
+     * according to RFC 3261's generic-param production, but some
+     * endpoint uses pname/pvalue production for these params, by
+     * sending to us Via parameter containing ":".
+     * 
+     * So for interoperability sake, lets allow ":" in Via param.
+
     printed = pjsip_param_print_on(&hdr->other_param, buf, endbuf-buf, 
 				   &pjsip_TOKEN_SPEC,
-				   &pjsip_TOKEN_SPEC, ';');
+     				   &pjsip_TOKEN_SPEC, ';');
+     */
+    printed = pjsip_param_print_on(&hdr->other_param, buf, endbuf-buf, 
+				   &pjsip_PARAM_CHAR_SPEC,
+     				   &pjsip_PARAM_CHAR_SPEC, ';');
+
     if (printed < 0)
 	return -1;
Index: /pjproject/branches/pjproject-0.5-stable/pjsip/src/pjsip/sip_parser.c
===================================================================
--- /pjproject/branches/pjproject-0.5-stable/pjsip/src/pjsip/sip_parser.c	(revision 1217)
+++ /pjproject/branches/pjproject-0.5-stable/pjsip/src/pjsip/sip_parser.c	(revision 1218)
@@ -1844,5 +1844,14 @@
 	pj_str_t pname, pvalue;
 
+	/* Via's via-extension params should be printed with token spec
+	 * according to RFC 3261's generic-param production, but some
+	 * endpoint uses pname/pvalue production for these params, by
+	 * sending to us Via parameter containing ":".
+	 * 
+	 * So for interoperability sake, lets allow ":" in Via param.
 	int_parse_param( scanner, pool, &pname, &pvalue);
+	 */
+
+	int_parse_uri_param(scanner, pool, &pname, &pvalue);
 
 	if (!parser_stricmp(pname, pjsip_BRANCH_STR) && pvalue.slen) {
Index: /pjproject/branches/pjproject-0.5-stable/pjsip/src/test-pjsip/msg_test.c
===================================================================
--- /pjproject/branches/pjproject-0.5-stable/pjsip/src/test-pjsip/msg_test.c	(revision 1217)
+++ /pjproject/branches/pjproject-0.5-stable/pjsip/src/test-pjsip/msg_test.c	(revision 1218)
@@ -78,5 +78,5 @@
     /* Typical response message. */
     "SIP/2.0 200 OK\r\n"
-    "Via: SIP/2.0/SCTP server10.biloxi.com;branch=z9hG4bKnashds8;rport;received=192.0.2.1\r\n"
+    "Via: SIP/2.0/SCTP server10.biloxi.com;branch=z9hG4bKnashds8;rport;received=192.0.2.1;param=a:b\r\n"
     "Via: SIP/2.0/UDP bigbox3.site3.atlanta.com;branch=z9hG4bK77ef4c2312983.1;received=192.0.2.2\r\n"
     "Via: SIP/2.0/UDP pc33.atlanta.com;branch=z9hG4bK776asdhds ;received=192.0.2.3\r\n"
@@ -176,4 +176,11 @@
 	}
     }
+    if (!pj_list_empty(&err_list)) {
+	PJ_LOG(3,(THIS_FILE, "   Syntax error in line %d col %d",
+		      err_list.next->line, err_list.next->col));
+	status = -11;
+	goto on_return;
+    }
+
     pj_get_timestamp(&t2);
     pj_sub_timestamp(&t2, &t1);
@@ -554,4 +561,5 @@
     pjsip_cseq_hdr *cseq;
     pjsip_msg *msg = pjsip_msg_create(pool, PJSIP_RESPONSE_MSG);
+    pjsip_param *param;
     pjsip_msg_body *body;
 
@@ -560,5 +568,5 @@
     msg->line.status.reason = pj_str("OK");
 
-    //"Via: SIP/2.0/SCTP server10.biloxi.com;branch=z9hG4bKnashds8;rport;received=192.0.2.1\r\n"
+    //"Via: SIP/2.0/SCTP server10.biloxi.com;branch=z9hG4bKnashds8;rport;received=192.0.2.1;param=a:b\r\n"
     via = pjsip_via_hdr_create(pool);
     pjsip_msg_add_hdr(msg, (pjsip_hdr*)via);
@@ -568,4 +576,9 @@
     via->rport_param = 0;
     via->recvd_param = pj_str("192.0.2.1");
+
+    param = pj_pool_zalloc(pool, sizeof(pjsip_param));
+    param->name = pj_str("param");
+    param->value = pj_str("a:b");
+    pj_list_push_back(&via->other_param, param);
 
     //"Via: SIP/2.0/UDP bigbox3.site3.atlanta.com;branch=z9hG4bK77ef4c2312983.1;received=192.0.2.2\r\n"
