Index: /pjproject/trunk/pjlib/include/pj/doxygen.h
===================================================================
--- /pjproject/trunk/pjlib/include/pj/doxygen.h	(revision 874)
+++ /pjproject/trunk/pjlib/include/pj/doxygen.h	(revision 875)
@@ -56,5 +56,5 @@
  * @subsection doc_ver_subsec Version
  *
- * This document corresponds to PJLIB version 0.5.8.
+ * This document corresponds to PJLIB version 0.5.9.5.
  *
  *
Index: /pjproject/trunk/pjmedia/include/pjmedia/conference.h
===================================================================
--- /pjproject/trunk/pjmedia/include/pjmedia/conference.h	(revision 874)
+++ /pjproject/trunk/pjmedia/include/pjmedia/conference.h	(revision 875)
@@ -32,4 +32,11 @@
  * @brief The implementation of conference bridge
  * @{
+ *
+ * This describes the conference bridge implementation in PJMEDIA. The
+ * conference bridge provides powerful and very efficient mechanism to
+ * route the audio flow and mix the audio signal when required.
+ *
+ * Some more information about the media flow when conference bridge is
+ * used is described in http://www.pjsip.org/trac/wiki/media-flow .
  */
 
@@ -98,9 +105,11 @@
  * interface of the bridge by calling #pjmedia_conf_get_master_port(), and
  * connect this port interface to a sound device port by calling
- * #pjmedia_snd_port_connect().
- *
- * The sound device is crucial for the bridge's operation, because it provides
- * the bridge with necessary clock to process the audio frames periodically.
- * Internally, the bridge runs when get_frame() to port zero is called.
+ * #pjmedia_snd_port_connect(), or to a master port (pjmedia_master_port)
+ * if application doesn't want to instantiate any sound devices.
+ *
+ * The sound device or master port are crucial for the bridge's operation, 
+ * because it provides the bridge with necessary clock to process the audio
+ * frames periodically. Internally, the bridge runs when get_frame() to 
+ * port zero is called.
  *
  * @param pool		    Pool to use to allocate the bridge and 
Index: /pjproject/trunk/pjmedia/include/pjmedia/session.h
===================================================================
--- /pjproject/trunk/pjmedia/include/pjmedia/session.h	(revision 874)
+++ /pjproject/trunk/pjmedia/include/pjmedia/session.h	(revision 875)
@@ -281,5 +281,5 @@
  * @param session	The media session.
  * @param index		The stream index.
- * @param ascii_digits	String of ASCII digits (i.e. 0-9*#A-B).
+ * @param ascii_digits	String of ASCII digits (i.e. 0-9*##A-B).
  *
  * @return		PJ_SUCCESS on success.
Index: /pjproject/trunk/pjmedia/include/pjmedia/sound.h
===================================================================
--- /pjproject/trunk/pjmedia/include/pjmedia/sound.h	(revision 874)
+++ /pjproject/trunk/pjmedia/include/pjmedia/sound.h	(revision 875)
@@ -254,5 +254,5 @@
  *
  * @param strm		The stream to be queried.
- * @param i		Pointer to stream information to be filled up with
+ * @param pi		Pointer to stream information to be filled up with
  *			information about the stream.
  *
Index: /pjproject/trunk/pjmedia/include/pjmedia/tonegen.h
===================================================================
--- /pjproject/trunk/pjmedia/include/pjmedia/tonegen.h	(revision 874)
+++ /pjproject/trunk/pjmedia/include/pjmedia/tonegen.h	(revision 875)
@@ -85,5 +85,5 @@
  * to produce tones from an ASCII digits.
  * Digit map used by a particular tone generator can be retrieved/set with
- * #pjmedia_tonegen_get_digit_map() and #pjmedia_tonegen_load_digit_map().
+ * #pjmedia_tonegen_get_digit_map() and #pjmedia_tonegen_set_digit_map().
  */
 typedef struct pjmedia_tone_digit_map
@@ -95,5 +95,5 @@
 	short   freq1;	    /**< First frequency.			*/
 	short   freq2;	    /**< Optional second frequency.		*/
-    } digits[16];
+    } digits[16];	    /**< Array of digits in the digit map.	*/
 } pjmedia_tone_digit_map;
 
Index: /pjproject/trunk/pjsip/docs/doxygen.h
===================================================================
--- /pjproject/trunk/pjsip/docs/doxygen.h	(revision 874)
+++ /pjproject/trunk/pjsip/docs/doxygen.h	(revision 875)
@@ -120,5 +120,5 @@
   @subsection doc_ver Version
 
-  This document corresponds to PJSIP version 0.5.8.
+  This document corresponds to PJSIP version 0.5.9.5.
 
   \n
Index: /pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h
===================================================================
--- /pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h	(revision 874)
+++ /pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h	(revision 875)
@@ -116,7 +116,21 @@
  \code
 
+ #include <pjsua-lib/pjsua.h>
+
+ #define THIS_FILE  __FILE__
+
+ static pj_status_t app_init(void)
+ {
     pjsua_config	 ua_cfg;
     pjsua_logging_config log_cfg;
     pjsua_media_config   media_cfg;
+    pj_status_t status;
+
+    // Must create pjsua before anything else!
+    status = pjsua_create();
+    if (status != PJ_SUCCESS) {
+	pjsua_perror(THIS_FILE, "Error initializing pjsua", status);
+	return status;
+    }
 
     // Initialize configs with default settings.
@@ -141,6 +155,7 @@
 	  return status;
     }
-    ..
-
+    .
+    ...
+ }
  \endcode
  *
@@ -170,4 +185,29 @@
  * may add, modify, or delete accounts, buddies, or change media settings
  * during run-time.
+ *
+ * Sample code:
+ \code
+ static pj_status_t app_run(void)
+ {
+    pj_status_t status;
+
+    // Start pjsua
+    status = pjsua_start();
+    if (status != PJ_SUCCESS) {
+	pjsua_destroy();
+	pjsua_perror(THIS_FILE, "Error starting pjsua", status);
+	return status;
+    }
+
+    // Run application loop
+    while (1) {
+	char choice[10];
+	
+	printf("Select menu: ");
+	fgets(choice, sizeof(choice), stdin);
+	...
+    }
+ }
+ \endcode
  */
 
@@ -205,5 +245,7 @@
 
 /**
- * Logging configuration.
+ * Logging configuration, which can be (optionally) specified when calling
+ * #pjsua_init(). Application must call #pjsua_logging_config_default() to
+ * initialize this structure with the default values.
  */
 typedef struct pjsua_logging_config
@@ -279,5 +321,8 @@
 
 /**
- * Application callbacks.
+ * This structure describes application callback to receive various event
+ * notification from PJSUA-API. All of these callbacks are OPTIONAL, 
+ * although definitely application would want to implement some of
+ * the important callbacks (such as \a on_incoming_call).
  */
 typedef struct pjsua_callback
@@ -322,5 +367,5 @@
 
     /**
-     * Notify application on call being transfered.
+     * Notify application on call being transfered (i.e. REFER is received).
      * Application can decide to accept/reject transfer request
      * by setting the code (default is 200). When this callback
@@ -471,5 +516,8 @@
 
 /**
- * PJSUA settings.
+ * This structure describes the settings to control the API and
+ * user agent behavior, and can be specified when calling #pjsua_init().
+ * Before setting the values, application must call #pjsua_config_default()
+ * to initialize this structure with the default values.
  */
 typedef struct pjsua_config
@@ -477,5 +525,9 @@
 
     /** 
-     * Maximum calls to support (default: 4) 
+     * Maximum calls to support (default: 4). The value specified here
+     * must be smaller than the compile time maximum settings 
+     * PJSUA_MAX_CALLS, which by default is 32. To increase this 
+     * limit, the library must be recompiled with new PJSUA_MAX_CALLS
+     * value.
      */
     unsigned	    max_calls;
@@ -504,5 +556,5 @@
 
     /**
-     * Number of outbound proxies in the array.
+     * Number of outbound proxies in the \a outbound_proxy array.
      */
     unsigned	    outbound_proxy_cnt;
@@ -524,15 +576,20 @@
     /** 
      * Array of credentials. These credentials will be used by all accounts,
-     * and can be used to authenticate against outbound proxies.
+     * and can be used to authenticate against outbound proxies. If the
+     * credential is specific to the account, then application should set
+     * the credential in the pjsua_acc_config rather than the credential
+     * here.
      */
     pjsip_cred_info cred_info[PJSUA_ACC_MAX_PROXIES];
 
     /**
-     * Application callback.
+     * Application callback to receive various event notifications from
+     * the library.
      */
     pjsua_callback  cb;
 
     /**
-     * User agent string (default empty)
+     * Optional user agent string (default empty). If it's empty, no
+     * User-Agent header will be sent with outgoing requests.
      */
     pj_str_t	    user_agent;
@@ -597,5 +654,10 @@
 /**
  * This structure describes additional information to be sent with
- * outgoing SIP message.
+ * outgoing SIP message. It can (optionally) be specified for example
+ * with #pjsua_call_make_call(), #pjsua_call_answer(), #pjsua_call_hangup(),
+ * #pjsua_call_set_hold(), #pjsua_call_send_im(), and many more.
+ *
+ * Application MUST call #pjsua_msg_data_init() to initialize this
+ * structure before setting its values.
  */
 typedef struct pjsua_msg_data
@@ -648,4 +710,6 @@
  * specified.
  *
+ * Note that #pjsua_create() MUST be called before calling this function.
+ *
  * @param ua_cfg	User agent configuration.
  * @param log_cfg	Optional logging configuration.
@@ -664,4 +728,6 @@
  * additional 
  *
+ * Application may call this function anytime after #pjsua_init().
+ *
  * @return		PJ_SUCCESS on success, or the appropriate error code.
  */
@@ -670,7 +736,13 @@
 
 /**
- * Destroy pjsua. This function must be called once PJSUA is created. To
- * make it easier for application, application may call this function
- * several times with no danger.
+ * Destroy pjsua. Application is recommended to perform graceful shutdown
+ * before calling this function (such as unregister the account from the SIP 
+ * server, terminate presense subscription, and hangup active calls), however,
+ * this function will do all of these if it finds there are active sessions
+ * that need to be terminated. This function will approximately block for
+ * one second to wait for replies from remote.
+ *
+ * Application.may safely call this function more than once if it doesn't
+ * keep track of it's state.
  *
  * @return		PJ_SUCCESS on success, or the appropriate error code.
@@ -682,4 +754,8 @@
  * Poll pjsua for events, and if necessary block the caller thread for
  * the specified maximum interval (in miliseconds).
+ *
+ * Application doesn't normally need to call this function if it has
+ * configured worker thread (\a thread_cnt field) in pjsua_config structure,
+ * because polling then will be done by these worker threads instead.
  *
  * @param msec_timeout	Maximum time to wait, in miliseconds.
@@ -693,5 +769,6 @@
 
 /**
- * Create memory pool.
+ * Create memory pool to be used by the application. Once application
+ * finished using the pool, it must be released with pj_pool_release().
  *
  * @param name		Optional pool name.
@@ -719,5 +796,5 @@
  * Internal function to get SIP endpoint instance of pjsua, which is
  * needed for example to register module, create transports, etc.
- * Probably is only valid after #pjsua_init() is called.
+ * Only valid after #pjsua_init() is called.
  * 
  * @return		SIP endpoint instance.
@@ -735,5 +812,5 @@
 /**
  * Internal function to get PJSUA pool factory.
- * Only valid after #pjsua_init() is called.
+ * Only valid after #pjsua_create() is called.
  *
  * @return		Pool factory currently used by PJSUA.
@@ -749,5 +826,6 @@
 
 /**
- * Verify that valid SIP url is given.
+ * This is a utility function to verify that valid SIP url is given. If the
+ * URL is valid, PJ_SUCCESS will be returned.
  *
  * @param c_url		The URL, as NULL terminated string.
@@ -759,5 +837,6 @@
 
 /**
- * Display error message for the specified error code.
+ * This is a utility function to display error message for the specified 
+ * error code. The error message will be sent to the log.
  *
  * @param sender	The log sender field.
@@ -796,5 +875,6 @@
 
 /**
- * STUN configuration.
+ * This structure describes STUN configuration for SIP and media transport,
+ * and is embedded inside pjsua_transport_config structure.
  */
 typedef struct pjsua_stun_config
@@ -841,5 +921,7 @@
 /**
  * Transport configuration for creating transports for both SIP
- * and media.
+ * and media. Before setting some values to this structure, application
+ * MUST call #pjsua_transport_config_default() to initialize its
+ * values with default settings.
  */
 typedef struct pjsua_transport_config
@@ -888,5 +970,7 @@
 
     /**
-     * TLS settings.
+     * This specifies TLS settings for TLS transport. It is only be used
+     * when this transport config is being used to create a SIP TLS
+     * transport.
      */
     pjsip_tls_setting	tls_setting;
@@ -903,4 +987,5 @@
 {
     pj_bzero(cfg, sizeof(*cfg));
+    pjsua_stun_config_default(&cfg->stun_config);
     pjsip_tls_setting_default(&cfg->tls_setting);
 }
@@ -908,5 +993,8 @@
 
 /**
- * Normalize STUN config.
+ * This is a utility function to normalize STUN config. It's only
+ * used internally by the library.
+ *
+ * @param cfg	    The STUN config to be initialized.
  */
 PJ_INLINE(void) pjsua_normalize_stun_config( pjsua_stun_config *cfg )
@@ -958,5 +1046,6 @@
 
 /**
- * Transport info.
+ * This structure describes transport information returned by
+ * #pjsua_transport_get_info() function.
  */
 typedef struct pjsua_transport_info
@@ -1012,5 +1101,6 @@
 
 /**
- * Create SIP transport.
+ * Create and start a new SIP transport according to the specified
+ * settings.
  *
  * @param type		Transport type.
@@ -1079,8 +1169,8 @@
  * Close the transport. If transport is forcefully closed, it will be
  * immediately closed, and any pending transactions that are using the
- * transport may not terminate properly. Otherwise, the system will wait
- * until all transactions are closed while preventing new users from
- * using the transport, and will close the transport when it is safe to
- * do so.
+ * transport may not terminate properly (it may even crash). Otherwise, 
+ * the system will wait until all transactions are closed while preventing 
+ * new users from using the transport, and will close the transport when 
+ * it is safe to do so.
  *
  * @param id		Transport ID.
@@ -1169,5 +1259,7 @@
 
 /**
- * Account configuration.
+ * This structure describes account configuration to be specified when
+ * adding a new account with #pjsua_acc_add(). Application MUST initialize
+ * this structure first by calling #pjsua_acc_config_default().
  */
 typedef struct pjsua_acc_config
@@ -1198,5 +1290,6 @@
 
     /**
-     * Publish presence?
+     * If this flag is set, the presence information of this account will
+     * be PUBLISH-ed to the server where the account belongs.
      */
     pj_bool_t	    publish_enabled;
@@ -1223,5 +1316,7 @@
      * These proxies will be put in the route set for this account, with 
      * maintaining the orders (the first proxy in the array will be visited
-     * first).
+     * first). If global outbound proxies are configured in pjsua_config,
+     * then these account proxies will be placed after the global outbound
+     * proxies in the routeset.
      */
     pj_str_t	    proxy[PJSUA_ACC_MAX_PROXIES];
@@ -1352,5 +1447,7 @@
 
 /**
- * Get default account.
+ * Get default account to be used when receiving incoming requests (calls),
+ * when the destination of the incoming call doesn't match any other
+ * accounts.
  *
  * @return		The default account ID, or PJSUA_INVALID_ID if no
@@ -1362,5 +1459,10 @@
 /**
  * Add a new account to pjsua. PJSUA must have been initialized (with
- * #pjsua_init()) before calling this function.
+ * #pjsua_init()) before calling this function. If registration is configured
+ * for this account, this function would also start the SIP registration
+ * session with the SIP registrar server. This SIP registration session
+ * will be maintained internally by the library, and application doesn't
+ * need to do anything to maintain the registration session.
+ *
  *
  * @param cfg		Account configuration.
@@ -1401,5 +1503,7 @@
 
 /**
- * Delete account.
+ * Delete an account. This will unregister the account from the SIP server,
+ * if necessary, and terminate server side presence subscriptions associated
+ * with this account.
  *
  * @param acc_id	Id of the account to be deleted.
@@ -1424,5 +1528,6 @@
 /**
  * Modify account's presence status to be advertised to remote/presence
- * subscribers.
+ * subscribers. This would trigger the sending of outgoing NOTIFY request
+ * if there are server side presence subscription for this account.
  *
  * @param acc_id	The account ID.
@@ -1436,5 +1541,9 @@
 
 /**
- * Update registration or perform unregistration. 
+ * Update registration or perform unregistration. If registration is
+ * configured for this account, then initial SIP REGISTER will be sent
+ * when the account is added with #pjsua_acc_add(). Application normally
+ * only need to call this function if it wants to manually update the
+ * registration or to unregister from the server.
  *
  * @param acc_id	The account ID.
@@ -1449,5 +1558,5 @@
 
 /**
- * Get account information.
+ * Get information about the specified account.
  *
  * @param acc_id	Account identification.
@@ -1461,5 +1570,9 @@
 
 /**
- * Enum accounts all account ids.
+ * Enumerate all account currently active in the library. This will fill
+ * the array with the account Ids, and application can then query the
+ * account information for each id with #pjsua_acc_get_info().
+ *
+ * @see pjsua_acc_enum_info().
  *
  * @param ids		Array of account IDs to be initialized.
@@ -1474,5 +1587,5 @@
 
 /**
- * Enum accounts info.
+ * Enumerate account informations.
  *
  * @param info		Array of account infos to be initialized.
@@ -1562,5 +1675,5 @@
 
 /**
- * Max simultaneous calls.
+ * Maximum simultaneous calls.
  */
 #ifndef PJSUA_MAX_CALLS
@@ -1571,17 +1684,26 @@
 
 /**
- * Call media status.
+ * This enumeration specifies the media status of a call, and it's part
+ * of pjsua_call_info structure.
  */
 typedef enum pjsua_call_media_status
 {
+    /** Call currently has no media */
     PJSUA_CALL_MEDIA_NONE,
+
+    /** The media is active */
     PJSUA_CALL_MEDIA_ACTIVE,
+
+    /** The media is currently put on hold by local endpoint */
     PJSUA_CALL_MEDIA_LOCAL_HOLD,
+
+    /** The media is currently put on hold by remote endpoint */
     PJSUA_CALL_MEDIA_REMOTE_HOLD,
+
 } pjsua_call_media_status;
 
 
 /**
- * Call info.
+ * This structure describes the information and current status of a call.
  */
 typedef struct pjsua_call_info
@@ -1669,5 +1791,6 @@
 
 /**
- * Enumerate all active calls.
+ * Enumerate all active calls. Application may then query the information and
+ * state of each call by calling #pjsua_call_get_info().
  *
  * @param ids		Array of account IDs to be initialized.
@@ -1748,5 +1871,6 @@
 
 /**
- * Attach application specific data to the call.
+ * Attach application specific data to the call. Application can then
+ * inspect this data by calling #pjsua_call_get_user_data().
  *
  * @param call_id	Call identification.
@@ -1760,5 +1884,6 @@
 
 /**
- * Get user data attached to the call.
+ * Get user data attached to the call, which has been previously set with
+ * #pjsua_call_set_user_data().
  *
  * @param call_id	Call identification.
@@ -1770,5 +1895,7 @@
 
 /**
- * Send response to incoming INVITE request.
+ * Send response to incoming INVITE request. Depending on the status
+ * code specified as parameter, this function may send provisional
+ * response, establish the call, or terminate the call.
  *
  * @param call_id	Incoming call identification.
@@ -1788,5 +1915,9 @@
 /**
  * Hangup call by using method that is appropriate according to the
- * call state.
+ * call state. This function is different than answering the call with
+ * 3xx-6xx response (with #pjsua_call_answer()), in that this function
+ * will hangup the call regardless of the state and role of the call,
+ * while #pjsua_call_answer() only works with incoming calls on EARLY
+ * state.
  *
  * @param call_id	Call identification.
@@ -1808,5 +1939,9 @@
 
 /**
- * Put the specified call on hold.
+ * Put the specified call on hold. This will send re-INVITE with the
+ * appropriate SDP to inform remote that the call is being put on hold.
+ * The final status of the request itself will be reported on the
+ * \a on_call_media_state() callback, which inform the application that
+ * the media state of the call has changed.
  *
  * @param call_id	Call identification.
@@ -1821,5 +1956,8 @@
 
 /**
- * Send re-INVITE (to release hold).
+ * Send re-INVITE to release hold.
+ * The final status of the request itself will be reported on the
+ * \a on_call_media_state() callback, which inform the application that
+ * the media state of the call has changed.
  *
  * @param call_id	Call identification.
@@ -1840,4 +1978,9 @@
  * REFER request to instruct remote call party to initiate a new INVITE
  * session to the specified destination/target.
+ *
+ * If application is interested to monitor the successfulness and 
+ * the progress of the transfer request, it can implement 
+ * \a on_call_transfer_status() callback which will report the progress
+ * of the call transfer request.
  *
  * @param call_id	The call id to be transfered.
@@ -1930,5 +2073,6 @@
 
 /**
- * Terminate all calls.
+ * Terminate all calls. This will initiate #pjsua_call_hangup() for all
+ * currently active calls. 
  */
 PJ_DECL(void) pjsua_call_hangup_all(void);
@@ -1978,5 +2122,8 @@
 
 /**
- * Buddy configuration.
+ * This structure describes buddy configuration when adding a buddy to
+ * the buddy list with #pjsua_buddy_add(). Application MUST initialize
+ * the structure with #pjsua_buddy_config_default() to initialize this
+ * structure with default configuration.
  */
 typedef struct pjsua_buddy_config
@@ -1996,5 +2143,5 @@
 
 /**
- * Buddy's online status.
+ * This enumeration describes basic buddy's online status.
  */
 typedef enum pjsua_buddy_status
@@ -2021,5 +2168,6 @@
 
 /**
- * Buddy info.
+ * This structure describes buddy info, which can be retrieved by calling
+ * #pjsua_buddy_get_info().
  */
 typedef struct pjsua_buddy_info
@@ -2066,4 +2214,13 @@
 
 /**
+ * Set default values to the buddy config.
+ */
+PJ_INLINE(void) pjsua_buddy_config_default(pjsua_buddy_config *cfg)
+{
+    pj_bzero(cfg, sizeof(*cfg));
+}
+
+
+/**
  * Get total number of buddies.
  *
@@ -2084,5 +2241,7 @@
 
 /**
- * Enum buddy IDs.
+ * Enumerate all buddy IDs in the buddy list. Application then can use
+ * #pjsua_buddy_get_info() to get the detail information for each buddy
+ * id.
  *
  * @param ids		Array of ids to be initialized.
@@ -2108,5 +2267,7 @@
 
 /**
- * Add new buddy.
+ * Add new buddy to the buddy list. If presence subscription is enabled
+ * for this buddy, this function will also start the presence subscription
+ * session immediately.
  *
  * @param cfg		Buddy configuration.
@@ -2120,5 +2281,6 @@
 
 /**
- * Delete buddy.
+ * Delete the specified buddy from the buddy list. Any presence subscription
+ * to this buddy will be terminated.
  *
  * @param buddy_id	Buddy identification.
@@ -2130,5 +2292,7 @@
 
 /**
- * Enable/disable buddy's presence monitoring.
+ * Enable/disable buddy's presence monitoring. Once buddy's presence is
+ * subscribed, application will be informed about buddy's presence status
+ * changed via \a on_buddy_state() callback.
  *
  * @param buddy_id	Buddy identification.
@@ -2143,5 +2307,5 @@
 
 /**
- * Dump presence subscriptions to log file.
+ * Dump presence subscriptions to log.
  *
  * @param verbose	Yes or no.
@@ -2271,17 +2435,28 @@
 #endif
 
+/**
+ * The default clock rate to be used by the conference bridge.
+ */
 #ifndef PJSUA_DEFAULT_CLOCK_RATE
 #   define PJSUA_DEFAULT_CLOCK_RATE	16000
 #endif
 
+/**
+ * Default codec quality settings.
+ */
 #ifndef PJSUA_DEFAULT_CODEC_QUALITY
 #   define PJSUA_DEFAULT_CODEC_QUALITY	5
 #endif
 
+/**
+ * Default iLBC mode.
+ */
 #ifndef PJSUA_DEFAULT_ILBC_MODE
 #   define PJSUA_DEFAULT_ILBC_MODE	20
 #endif
 
-
+/**
+ * The default echo canceller tail length.
+ */
 #ifndef PJSUA_DEFAULT_EC_TAIL_LEN
 #   define PJSUA_DEFAULT_EC_TAIL_LEN	800
@@ -2290,5 +2465,7 @@
 
 /**
- * Media configuration.
+ * This structure describes media configuration, which will be specified
+ * when calling #pjsua_init(). Application MUST initialize this structure
+ * by calling #pjsua_media_config_default().
  */
 struct pjsua_media_config
@@ -2296,5 +2473,6 @@
     /**
      * Clock rate to be applied to the conference bridge.
-     * If value is zero, default clock rate will be used (16KHz).
+     * If value is zero, default clock rate will be used 
+     * (PJSUA_DEFAULT_CLOCK_RATE, which by default is 16KHz).
      */
     unsigned		clock_rate;
@@ -2444,5 +2622,6 @@
 
 /**
- * Codec config.
+ * This structure describes codec information, which can be retrieved by
+ * calling #pjsua_enum_codecs().
  */
 typedef struct pjsua_codec_info
@@ -2467,5 +2646,7 @@
 
 /**
- * Conference port info.
+ * This structure descibes information about a particular media port that
+ * has been registered into the conference bridge. Application can query
+ * this info by calling #pjsua_conf_get_port_info().
  */
 typedef struct pjsua_conf_port_info
@@ -2585,5 +2766,6 @@
 /**
  * Remove arbitrary slot from the conference bridge. Application should only
- * call this function if it registered the port manually.
+ * call this function if it registered the port manually with previous call
+ * to #pjsua_conf_add_port().
  *
  * @param id		The slot id of the port to be removed.
@@ -2818,5 +3000,5 @@
 
 /**
- * Enum sound devices.
+ * Enum all sound devices installed in the system.
  *
  * @param info		Array of info to be initialized.
Index: /pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c
===================================================================
--- /pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c	(revision 874)
+++ /pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c	(revision 875)
@@ -687,8 +687,13 @@
     } else {
 
-	/* Notify application */
-	if (pjsua_var.ua_cfg.cb.on_incoming_call)
+	/* Notify application if on_incoming_call() is overriden, 
+	 * otherwise hangup the call with 480
+	 */
+	if (pjsua_var.ua_cfg.cb.on_incoming_call) {
 	    pjsua_var.ua_cfg.cb.on_incoming_call(acc_id, call_id, rdata);
-
+	} else {
+	    pjsua_call_hangup(call_id, PJSIP_SC_TEMPORARILY_UNAVAILABLE, 
+			      NULL, NULL);
+	}
     }
 
