Ignore:
Timestamp:
Oct 31, 2007 8:59:29 AM (16 years ago)
Author:
bennylp
Message:

More ticket #399: added PJSUA API to retrieve the remote NAT type

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h

    r1520 r1533  
    990990 
    991991    /** 
    992      * Include local endpoint's NAT type in the SDP to assist troubleshooting. 
    993      * The valid values are: 
    994      *  - 0: no information will be added in SDP. 
     992     * Support for adding and parsing NAT type in the SDP to assist  
     993     * troubleshooting. The valid values are: 
     994     *  - 0: no information will be added in SDP, and parsing is disabled. 
    995995     *  - 1: only the NAT type number is added. 
    996996     *  - 2: add both NAT type number and name. 
    997997     * 
    998      * Default: 2 
     998     * Default: 1 
    999999     */ 
    10001000    int             nat_type_in_sdp; 
     
    13661366 *                      value. Other return values indicate error and 
    13671367 *                      \a type will be set to PJ_STUN_NAT_TYPE_ERR_UNKNOWN. 
     1368 * 
     1369 * @see pjsua_call_get_rem_nat_type() 
    13681370 */ 
    13691371PJ_DECL(pj_status_t) pjsua_get_nat_type(pj_stun_nat_type *type); 
     
    27302732PJ_DECL(void*) pjsua_call_get_user_data(pjsua_call_id call_id); 
    27312733 
     2734 
     2735/** 
     2736 * Get the NAT type of remote's endpoint. This is a proprietary feature 
     2737 * of PJSUA-LIB which sends its NAT type in the SDP when \a nat_type_in_sdp 
     2738 * is set in #pjsua_config. 
     2739 * 
     2740 * This function can only be called after SDP has been received from remote, 
     2741 * which means for incoming call, this function can be called as soon as 
     2742 * call is received as long as incoming call contains SDP, and for outgoing 
     2743 * call, this function can be called only after SDP is received (normally in 
     2744 * 200/OK response to INVITE). As a general case, application should call  
     2745 * this function after or in \a on_call_media_state() callback. 
     2746 * 
     2747 * @param call_id       Call identification. 
     2748 * @param p_type        Pointer to store the NAT type. Application can then 
     2749 *                      retrieve the string description of the NAT type 
     2750 *                      by calling pj_stun_get_nat_name(). 
     2751 * 
     2752 * @return              PJ_SUCCESS on success. 
     2753 * 
     2754 * @see pjsua_get_nat_type(), nat_type_in_sdp 
     2755 */ 
     2756PJ_DECL(pj_status_t) pjsua_call_get_rem_nat_type(pjsua_call_id call_id, 
     2757                                                 pj_stun_nat_type *p_type); 
    27322758 
    27332759/** 
Note: See TracChangeset for help on using the changeset viewer.