Index: /pjproject/trunk/pjsip/src/pjsua-lib/pjsua_acc.c
===================================================================
--- /pjproject/trunk/pjsip/src/pjsua-lib/pjsua_acc.c	(revision 1654)
+++ /pjproject/trunk/pjsip/src/pjsua-lib/pjsua_acc.c	(revision 1655)
@@ -865,5 +865,4 @@
     pjsua_acc *acc;
     pj_str_t contact;
-    char contact_buf[1024];
     pj_pool_t *pool;
     pj_status_t status;
@@ -894,5 +893,5 @@
     }
 
-    pool = pj_pool_create_on_buf(NULL, contact_buf, sizeof(contact_buf));
+    pool = pjsua_pool_create("tmpregc", 512, 512);
     status = pjsua_acc_create_uac_contact( pool, &contact,
 					   acc_id, &acc->cfg.reg_uri);
@@ -902,4 +901,5 @@
 		     status);
 	pjsip_regc_destroy(acc->regc);
+	pj_pool_release(pool);
 	acc->regc = NULL;
 	return status;
@@ -917,4 +917,5 @@
 		     status);
 	pjsip_regc_destroy(acc->regc);
+	pj_pool_release(pool);
 	acc->regc = NULL;
 	return status;
@@ -953,5 +954,4 @@
 	pjsip_generic_string_hdr *h;
 
-	pool = pj_pool_create_on_buf(NULL, contact_buf, sizeof(contact_buf));
 	pj_list_init(&hdr_list);
 
@@ -962,4 +962,6 @@
 	pjsip_regc_add_headers(acc->regc, &hdr_list);
     }
+
+    pj_pool_release(pool);
 
     return PJ_SUCCESS;
Index: /pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c
===================================================================
--- /pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c	(revision 1654)
+++ /pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c	(revision 1655)
@@ -1501,5 +1501,5 @@
     pjsua_call *dest_call;
     pjsip_dialog *dest_dlg;
-    char str_dest_buf[512];
+    char str_dest_buf[PJSIP_MAX_URL_SIZE*2];
     pj_str_t str_dest;
     int len;
Index: /pjproject/trunk/pjsip/src/pjsua-lib/pjsua_media.c
===================================================================
--- /pjproject/trunk/pjsip/src/pjsua-lib/pjsua_media.c	(revision 1654)
+++ /pjproject/trunk/pjsip/src/pjsua-lib/pjsua_media.c	(revision 1655)
@@ -221,5 +221,5 @@
     pj_sockaddr_in mapped_addr[2];
     pj_status_t status = PJ_SUCCESS;
-    char addr_buf[80];
+    char addr_buf[PJ_INET6_ADDRSTRLEN+2];
     pj_sock_t sock[2];
 
@@ -625,4 +625,5 @@
 	pjmedia_ice_cb ice_cb;
 	int next_port;
+	char name[32];
 #if PJMEDIA_ADVERTISE_RTCP
 	enum { COMP_CNT=2 };
@@ -634,5 +635,7 @@
 	ice_cb.on_ice_complete = &on_ice_complete;
 
-	status = pjmedia_ice_create(pjsua_var.med_endpt, NULL, COMP_CNT,
+	pj_ansi_snprintf(name, sizeof(name), "icetp%02d", i);
+			 
+	status = pjmedia_ice_create(pjsua_var.med_endpt, name, COMP_CNT,
 				    &pjsua_var.stun_cfg, &ice_cb,
 				    &pjsua_var.calls[i].med_tp);
@@ -891,6 +894,4 @@
     pjmedia_stream_info *si = NULL;
     pjmedia_port *media_port;
-    pj_str_t port_name;
-    char tmp[PJSIP_MAX_URL_SIZE];
     pj_status_t status;
 
@@ -953,5 +954,4 @@
 
     } else {
-
 	/* Start ICE */
 	if (pjsua_var.media_cfg.enable_ice) {
@@ -1013,17 +1013,22 @@
 	 * Add the call to conference bridge.
 	 */
-	port_name.ptr = tmp;
-	port_name.slen = pjsip_uri_print(PJSIP_URI_IN_REQ_URI,
-					 call->inv->dlg->remote.info->uri,
-					 tmp, sizeof(tmp));
-	if (port_name.slen < 1) {
-	    port_name = pj_str("call");
-	}
-	status = pjmedia_conf_add_port( pjsua_var.mconf, call->inv->pool,
-					media_port, 
-					&port_name,
-					(unsigned*)&call->conf_slot);
-	if (status != PJ_SUCCESS) {
-	    return status;
+	{
+	    char tmp[PJSIP_MAX_URL_SIZE];
+	    pj_str_t port_name;
+
+	    port_name.ptr = tmp;
+	    port_name.slen = pjsip_uri_print(PJSIP_URI_IN_REQ_URI,
+					     call->inv->dlg->remote.info->uri,
+					     tmp, sizeof(tmp));
+	    if (port_name.slen < 1) {
+		port_name = pj_str("call");
+	    }
+	    status = pjmedia_conf_add_port( pjsua_var.mconf, call->inv->pool,
+					    media_port, 
+					    &port_name,
+					    (unsigned*)&call->conf_slot);
+	    if (status != PJ_SUCCESS) {
+		return status;
+	    }
 	}
 
@@ -1090,5 +1095,5 @@
 PJ_DEF(unsigned) pjsua_conf_get_active_ports(void)
 {
-    unsigned ports[256];
+    unsigned ports[PJSUA_MAX_CONF_PORTS];
     unsigned count = PJ_ARRAY_SIZE(ports);
     pj_status_t status;
