Index: pjproject/trunk/pjmedia/include/pjmedia/transport_ice.h
===================================================================
--- pjproject/trunk/pjmedia/include/pjmedia/transport_ice.h	(revision 4605)
+++ pjproject/trunk/pjmedia/include/pjmedia/transport_ice.h	(revision 4606)
@@ -222,4 +222,13 @@
 					 pjmedia_transport **p_tp);
 
+/**
+ * Get the group lock for the ICE media transport.
+ *
+ * @param tp	        The ICE media transport.
+ *
+ * @return		The group lock.
+ */
+PJ_DECL(pj_grp_lock_t *) pjmedia_ice_get_grp_lock(pjmedia_transport *tp);
+
 PJ_END_DECL
 
Index: pjproject/trunk/pjmedia/src/pjmedia/transport_ice.c
===================================================================
--- pjproject/trunk/pjmedia/src/pjmedia/transport_ice.c	(revision 4605)
+++ pjproject/trunk/pjmedia/src/pjmedia/transport_ice.c	(revision 4606)
@@ -284,4 +284,10 @@
 }
 
+PJ_DEF(pj_grp_lock_t *) pjmedia_ice_get_grp_lock(pjmedia_transport *tp)
+{
+    PJ_ASSERT_RETURN(tp, NULL);
+    return pj_ice_strans_get_grp_lock(((struct transport_ice *)tp)->ice_st);
+}
+
 /* Disable ICE when SDP from remote doesn't contain a=candidate line */
 static void set_no_ice(struct transport_ice *tp_ice, const char *reason,
Index: pjproject/trunk/pjnath/include/pjnath/ice_strans.h
===================================================================
--- pjproject/trunk/pjnath/include/pjnath/ice_strans.h	(revision 4605)
+++ pjproject/trunk/pjnath/include/pjnath/ice_strans.h	(revision 4606)
@@ -565,4 +565,12 @@
 					       const pj_ice_sess_options *opt);
 
+/**
+ * Get the group lock for this ICE stream transport.
+ *
+ * @param ice_st	The ICE stream transport.
+ *
+ * @return		The group lock.
+ */
+PJ_DECL(pj_grp_lock_t *) pj_ice_strans_get_grp_lock(pj_ice_strans *ice_st);
 
 /**
Index: pjproject/trunk/pjnath/include/pjnath/stun_session.h
===================================================================
--- pjproject/trunk/pjnath/include/pjnath/stun_session.h	(revision 4605)
+++ pjproject/trunk/pjnath/include/pjnath/stun_session.h	(revision 4606)
@@ -436,4 +436,13 @@
 
 /**
+ * Get the group lock for this STUN session.
+ *
+ * @param sess	    The STUN session instance.
+ *
+ * @return	    The group lock.
+ */
+PJ_DECL(pj_grp_lock_t *) pj_stun_session_get_grp_lock(pj_stun_session *sess);
+
+/**
  * Set SOFTWARE name to be included in all requests and responses.
  *
Index: pjproject/trunk/pjnath/include/pjnath/stun_sock.h
===================================================================
--- pjproject/trunk/pjnath/include/pjnath/stun_sock.h	(revision 4605)
+++ pjproject/trunk/pjnath/include/pjnath/stun_sock.h	(revision 4606)
@@ -435,4 +435,14 @@
 
 /**
+ * Get the group lock for this STUN transport.
+ *
+ * @param stun_sock	The STUN transport instance.
+ *
+ * @return	        The group lock.
+ */
+PJ_DECL(pj_grp_lock_t *) pj_stun_sock_get_grp_lock(pj_stun_sock *stun_sock);
+
+
+/**
  * Get the STUN transport info. The transport info contains, among other
  * things, the allocated relay address.
Index: pjproject/trunk/pjnath/include/pjnath/turn_session.h
===================================================================
--- pjproject/trunk/pjnath/include/pjnath/turn_session.h	(revision 4605)
+++ pjproject/trunk/pjnath/include/pjnath/turn_session.h	(revision 4606)
@@ -514,4 +514,14 @@
 
 /**
+ * Get the group lock for this TURN session.
+ *
+ * @param sess		The TURN client session.
+ *
+ * @return	        The group lock.
+ */
+PJ_DECL(pj_grp_lock_t *) pj_turn_session_get_grp_lock(pj_turn_session *sess);
+
+
+/**
  * Configure message logging. By default all flags are enabled.
  *
Index: pjproject/trunk/pjnath/include/pjnath/turn_sock.h
===================================================================
--- pjproject/trunk/pjnath/include/pjnath/turn_sock.h	(revision 4605)
+++ pjproject/trunk/pjnath/include/pjnath/turn_sock.h	(revision 4606)
@@ -263,4 +263,14 @@
  */
 PJ_DECL(void*) pj_turn_sock_get_user_data(pj_turn_sock *turn_sock);
+
+
+/**
+ * Get the group lock for this TURN transport.
+ *
+ * @param turn_sock	The TURN transport instance.
+ *
+ * @return	        The group lock.
+ */
+PJ_DECL(pj_grp_lock_t *) pj_turn_sock_get_grp_lock(pj_turn_sock *turn_sock);
 
 
Index: pjproject/trunk/pjnath/src/pjnath/ice_strans.c
===================================================================
--- pjproject/trunk/pjnath/src/pjnath/ice_strans.c	(revision 4605)
+++ pjproject/trunk/pjnath/src/pjnath/ice_strans.c	(revision 4606)
@@ -798,4 +798,13 @@
 }
 
+/**
+ * Get the group lock for this ICE stream transport.
+ */
+PJ_DEF(pj_grp_lock_t *) pj_ice_strans_get_grp_lock(pj_ice_strans *ice_st)
+{
+    PJ_ASSERT_RETURN(ice_st, NULL);
+    return ice_st->grp_lock;
+}
+
 /*
  * Create ICE!
Index: pjproject/trunk/pjnath/src/pjnath/stun_session.c
===================================================================
--- pjproject/trunk/pjnath/src/pjnath/stun_session.c	(revision 4605)
+++ pjproject/trunk/pjnath/src/pjnath/stun_session.c	(revision 4606)
@@ -622,4 +622,10 @@
 }
 
+PJ_DEF(pj_grp_lock_t *) pj_stun_session_get_grp_lock(pj_stun_session *sess)
+{
+    PJ_ASSERT_RETURN(sess, NULL);
+    return sess->grp_lock;
+}
+
 PJ_DEF(pj_status_t) pj_stun_session_set_software_name(pj_stun_session *sess,
 						      const pj_str_t *sw)
Index: pjproject/trunk/pjnath/src/pjnath/stun_sock.c
===================================================================
--- pjproject/trunk/pjnath/src/pjnath/stun_sock.c	(revision 4605)
+++ pjproject/trunk/pjnath/src/pjnath/stun_sock.c	(revision 4606)
@@ -529,4 +529,11 @@
 }
 
+/* Get group lock */
+PJ_DECL(pj_grp_lock_t *) pj_stun_sock_get_grp_lock(pj_stun_sock *stun_sock)
+{
+    PJ_ASSERT_RETURN(stun_sock, NULL);
+    return stun_sock->grp_lock;
+}
+
 /* Notify application that session has failed */
 static pj_bool_t sess_fail(pj_stun_sock *stun_sock, 
Index: pjproject/trunk/pjnath/src/pjnath/turn_session.c
===================================================================
--- pjproject/trunk/pjnath/src/pjnath/turn_session.c	(revision 4605)
+++ pjproject/trunk/pjnath/src/pjnath/turn_session.c	(revision 4606)
@@ -526,4 +526,12 @@
 }
 
+/**
+ * Get group lock.
+ */
+PJ_DEF(pj_grp_lock_t *) pj_turn_session_get_grp_lock(pj_turn_session *sess)
+{
+    PJ_ASSERT_RETURN(sess, NULL);
+    return sess->grp_lock;
+}
 
 /*
Index: pjproject/trunk/pjnath/src/pjnath/turn_sock.c
===================================================================
--- pjproject/trunk/pjnath/src/pjnath/turn_sock.c	(revision 4605)
+++ pjproject/trunk/pjnath/src/pjnath/turn_sock.c	(revision 4606)
@@ -323,4 +323,13 @@
     PJ_ASSERT_RETURN(turn_sock, NULL);
     return turn_sock->user_data;
+}
+
+/*
+ * Get group lock.
+ */
+PJ_DEF(pj_grp_lock_t *) pj_turn_sock_get_grp_lock(pj_turn_sock *turn_sock)
+{
+    PJ_ASSERT_RETURN(turn_sock, NULL);
+    return turn_sock->grp_lock;
 }
 
