Index: pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h
===================================================================
--- pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h	(revision 4163)
+++ pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h	(revision 4164)
@@ -3561,4 +3561,48 @@
 
 /**
+ * Call media information.
+ */
+typedef struct pjsua_call_media_info
+{
+    /** Media index in SDP. */
+    unsigned		index;
+
+    /** Media type. */
+    pjmedia_type	type;
+
+    /** Media direction. */
+    pjmedia_dir		dir;
+
+    /** Call media status. */
+    pjsua_call_media_status status;
+
+    /** The specific media stream info. */
+    union {
+	/** Audio stream */
+	struct {
+	    /** The conference port number for the call.  */
+	    pjsua_conf_port_id	    conf_slot;
+	} aud;
+
+	/** Video stream */
+	struct {
+	    /**
+	     * The window id for incoming video, if any, or
+	     * PJSUA_INVALID_ID.
+	     */
+	    pjsua_vid_win_id	    win_in;
+
+	    /** The video capture device for outgoing transmission,
+	     *  if any, or PJMEDIA_VID_INVALID_DEV
+	     */
+	    pjmedia_vid_dev_index   cap_dev;
+
+	} vid;
+    } stream;
+
+} pjsua_call_media_info;
+
+
+/**
  * This structure describes the information and current status of a call.
  */
@@ -3613,47 +3657,18 @@
     pjsua_conf_port_id	conf_slot;
 
-    /** Number of media streams in this call */
+    /** Number of active media info in this call. */
     unsigned		media_cnt;
 
-    /** Array of media stream information */
-    struct
-    {
-	/** Media index in SDP. */
-	unsigned		index;
-
-	/** Media type. */
-	pjmedia_type		type;
-
-	/** Media direction. */
-	pjmedia_dir		dir;
-
-	/** Call media status. */
-	pjsua_call_media_status status;
-
-	/** The specific media stream info. */
-	union {
-	    /** Audio stream */
-	    struct {
-		/** The conference port number for the call.  */
-		pjsua_conf_port_id   conf_slot;
-	    } aud;
-
-	    /** Video stream */
-	    struct {
-		/**
-		 * The window id for incoming video, if any, or
-		 * PJSUA_INVALID_ID.
-		 */
-		pjsua_vid_win_id     win_in;
-
-		/** The video capture device for outgoing transmission,
-		 *  if any, or PJMEDIA_VID_INVALID_DEV
-		 */
-		pjmedia_vid_dev_index	cap_dev;
-
-	    } vid;
-	} stream;
-
-    } media[PJMEDIA_MAX_SDP_MEDIA];
+    /** Array of active media information. */
+    pjsua_call_media_info media[PJMEDIA_MAX_SDP_MEDIA];
+
+    /** Number of provisional media info in this call. */
+    unsigned		prov_media_cnt;
+
+    /** Array of provisional media information. This contains the media info
+     *  in the provisioning state, that is when the media session is being
+     *  created/updated (SDP offer/answer is on progress).
+     */
+    pjsua_call_media_info prov_media[PJMEDIA_MAX_SDP_MEDIA];
 
     /** Up-to-date call connected duration (zero when call is not 
Index: pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c
===================================================================
--- pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c	(revision 4163)
+++ pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c	(revision 4164)
@@ -1615,5 +1615,5 @@
     }
 
-    /* Build array of media status and dir */
+    /* Build array of active media info */
     info->media_cnt = 0;
     for (mi=0; mi < call->med_cnt &&
@@ -1650,4 +1650,34 @@
 	info->media_dir = call->media[call->audio_idx].dir;
 	info->conf_slot = call->media[call->audio_idx].strm.a.conf_slot;
+    }
+
+    /* Build array of provisional media info */
+    info->prov_media_cnt = 0;
+    for (mi=0; mi < call->med_prov_cnt &&
+	       info->prov_media_cnt < PJ_ARRAY_SIZE(info->prov_media); ++mi)
+    {
+	pjsua_call_media *call_med = &call->media_prov[mi];
+
+	info->prov_media[info->prov_media_cnt].index = mi;
+	info->prov_media[info->prov_media_cnt].status = call_med->state;
+	info->prov_media[info->prov_media_cnt].dir = call_med->dir;
+	info->prov_media[info->prov_media_cnt].type = call_med->type;
+	if (call_med->type == PJMEDIA_TYPE_AUDIO) {
+	    info->prov_media[info->prov_media_cnt].stream.aud.conf_slot =
+						call_med->strm.a.conf_slot;
+	} else if (call_med->type == PJMEDIA_TYPE_VIDEO) {
+	    pjmedia_vid_dev_index cap_dev = PJMEDIA_VID_INVALID_DEV;
+
+	    info->prov_media[info->prov_media_cnt].stream.vid.win_in = 
+						call_med->strm.v.rdr_win_id;
+
+	    if (call_med->strm.v.cap_win_id != PJSUA_INVALID_ID) {
+		cap_dev = call_med->strm.v.cap_dev;
+	    }
+	    info->prov_media[info->prov_media_cnt].stream.vid.cap_dev=cap_dev;
+	} else {
+	    continue;
+	}
+	++info->prov_media_cnt;
     }
 
