Index: pjproject/trunk/pjlib-util/docs/doxygen.cfg
===================================================================
--- pjproject/trunk/pjlib-util/docs/doxygen.cfg	(revision 1747)
+++ pjproject/trunk/pjlib-util/docs/doxygen.cfg	(revision 1748)
@@ -844,9 +844,13 @@
 PREDEFINED             = PJ_DECL(x)=x PJ_DEF(x)=x PJ_IDECL(x)=x \
 			 PJ_IDEF(x)=x PJ_INLINE(x)=x \
+			 PJ_DECL_DATA(x)=x \
 			 PJ_DECL_NO_RETURN(x)=x \
+			 PJ_NO_RETURN=x \
 			 PJ_HAS_HIGH_RES_TIMER=1 \
 			 PJ_LOG_MAX_LEVEL=4 \
 			 PJ_HAS_SEMAPHORE=1 \
-			 PJ_HAS_EVENT_OBJ=1
+			 PJ_HAS_EVENT_OBJ=1 \
+			 PJ_HAS_TCP=1
+
 
 # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then 
Index: pjproject/trunk/pjlib-util/include/pjlib-util/md5.h
===================================================================
--- pjproject/trunk/pjlib-util/include/pjlib-util/md5.h	(revision 1747)
+++ pjproject/trunk/pjlib-util/include/pjlib-util/md5.h	(revision 1748)
@@ -39,7 +39,7 @@
 typedef struct pj_md5_context
 {
-	pj_uint32_t buf[4];
-	pj_uint32_t bits[2];
-	pj_uint8_t  in[64];
+	pj_uint32_t buf[4];	/**< buf    */
+	pj_uint32_t bits[2];	/**< bits   */
+	pj_uint8_t  in[64];	/**< in	    */
 } pj_md5_context;
 
Index: pjproject/trunk/pjlib-util/include/pjlib-util/scanner_cis_uint.h
===================================================================
--- pjproject/trunk/pjlib-util/include/pjlib-util/scanner_cis_uint.h	(revision 1747)
+++ pjproject/trunk/pjlib-util/include/pjlib-util/scanner_cis_uint.h	(revision 1748)
@@ -46,5 +46,5 @@
 typedef struct pj_cis_t
 {
-    PJ_CIS_ELEM_TYPE	cis_buf[256];
+    PJ_CIS_ELEM_TYPE	cis_buf[256];	/**< Internal buffer.	*/
 } pj_cis_t;
 
Index: pjproject/trunk/pjlib-util/include/pjlib-util/sha1.h
===================================================================
--- pjproject/trunk/pjlib-util/include/pjlib-util/sha1.h	(revision 1747)
+++ pjproject/trunk/pjlib-util/include/pjlib-util/sha1.h	(revision 1748)
@@ -38,7 +38,7 @@
 typedef struct pj_sha1_context
 {
-    pj_uint32_t state[5];
-    pj_uint32_t count[2];
-    pj_uint8_t	buffer[64];
+    pj_uint32_t state[5];	/**< State  */
+    pj_uint32_t count[2];	/**< Count  */
+    pj_uint8_t	buffer[64];	/**< Buffer */
 } pj_sha1_context;
 
Index: pjproject/trunk/pjlib-util/include/pjlib-util/srv_resolver.h
===================================================================
--- pjproject/trunk/pjlib-util/include/pjlib-util/srv_resolver.h	(revision 1747)
+++ pjproject/trunk/pjlib-util/include/pjlib-util/srv_resolver.h	(revision 1748)
@@ -33,5 +33,5 @@
  * @{
  *
- * \subsection PJ_DNS_SRV_RESOLVER_INTRO DNS SRV Resolution Helper
+ * \section PJ_DNS_SRV_RESOLVER_INTRO DNS SRV Resolution Helper
  *
  * This module provides an even higher layer of abstraction for the DNS
Index: pjproject/trunk/pjlib-util/include/pjlib-util/xml.h
===================================================================
--- pjproject/trunk/pjlib-util/include/pjlib-util/xml.h	(revision 1747)
+++ pjproject/trunk/pjlib-util/include/pjlib-util/xml.h	(revision 1748)
@@ -95,5 +95,5 @@
  */
 PJ_DECL(int) pj_xml_print( const pj_xml_node *node, char *buf, pj_size_t len,
-			   pj_bool_t include_prolog);
+			   pj_bool_t prolog);
 
 /**
@@ -124,5 +124,5 @@
  * @param pool	    Pool.
  * @param name	    Attribute name.
- * @param attr	    Attribute value.
+ * @param value	    Attribute value.
  *
  * @return	    The new XML attribute.
@@ -162,4 +162,5 @@
  *
  * @param parent    Parent node.
+ * @param node	    node->next is the starting point.
  * @param name	    Node name to find.
  *
@@ -185,5 +186,5 @@
  * Find a direct child node with the specified name and match the function.
  *
- * @param node	    Parent node.
+ * @param parent    Parent node.
  * @param name	    Optional name.
  * @param data	    Data to be passed to matching function.
Index: pjproject/trunk/pjlib/docs/doxygen.cfg
===================================================================
--- pjproject/trunk/pjlib/docs/doxygen.cfg	(revision 1747)
+++ pjproject/trunk/pjlib/docs/doxygen.cfg	(revision 1748)
@@ -844,5 +844,7 @@
 PREDEFINED             = PJ_DECL(x)=x PJ_DEF(x)=x PJ_IDECL(x)=x \
 			 PJ_IDEF(x)=x PJ_INLINE(x)=x \
+			 PJ_DECL_DATA(x)=x \
 			 PJ_DECL_NO_RETURN(x)=x \
+			 PJ_NO_RETURN=x \
 			 PJ_HAS_HIGH_RES_TIMER=1 \
 			 PJ_LOG_MAX_LEVEL=4 \
Index: pjproject/trunk/pjlib/include/pj/config.h
===================================================================
--- pjproject/trunk/pjlib/include/pj/config.h	(revision 1747)
+++ pjproject/trunk/pjlib/include/pj/config.h	(revision 1748)
@@ -450,5 +450,4 @@
 
 /**
- * \def PJ_HAS_TCP
  * Support TCP in the library.
  * Disabling TCP will reduce the footprint slightly (about 6KB).
@@ -461,5 +460,4 @@
 
 /**
- * \def PJ_HAS_IPV6
  * Support IPv6 in the library. If this support is disabled, some IPv6 
  * related functions will return PJ_EIPV6NOTSUP.
@@ -847,4 +845,9 @@
  */
 /**
+ * @def PJ_IDECL_NO_RETURN(type)
+ * @param type The return type of the function.
+ * Declare an inline function that will not return.
+ */
+/**
  * @def PJ_BEGIN_DECL
  * Mark beginning of declaration section in a header file.
Index: pjproject/trunk/pjlib/include/pj/errno.h
===================================================================
--- pjproject/trunk/pjlib/include/pj/errno.h	(revision 1747)
+++ pjproject/trunk/pjlib/include/pj/errno.h	(revision 1748)
@@ -112,5 +112,16 @@
 			       char *buf, pj_size_t bufsize);
 
-typedef pj_str_t (*pjsip_error_callback)(pj_status_t, char*, pj_size_t);
+/**
+ * Type of callback to be specified in #pj_register_strerror()
+ *
+ * @param e	    The error code to lookup.
+ * @param msg	    Buffer to store the error message.
+ * @param max	    Length of the buffer.
+ *
+ * @return	    The error string.
+ */
+typedef pj_str_t (*pj_error_callback)(pj_status_t e, char *msg, pj_size_t max);
+
+
 /**
  * Register strerror message handler for the specified error space.
@@ -134,5 +145,5 @@
 PJ_DECL(pj_status_t) pj_register_strerror(pj_status_t start_code,
 					  pj_status_t err_space,
-					  pjsip_error_callback f);
+					  pj_error_callback f);
 
 /**
Index: pjproject/trunk/pjlib/include/pj/ioqueue.h
===================================================================
--- pjproject/trunk/pjlib/include/pj/ioqueue.h	(revision 1747)
+++ pjproject/trunk/pjlib/include/pj/ioqueue.h	(revision 1748)
@@ -167,5 +167,5 @@
 
     /**
-     * This callback is called when #pj_ioqueue_write or #pj_ioqueue_sendto
+     * This callback is called when #pj_ioqueue_send or #pj_ioqueue_sendto
      * completes.
      *
Index: pjproject/trunk/pjlib/include/pj/pool.h
===================================================================
--- pjproject/trunk/pjlib/include/pj/pool.h	(revision 1747)
+++ pjproject/trunk/pjlib/include/pj/pool.h	(revision 1748)
@@ -613,4 +613,5 @@
 
 /**
+ * \def PJ_NO_MEMORY_EXCEPTION
  * This constant denotes the exception number that will be thrown by default
  * memory factory policy when memory allocation fails.
Index: pjproject/trunk/pjlib/src/pj/errno.c
===================================================================
--- pjproject/trunk/pjlib/src/pj/errno.c	(revision 1747)
+++ pjproject/trunk/pjlib/src/pj/errno.c	(revision 1748)
@@ -107,5 +107,5 @@
 PJ_DEF(pj_status_t) pj_register_strerror( pj_status_t start,
 					  pj_status_t space,
-					  pjsip_error_callback f)
+					  pj_error_callback f)
 {
     unsigned i;
Index: pjproject/trunk/pjmedia/docs/doxygen.cfg
===================================================================
--- pjproject/trunk/pjmedia/docs/doxygen.cfg	(revision 1747)
+++ pjproject/trunk/pjmedia/docs/doxygen.cfg	(revision 1748)
@@ -844,6 +844,13 @@
 PREDEFINED             = PJ_DECL(x)=x PJ_DEF(x)=x PJ_IDECL(x)=x \
 			 PJ_IDEF(x)=x PJ_INLINE(x)=x \
-			 PJ_BEGIN_DECL= PJ_END_DECL= \
-			 PJMEDIA_HAS_MP3_WRITER=1
+			 PJ_DECL_DATA(x)=x \
+			 PJ_DECL_NO_RETURN(x)=x \
+			 PJ_NO_RETURN=x \
+			 PJ_HAS_HIGH_RES_TIMER=1 \
+			 PJ_LOG_MAX_LEVEL=4 \
+			 PJ_HAS_SEMAPHORE=1 \
+			 PJ_HAS_EVENT_OBJ=1 \
+			 PJ_HAS_TCP=1 \
+			 PJMEDIA_HAS_SRTP=1
 
 # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then 
Index: pjproject/trunk/pjmedia/include/pjmedia/transport.h
===================================================================
--- pjproject/trunk/pjmedia/include/pjmedia/transport.h	(revision 1747)
+++ pjproject/trunk/pjmedia/include/pjmedia/transport.h	(revision 1748)
@@ -57,4 +57,10 @@
  * #pjmedia_transport_op directly.
  *
+ * The connection between \ref PJMED_STRM and media transport is shown in
+ * the diagram below:
+
+   \image html media-transport.PNG
+
+
  * \section PJMEDIA_TRANSPORT_H_USING Using the Media Transport
  *
@@ -136,4 +142,37 @@
  *
  *
+ * \section PJMEDIA_TRANSPORT_H_EXT Media Transport Extended API
+ 
+   Apart from the basic interface above, the media transport provides some
+   more APIs:
+
+    - pjmedia_transport_media_create()
+   \n
+      This API is provided to allow the media transport to add more information
+      in the SDP offer, before the offer is sent to remote. Additionally, for 
+      answerer side, this callback allows the media transport to reject the 
+      offer before this offer is processed by the SDP negotiator. 
+
+    - pjmedia_transport_media_start()
+    \n
+      This API should be called after offer and answer are negotiated, and 
+      both SDPs are available, and before the media is started. For answerer
+      side, this callback will be called before the answer is sent to remote,
+      to allow media transport to put additional info in the SDP. For 
+      offerer side, this callback will be called after SDP answer is 
+      received. In this callback, the media transport has the final chance 
+      to negotiate/validate the offer and answer before media is really 
+      started (and answer is sent, for answerer side). 
+
+    - pjmedia_transport_media_stop()
+    \n
+      This API should be called when the media is stopped, to allow the media
+      transport to release its resources. 
+
+    - pjmedia_transport_simulate_lost()
+    \n
+      This API can be used to instruct media transport to simulate packet lost
+      on a particular direction.
+
  * \section PJMEDIA_TRANSPORT_H_IMPL Implementing Media Transport
  *
@@ -169,5 +208,5 @@
 #include <pjmedia/sdp.h>
 
-/*
+/**
  * Forward declaration for media transport.
  */
@@ -459,4 +498,10 @@
  * Remote SDP might be needed as reference when application is in deciding
  * side of negotiation (callee side), otherwise it should be NULL.
+ *
+ * This API is provided to allow the media transport to add more information
+ * in the SDP offer, before the offer is sent to remote. Additionally, for 
+ * answerer side, this callback allows the media transport to reject the 
+ * offer before this offer is processed by the SDP negotiator. 
+ *
  * This is just a simple wrapper which calls <tt>media_create()</tt> member 
  * of the transport.
@@ -466,4 +511,5 @@
  * @param sdp_local	Local SDP.
  * @param sdp_remote	Remote SDP.
+ * @param media_index	Media index in SDP.
  *
  * @return		PJ_SUCCESS on success, or the appropriate error code.
@@ -481,4 +527,13 @@
 /**
  * Start the transport with regards to SDP negotiation result. 
+ * This API should be called after offer and answer are negotiated, and 
+ * both SDPs are available, and before the media is started. For answerer
+ * side, this callback will be called before the answer is sent to remote,
+ * to allow media transport to put additional info in the SDP. For 
+ * offerer side, this callback will be called after SDP answer is 
+ * received. In this callback, the media transport has the final chance 
+ * to negotiate/validate the offer and answer before media is really 
+ * started (and answer is sent, for answerer side). 
+ *
  * This is just a simple wrapper which calls <tt>media_start()</tt> member 
  * of the transport.
@@ -504,4 +559,7 @@
 /**
  * Stop the transport. 
+ * This API should be called when the media is stopped, to allow the media
+ * transport to release its resources. 
+ *
  * This is just a simple wrapper which calls <tt>media_stop()</tt> member 
  * of the transport.
Index: pjproject/trunk/pjmedia/include/pjmedia/transport_srtp.h
===================================================================
--- pjproject/trunk/pjmedia/include/pjmedia/transport_srtp.h	(revision 1747)
+++ pjproject/trunk/pjmedia/include/pjmedia/transport_srtp.h	(revision 1748)
@@ -22,9 +22,49 @@
 /**
  * @file srtp.h
- * @brief transport SRTP encapsulates secure media transport.
+ * @brief Secure RTP (SRTP) transport.
  */
 
 #include <pjmedia/transport.h>
 
+
+/**
+ * @defgroup PJMEDIA_TRANSPORT_SRTP Secure RTP (SRTP) Transport Adapter
+ * @ingroup PJMEDIA_TRANSPORT
+ * @brief Media transport adapter to add SRTP feature to existing transports
+ * @{
+ *
+ * This module implements SRTP as described by RFC 3711, using RFC 4568 as
+ * key exchange method. It implements \ref PJMEDIA_TRANSPORT_H to integrate
+ * with the rest of PJMEDIA framework.
+ *
+ * As we know, media transport is separated from the stream object (which 
+ * does the encoding/decoding of PCM frames, (de)packetization of RTP/RTCP 
+ * packets, and de-jitter buffering). The connection between stream and media
+ * transport is established when the stream is created (we need to specify 
+ * media transport during stream creation), and the interconnection can be 
+ * depicted from the diagram below:
+ *
+   \image html media-transport.PNG
+
+ * I think the diagram above is self-explanatory.
+ *
+ * SRTP functionality is implemented as some kind of "adapter", which is 
+ * plugged between the stream and the actual media transport that does 
+ * sending/receiving RTP/RTCP packets. When SRTP is used, the interconnection
+ * between stream and transport is like the diagram below:
+ *
+    \image html media-srtp-transport.PNG
+
+ * So to stream, the SRTP transport behaves as if it is a media transport 
+ * (because it is a media transport), and to the media transport it behaves
+ * as if it is a stream. The SRTP object then forwards RTP packets back and
+ * forth between stream and the actual transport, encrypting/decrypting 
+ * the RTP/RTCP packets as necessary.
+ * 
+ * The neat thing about this design is the SRTP "adapter" then can be used 
+ * to encrypt any kind of media transports. We currently have UDP and ICE 
+ * media transports that can benefit SRTP, and we could add SRTP to any 
+ * media transports that will be added in the future. 
+ */
 
 PJ_BEGIN_DECL
@@ -56,5 +96,5 @@
     pj_str_t	name;
 
-    /* Flags, bitmask from #pjmedia_srtp_crypto_option */
+    /** Flags, bitmask from #pjmedia_srtp_crypto_option */
     unsigned	flags;
 
@@ -169,5 +209,5 @@
  */
 PJ_DECL(pj_status_t) pjmedia_transport_srtp_start(
-					    pjmedia_transport *tp,
+					    pjmedia_transport *srtp,
 					    const pjmedia_srtp_crypto *tx,
 					    const pjmedia_srtp_crypto *rx);
@@ -182,5 +222,5 @@
  * @see #pjmedia_transport_srtp_start() 
  */
-PJ_DECL(pj_status_t) pjmedia_transport_srtp_stop(pjmedia_transport *tp);
+PJ_DECL(pj_status_t) pjmedia_transport_srtp_stop(pjmedia_transport *srtp);
 
 
@@ -193,8 +233,12 @@
  */
 PJ_DECL(pjmedia_transport*) pjmedia_transport_srtp_get_member(
-						    pjmedia_transport *tp);
+						    pjmedia_transport *srtp);
 
 
 PJ_END_DECL
 
+/**
+ * @}
+ */
+
 #endif /* __PJMEDIA_TRANSPORT_SRTP_H__ */
Index: pjproject/trunk/pjmedia/src/pjmedia/transport_udp.c
===================================================================
--- pjproject/trunk/pjmedia/src/pjmedia/transport_udp.c	(revision 1747)
+++ pjproject/trunk/pjmedia/src/pjmedia/transport_udp.c	(revision 1748)
@@ -749,4 +749,5 @@
     PJ_UNUSED_ARG(sdp_local);
     PJ_UNUSED_ARG(sdp_remote);
+    PJ_UNUSED_ARG(media_index);
 
     return PJ_SUCCESS;
Index: pjproject/trunk/pjsip/docs/doxygen.cfg
===================================================================
--- pjproject/trunk/pjsip/docs/doxygen.cfg	(revision 1747)
+++ pjproject/trunk/pjsip/docs/doxygen.cfg	(revision 1748)
@@ -368,5 +368,5 @@
 # subdirectory from a directory tree whose root is specified with the INPUT tag.
 
-EXCLUDE                = *_i.h
+EXCLUDE                = *_i.h pjsua_internal.h
 
 # The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories 
@@ -845,5 +845,6 @@
 
 PREDEFINED             = PJ_DECL(x)=x PJ_DEF(x)=x PJ_IDECL(x)=x \
-			 PJ_IDEF(x)=x PJ_INLINE(x)=x
+			 PJ_IDEF(x)=x PJ_INLINE(x)=x PJ_DECL_DATA(x)=x \
+			 PJMEDIA_HAS_SRTP=1
 
 
Index: pjproject/trunk/pjsip/include/pjsip-simple/evsub.h
===================================================================
--- pjproject/trunk/pjsip/include/pjsip-simple/evsub.h	(revision 1747)
+++ pjproject/trunk/pjsip/include/pjsip-simple/evsub.h	(revision 1748)
@@ -21,5 +21,5 @@
 
 /**
- * @file event_notify.h
+ * @file evsub.h
  * @brief SIP Specific Event Notification Extension (RFC 3265)
  */
@@ -133,5 +133,5 @@
      * However, implementation MUST send NOTIFY request upon receiving this
      * callback. The suggested behavior is to call 
-     * #pjsip_evsub_last_notify(), since this function takes care
+     * #pjsip_evsub_current_notify(), since this function takes care
      * about unsubscription request and calculates the appropriate expiration
      * interval.
Index: pjproject/trunk/pjsip/include/pjsip-simple/evsub_msg.h
===================================================================
--- pjproject/trunk/pjsip/include/pjsip-simple/evsub_msg.h	(revision 1747)
+++ pjproject/trunk/pjsip/include/pjsip-simple/evsub_msg.h	(revision 1748)
@@ -21,5 +21,5 @@
 
 /**
- * @file event_notify_msg.h
+ * @file evsub_msg.h
  * @brief SIP Event Notification Headers (RFC 3265)
  */
Index: pjproject/trunk/pjsip/include/pjsip-ua/sip_inv.h
===================================================================
--- pjproject/trunk/pjsip/include/pjsip-ua/sip_inv.h	(revision 1747)
+++ pjproject/trunk/pjsip/include/pjsip-ua/sip_inv.h	(revision 1748)
@@ -496,5 +496,5 @@
  * Create the initial response message for the incoming INVITE request in
  * rdata with  status code st_code and optional status text st_text. Use
- * #pjsip_answer() to create subsequent response message.
+ * #pjsip_inv_answer() to create subsequent response message.
  */
 PJ_DECL(pj_status_t) pjsip_inv_initial_answer(	pjsip_inv_session *inv,
Index: pjproject/trunk/pjsip/include/pjsip-ua/sip_regc.h
===================================================================
--- pjproject/trunk/pjsip/include/pjsip-ua/sip_regc.h	(revision 1747)
+++ pjproject/trunk/pjsip/include/pjsip-ua/sip_regc.h	(revision 1748)
@@ -21,5 +21,5 @@
 
 /**
- * @file sip_reg.h
+ * @file sip_regc.h
  * @brief SIP Registration Client
  */
Index: pjproject/trunk/pjsip/include/pjsip/sip_auth.h
===================================================================
--- pjproject/trunk/pjsip/include/pjsip/sip_auth.h	(revision 1747)
+++ pjproject/trunk/pjsip/include/pjsip/sip_auth.h	(revision 1748)
@@ -31,5 +31,5 @@
 
 /**
- * @addtogroup PJSIP_AUTH Authentication Framework
+ * @addtogroup PJSIP_AUTH
  * @ingroup PJSIP_CORE
  * @brief Client and server side authentication framework.
Index: pjproject/trunk/pjsip/include/pjsip/sip_auth_parser.h
===================================================================
--- pjproject/trunk/pjsip/include/pjsip/sip_auth_parser.h	(revision 1747)
+++ pjproject/trunk/pjsip/include/pjsip/sip_auth_parser.h	(revision 1748)
@@ -21,5 +21,5 @@
 
 /**
- * @file pjsip_auth_parser.h
+ * @file sip_auth_parser.h
  * @brief SIP Authorization Parser Module.
  */
Index: pjproject/trunk/pjsip/include/pjsip/sip_config.h
===================================================================
--- pjproject/trunk/pjsip/include/pjsip/sip_config.h	(revision 1747)
+++ pjproject/trunk/pjsip/include/pjsip/sip_config.h	(revision 1748)
@@ -352,5 +352,5 @@
  * Note that even when this setting is enabled, asynchronous DNS resolution
  * will only be done when application calls #pjsip_endpt_create_resolver(),
- * configure the nameservers with #pj_dns_resolver_set_ns(), and configure
+ * configure the nameservers with pj_dns_resolver_set_ns(), and configure
  * the SIP endpoint's DNS resolver with #pjsip_endpt_set_resolver(). If
  * these steps are not followed, the domain will be resolved with normal
Index: pjproject/trunk/pjsip/include/pjsip/sip_dialog.h
===================================================================
--- pjproject/trunk/pjsip/include/pjsip/sip_dialog.h	(revision 1747)
+++ pjproject/trunk/pjsip/include/pjsip/sip_dialog.h	(revision 1748)
@@ -22,5 +22,5 @@
 
 /**
- * @file dialog.h
+ * @file sip_dialog.h
  * @brief SIP Dialog abstraction
  */
Index: pjproject/trunk/pjsip/include/pjsip/sip_endpoint.h
===================================================================
--- pjproject/trunk/pjsip/include/pjsip/sip_endpoint.h	(revision 1747)
+++ pjproject/trunk/pjsip/include/pjsip/sip_endpoint.h	(revision 1748)
@@ -225,19 +225,4 @@
 
 /**
- * Create a new transaction. After creating the transaction, application MUST
- * initialize the transaction as either UAC or UAS (by calling
- * #pjsip_tsx_init_uac or #pjsip_tsx_init_uas), then must register the 
- * transaction to endpoint with #pjsip_endpt_register_tsx.
- * This function, like all other endpoint functions, is thread safe.
- *
- * @param endpt	    The SIP endpoint.
- * @param p_tsx	    Pointer to receive the transaction.
- *
- * @return	    PJ_SUCCESS or the appropriate error code.
- */
-PJ_DECL(pj_status_t) pjsip_endpt_create_tsx(pjsip_endpoint *endpt,
-					    pjsip_transaction **p_tsx);
-
-/**
  * Find transaction in endpoint's transaction table by the transaction's key.
  * This function normally is only used by modules. The key for a transaction
Index: pjproject/trunk/pjsip/include/pjsip/sip_msg.h
===================================================================
--- pjproject/trunk/pjsip/include/pjsip/sip_msg.h	(revision 1747)
+++ pjproject/trunk/pjsip/include/pjsip/sip_msg.h	(revision 1748)
@@ -1033,5 +1033,5 @@
     unsigned	count;
 
-    /**< Tags/elements. */
+    /** Tags/elements. */
     pj_str_t	values[PJSIP_GENERIC_ARRAY_MAX_COUNT];
 
Index: pjproject/trunk/pjsip/include/pjsip/sip_resolve.h
===================================================================
--- pjproject/trunk/pjsip/include/pjsip/sip_resolve.h	(revision 1747)
+++ pjproject/trunk/pjsip/include/pjsip/sip_resolve.h	(revision 1748)
@@ -210,5 +210,5 @@
  * internally by pjsip_endpoint instance.
  *
- * @param pf	    The Pool Factory.
+ * @param pool	    Pool to allocate memory from.
  * @param p_res	    Pointer to receive SIP resolver instance.
  *
Index: pjproject/trunk/pjsip/include/pjsip/sip_transaction.h
===================================================================
--- pjproject/trunk/pjsip/include/pjsip/sip_transaction.h	(revision 1747)
+++ pjproject/trunk/pjsip/include/pjsip/sip_transaction.h	(revision 1748)
@@ -361,11 +361,13 @@
 PJ_DECL(void) pjsip_tsx_layer_dump(pj_bool_t detail);
 
-/*
+/**
  * Get the string name for the state.
+ * @param state	State
  */
 PJ_DECL(const char *) pjsip_tsx_state_str(pjsip_tsx_state_e state);
 
-/*
+/**
  * Get the role name.
+ * @param role	Role.
  */
 PJ_DECL(const char *) pjsip_role_name(pjsip_role_e role);
Index: pjproject/trunk/pjsip/include/pjsip/sip_transport.h
===================================================================
--- pjproject/trunk/pjsip/include/pjsip/sip_transport.h	(revision 1747)
+++ pjproject/trunk/pjsip/include/pjsip/sip_transport.h	(revision 1748)
@@ -920,6 +920,25 @@
  *
  *****************************************************************************/
-typedef void (*pjsip_rx_callback)(pjsip_endpoint*, pj_status_t, pjsip_rx_data *);
-typedef pj_status_t (*pjsip_tx_callback)(pjsip_endpoint*, pjsip_tx_data*);
+
+/**
+ * Type of callback to be called when transport manager receives incoming
+ * SIP message.
+ *
+ * @param ep	    Endpoint.
+ * @param status    Receiption status.
+ * @param rd	    Received packet.
+ */
+typedef void (*pjsip_rx_callback)(pjsip_endpoint *ep, pj_status_t status, 
+				  pjsip_rx_data *rd);
+
+/**
+ * Type of callback to be called before transport manager is about
+ * to transmit SIP message.
+ *
+ * @param ep	    Endpoint.
+ * @param td	    Transmit data.
+ */
+typedef pj_status_t (*pjsip_tx_callback)(pjsip_endpoint *ep, pjsip_tx_data*td);
+
 /**
  * Create a transport manager. Normally application doesn't need to call
Index: pjproject/trunk/pjsip/include/pjsip/sip_util.h
===================================================================
--- pjproject/trunk/pjsip/include/pjsip/sip_util.h	(revision 1747)
+++ pjproject/trunk/pjsip/include/pjsip/sip_util.h	(revision 1748)
@@ -260,5 +260,15 @@
 
 
-typedef void (*pjsip_send_callback)(pjsip_send_state*, pj_ssize_t sent,
+/**
+ * Declaration for callback function to be specified in 
+ * #pjsip_endpt_send_request_stateless(), #pjsip_endpt_send_response(), or
+ * #pjsip_endpt_send_response2().
+ *
+ * @param st	    Structure to keep transmission state.
+ * @param sent	    Number of bytes sent.
+ * @param cont	    When current transmission fails, specify whether
+ *		    the function should fallback to next destination.
+ */
+typedef void (*pjsip_send_callback)(pjsip_send_state *st, pj_ssize_t sent,
 				    pj_bool_t *cont);
 
@@ -518,5 +528,12 @@
 					  pjsip_transaction **p_tsx );
 
-typedef void (*pjsip_endpt_send_callback)(void*, pjsip_event*);
+/**
+ * Type of callback to be specified in #pjsip_endpt_send_request().
+ *
+ * @param token	    The token that was given in #pjsip_endpt_send_request()
+ * @param e	    Completion event.
+ */
+typedef void (*pjsip_endpt_send_callback)(void *token, pjsip_event *e);
+
 /**
  * Send outgoing request and initiate UAC transaction for the request.
Index: pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h
===================================================================
--- pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h	(revision 1747)
+++ pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h	(revision 1748)
@@ -1105,5 +1105,5 @@
 
 
-/* The implementation has been moved to sip_auth.h */
+/** The implementation has been moved to sip_auth.h */
 #define pjsip_cred_dup	pjsip_cred_info_dup
 
@@ -1198,5 +1198,5 @@
 
 
-/* Forward declaration */
+/** Forward declaration */
 typedef struct pjsua_media_config pjsua_media_config;
 
@@ -3394,5 +3394,5 @@
  * session immediately.
  *
- * @param buddy)cfg	Buddy configuration.
+ * @param buddy_cfg	Buddy configuration.
  * @param p_buddy_id	Pointer to receive buddy ID.
  *
@@ -4450,5 +4450,5 @@
  * @param tail_ms	The tail length, in miliseconds. Set to zero to
  *			disable AEC.
- * @param options	Options to be passed to #pjmedia_echo_create().
+ * @param options	Options to be passed to pjmedia_echo_create().
  *			Normally the value should be zero.
  *
