Index: pjproject/trunk/pjmedia/src/pjmedia/endpoint.c
===================================================================
--- pjproject/trunk/pjmedia/src/pjmedia/endpoint.c	(revision 774)
+++ pjproject/trunk/pjmedia/src/pjmedia/endpoint.c	(revision 775)
@@ -341,5 +341,5 @@
 	attr->value.slen = 
 	    pj_ansi_snprintf(attr->value.ptr, 80,
-			    ":%u IN IP4 %s",
+			    "%u IN IP4 %s",
 			    pj_ntohs(sock_info[0].rtcp_addr_name.sin_port),
 			    pj_inet_ntoa(sock_info[0].rtcp_addr_name.sin_addr));
@@ -404,5 +404,5 @@
 	    attr->value.slen = 
 		pj_ansi_snprintf( attr->value.ptr, 32,
-				  ":%d mode=%d",
+				  "%d mode=%d",
 				  codec_info->pt,
 				  codec_param.setting.dec_fmtp_mode);
@@ -428,5 +428,5 @@
     attr = pj_pool_zalloc(pool, sizeof(pjmedia_sdp_attr));
     attr->name = pj_str("rtpmap");
-    attr->value = pj_str(":" PJMEDIA_RTP_PT_TELEPHONE_EVENTS_STR 
+    attr->value = pj_str(PJMEDIA_RTP_PT_TELEPHONE_EVENTS_STR 
 			 " telephone-event/8000");
     m->attr[m->attr_count++] = attr;
@@ -435,5 +435,5 @@
     attr = pj_pool_zalloc(pool, sizeof(pjmedia_sdp_attr));
     attr->name = pj_str("fmtp");
-    attr->value = pj_str(":" PJMEDIA_RTP_PT_TELEPHONE_EVENTS_STR " 0-15");
+    attr->value = pj_str(PJMEDIA_RTP_PT_TELEPHONE_EVENTS_STR " 0-15");
     m->attr[m->attr_count++] = attr;
 #endif
Index: pjproject/trunk/pjmedia/src/pjmedia/sdp.c
===================================================================
--- pjproject/trunk/pjmedia/src/pjmedia/sdp.c	(revision 774)
+++ pjproject/trunk/pjmedia/src/pjmedia/sdp.c	(revision 775)
@@ -138,20 +138,5 @@
 		       const pj_str_t *c_fmt)
 {
-    char fmtbuf[16];
-    pj_str_t fmt = { NULL, 0};
     unsigned i;
-
-    if (c_fmt) {
-	/* To search the format, we prepend the string with a colon and
-	 * append space
-	 */
-	PJ_ASSERT_RETURN(c_fmt->slen<sizeof(fmtbuf)-2, NULL);
-	fmt.ptr = fmtbuf;
-	fmt.slen = c_fmt->slen + 2;
-	fmtbuf[0] = ':';
-	pj_memcpy(fmt.ptr+1, c_fmt->ptr, c_fmt->slen);
-	fmtbuf[c_fmt->slen+1] = ' ';
-
-    } 
 
     for (i=0; i<count; ++i) {
@@ -159,6 +144,6 @@
 	    const pjmedia_sdp_attr *a = attr_array[i];
 	    if (c_fmt) {
-		if (a->value.slen > fmt.slen &&
-		    pj_strncmp(&a->value, &fmt, fmt.slen)==0)
+		if (a->value.slen > c_fmt->slen &&
+		    pj_strncmp(&a->value, c_fmt, c_fmt->slen)==0)
 		{
 		    return (pjmedia_sdp_attr*)a;
@@ -290,10 +275,4 @@
     /* Parse */
     PJ_TRY {
-	/* Eat the first ':' */
-	if (pj_scan_get_char(&scanner) != ':') {
-	    status = PJMEDIA_SDP_EINRTPMAP;
-	    goto on_return;
-	}
-
 
 	/* Get payload type. */
@@ -353,10 +332,4 @@
      */
 
-    /* Eat the first ':' */
-    if (*p != ':') return PJMEDIA_SDP_EINFMTP;
-
-    /* Get ':' */
-    ++p;
-
     /* Get format. */
     token.ptr = (char*)p;
@@ -406,11 +379,4 @@
     PJ_TRY {
 
-	/* Get the first ":" */
-	if (pj_scan_get_char(&scanner) != ':')
-	{
-	    status = PJMEDIA_SDP_EINRTCP;
-	    goto on_return;
-	}
-
 	/* Get the port */
 	pj_scan_get(&scanner, &cs_token, &token);
@@ -439,5 +405,4 @@
     PJ_END;
 
-on_return:
     pj_scan_fini(&scanner);
     return status;
@@ -464,5 +429,5 @@
 {
     pjmedia_sdp_attr *attr;
-    char tempbuf[64];
+    char tempbuf[128];
     int len;
 
@@ -483,5 +448,5 @@
     /* Format: ":pt enc_name/clock_rate[/param]" */
     len = pj_ansi_snprintf(tempbuf, sizeof(tempbuf), 
-			   ":%.*s %.*s/%u%s%.*s",
+			   "%.*s %.*s/%u%s%.*s",
 			   (int)rtpmap->pt.slen,
 			   rtpmap->pt.ptr,
@@ -551,4 +516,5 @@
 
     if (attr->value.slen) {
+	*p++ = ':';
 	pj_memcpy(p, attr->value.ptr, attr->value.slen);
 	p += attr->value.slen;
@@ -1008,6 +974,16 @@
 
     if (*scanner->curptr != '\r' && *scanner->curptr != '\n') {
+	/* skip ':' if present. */
+	if (*scanner->curptr == ':')
+	    pj_scan_get_char(scanner);
+
 	/* get value */
-	pj_scan_get_until_ch(scanner, '\r', &attr->value);
+	if (*scanner->curptr != '\r') {
+	    pj_scan_get_until_ch(scanner, '\r', &attr->value);
+	} else {
+	    attr->value.ptr = NULL;
+	    attr->value.slen = 0;
+	}
+
     } else {
 	attr->value.ptr = NULL;
