Index: pjproject/trunk/pjmedia/include/pjmedia/transport.h
===================================================================
--- pjproject/trunk/pjmedia/include/pjmedia/transport.h	(revision 1872)
+++ pjproject/trunk/pjmedia/include/pjmedia/transport.h	(revision 1873)
@@ -406,5 +406,5 @@
 
 /**
- * This structure describes buffer storage of transport specific info.
+ * This structure describes storage buffer of transport specific info.
  * The actual transport specific info contents will be defined by transport
  * implementation. Note that some transport implementations do not need to
@@ -457,8 +457,21 @@
 
 /**
- * Get media socket info from the specified transport. The socket info
- * contains information about the local address of this transport, and
- * would be needed for example to fill in the "c=" and "m=" line of local 
- * SDP.
+ * Initialize transport info.
+ *
+ * @param info	    Transport info to be initialized.
+ */
+PJ_INLINE(void) pjmedia_transport_info_init(pjmedia_transport_info *info)
+{
+    pj_bzero(&info->sock_info, sizeof(pjmedia_sock_info));
+    info->sock_info.rtp_sock = info->sock_info.rtcp_sock = PJ_INVALID_SOCKET;
+    info->specific_info_cnt = 0;
+}
+
+
+/**
+ * Get media transport info from the specified transport and all underlying 
+ * transports if any. The transport also contains information about socket info
+ * which describes the local address of the transport, and would be needed
+ * for example to fill in the "c=" and "m=" line of local SDP.
  *
  * @param tp	    The transport.
Index: pjproject/trunk/pjmedia/src/pjmedia/transport_ice.c
===================================================================
--- pjproject/trunk/pjmedia/src/pjmedia/transport_ice.c	(revision 1872)
+++ pjproject/trunk/pjmedia/src/pjmedia/transport_ice.c	(revision 1873)
@@ -701,6 +701,4 @@
     }
 
-    info->specific_info_cnt = 0;
-
     return PJ_SUCCESS;
 }
Index: pjproject/trunk/pjmedia/src/pjmedia/transport_srtp.c
===================================================================
--- pjproject/trunk/pjmedia/src/pjmedia/transport_srtp.c	(revision 1872)
+++ pjproject/trunk/pjmedia/src/pjmedia/transport_srtp.c	(revision 1873)
@@ -565,8 +565,4 @@
 		     PJMEDIA_TRANSPORT_SPECIFIC_INFO_MAXSIZE, PJ_ENOMEM);
 
-    status = pjmedia_transport_get_info(srtp->real_tp, info);
-    if (status != PJ_SUCCESS)
-	return status;
-
     srtp_info.active = srtp->session_inited;
     srtp_info.rx_policy = srtp->rx_policy;
@@ -579,5 +575,5 @@
 	      sizeof(srtp_info));
 
-    return PJ_SUCCESS;
+    return pjmedia_transport_get_info(srtp->real_tp, info);
 }
 
Index: pjproject/trunk/pjmedia/src/pjmedia/transport_udp.c
===================================================================
--- pjproject/trunk/pjmedia/src/pjmedia/transport_udp.c	(revision 1872)
+++ pjproject/trunk/pjmedia/src/pjmedia/transport_udp.c	(revision 1873)
@@ -594,5 +594,4 @@
     info->sock_info.rtcp_sock = udp->rtcp_sock;
     info->sock_info.rtcp_addr_name = udp->rtcp_addr_name;
-    info->specific_info_cnt = 0;
 
     return PJ_SUCCESS;
Index: pjproject/trunk/pjsip-apps/src/samples/simpleua.c
===================================================================
--- pjproject/trunk/pjsip-apps/src/samples/simpleua.c	(revision 1872)
+++ pjproject/trunk/pjsip-apps/src/samples/simpleua.c	(revision 1873)
@@ -302,4 +302,5 @@
      * the SDP).
      */
+    pjmedia_transport_info_init(&g_med_tpinfo);
     pjmedia_transport_get_info(g_med_transport, &g_med_tpinfo);
 
Index: pjproject/trunk/pjsip-apps/src/samples/siprtp.c
===================================================================
--- pjproject/trunk/pjsip-apps/src/samples/siprtp.c	(revision 1872)
+++ pjproject/trunk/pjsip-apps/src/samples/siprtp.c	(revision 1873)
@@ -1013,5 +1013,5 @@
 
     /* Get transport info */
-    pj_bzero(&tpinfo, sizeof(tpinfo));
+    pjmedia_transport_info_init(&tpinfo);
     pjmedia_transport_get_info(audio->transport, &tpinfo);
 
Index: pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c
===================================================================
--- pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c	(revision 1872)
+++ pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c	(revision 1873)
@@ -2261,4 +2261,5 @@
 
     /* Get SRTP status */
+    pjmedia_transport_info_init(&tp_info);
     pjmedia_transport_get_info(call->med_tp, &tp_info);
     if (tp_info.specific_info_cnt > 0) {
@@ -2471,4 +2472,5 @@
 	pjmedia_transport_info ti;
 
+	pjmedia_transport_info_init(&ti);
 	pjmedia_transport_get_info(call->med_tp, &ti);
 	status = pjmedia_endpt_create_sdp(pjsua_var.med_endpt, tdata->pool, 
@@ -2582,4 +2584,5 @@
 
     /* Get media socket info */
+    pjmedia_transport_info_init(&tp_info);
     pjmedia_transport_get_info(call->med_tp, &tp_info);
 
Index: pjproject/trunk/pjsip/src/pjsua-lib/pjsua_core.c
===================================================================
--- pjproject/trunk/pjsip/src/pjsua-lib/pjsua_core.c	(revision 1872)
+++ pjproject/trunk/pjsip/src/pjsua-lib/pjsua_core.c	(revision 1873)
@@ -321,4 +321,5 @@
 
     /* Get media socket info */
+    pjmedia_transport_info_init(&tpinfo);
     pjmedia_transport_get_info(pjsua_var.calls[0].med_tp, &tpinfo);
 
@@ -2065,6 +2066,7 @@
 
 	/* MSVC complains about tpinfo not being initialized */
-	pj_bzero(&tpinfo, sizeof(tpinfo));
-
+	//pj_bzero(&tpinfo, sizeof(tpinfo));
+
+	pjmedia_transport_info_init(&tpinfo);
 	pjmedia_transport_get_info(call->med_tp, &tpinfo);
 
Index: pjproject/trunk/pjsip/src/pjsua-lib/pjsua_media.c
===================================================================
--- pjproject/trunk/pjsip/src/pjsua-lib/pjsua_media.c	(revision 1872)
+++ pjproject/trunk/pjsip/src/pjsua-lib/pjsua_media.c	(revision 1873)
@@ -840,4 +840,5 @@
 
     /* Get media socket info */
+    pjmedia_transport_info_init(&tpinfo);
     pjmedia_transport_get_info(call->med_tp, &tpinfo);
 
