Ignore:
Timestamp:
Sep 4, 2013 10:07:45 AM (9 years ago)
Author:
ming
Message:

Closed #1696: IP change detection (Contact rewrite method) based on REGISTER final response

File:
1 edited

Legend:

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

    r4580 r4586  
    567567 
    568568} pjsua_create_media_transport_flag; 
     569 
     570 
     571/** 
     572 * This enumeration specifies the contact rewrite method. 
     573 */ 
     574typedef enum pjsua_contact_rewrite_method 
     575{ 
     576    /** 
     577      * The Contact update will be done by sending unregistration 
     578      * to the currently registered Contact, while simultaneously sending new 
     579      * registration (with different Call-ID) for the updated Contact. 
     580      */ 
     581    PJSUA_CONTACT_REWRITE_UNREGISTER = 1, 
     582 
     583    /** 
     584      * The Contact update will be done in a single, current 
     585      * registration session, by removing the current binding (by setting its 
     586      * Contact's expires parameter to zero) and adding a new Contact binding, 
     587      * all done in a single request. 
     588      */ 
     589    PJSUA_CONTACT_REWRITE_NO_UNREG = 2, 
     590 
     591    /** 
     592      * The Contact update will be done when receiving any registration final 
     593      * response. If this flag is not specified, contact update will only be 
     594      * done upon receiving 2xx response. This flag MUST be used with 
     595      * PJSUA_CONTACT_REWRITE_UNREGISTER or PJSUA_CONTACT_REWRITE_NO_UNREG 
     596      * above to specify how the Contact update should be performed when 
     597      * receiving 2xx response. 
     598      */ 
     599    PJSUA_CONTACT_REWRITE_ALWAYS_UPDATE = 4 
     600 
     601} pjsua_contact_rewrite_method; 
    569602 
    570603 
     
    25412574/** 
    25422575 * This macro specifies the default value for \a contact_rewrite_method 
    2543  * field in pjsua_acc_config. I specifies how Contact update will be 
     2576 * field in pjsua_acc_config. It specifies how Contact update will be 
    25442577 * done with the registration, if \a allow_contact_rewrite is enabled in 
    2545  *  the account config. 
    2546  * 
    2547  * If set to 1, the Contact update will be done by sending unregistration 
    2548  * to the currently registered Contact, while simultaneously sending new 
    2549  * registration (with different Call-ID) for the updated Contact. 
    2550  * 
    2551  * If set to 2, the Contact update will be done in a single, current 
    2552  * registration session, by removing the current binding (by setting its 
    2553  * Contact's expires parameter to zero) and adding a new Contact binding, 
    2554  * all done in a single request. 
    2555  * 
    2556  * Value 1 is the legacy behavior. 
    2557  * 
    2558  * Default value: 2 
     2578 * the account config. See \a pjsua_contact_rewrite_method for the options. 
     2579 * 
     2580 * Value PJSUA_CONTACT_REWRITE_UNREGISTER(1) is the legacy behavior. 
     2581 * 
     2582 * Default value: PJSUA_CONTACT_REWRITE_NO_UNREG(2) | 
     2583 *                PJSUA_CONTACT_REWRITE_ALWAYS_UPDATE(4) 
    25592584 */ 
    25602585#ifndef PJSUA_CONTACT_REWRITE_METHOD 
    2561 #   define PJSUA_CONTACT_REWRITE_METHOD         2 
     2586#   define PJSUA_CONTACT_REWRITE_METHOD    (PJSUA_CONTACT_REWRITE_NO_UNREG | \ 
     2587                                           PJSUA_CONTACT_REWRITE_ALWAYS_UPDATE) 
    25622588#endif 
    25632589 
     
    30113037    /** 
    30123038     * Specify how Contact update will be done with the registration, if 
    3013      * \a allow_contact_rewrite is enabled. 
    3014      * 
    3015      * If set to 1, the Contact update will be done by sending unregistration 
    3016      * to the currently registered Contact, while simultaneously sending new 
    3017      * registration (with different Call-ID) for the updated Contact. 
    3018      * 
    3019      * If set to 2, the Contact update will be done in a single, current 
    3020      * registration session, by removing the current binding (by setting its 
    3021      * Contact's expires parameter to zero) and adding a new Contact binding, 
    3022      * all done in a single request. 
    3023      * 
    3024      * Value 1 is the legacy behavior. 
    3025      * 
    3026      * Default value: PJSUA_CONTACT_REWRITE_METHOD (2) 
     3039     * \a allow_contact_rewrite is enabled. The value is bitmask combination of 
     3040     * \a pjsua_contact_rewrite_method. See also pjsua_contact_rewrite_method. 
     3041     * 
     3042     * Value PJSUA_CONTACT_REWRITE_UNREGISTER(1) is the legacy behavior. 
     3043     * 
     3044     * Default value: PJSUA_CONTACT_REWRITE_METHOD 
     3045     * (PJSUA_CONTACT_REWRITE_NO_UNREG | PJSUA_CONTACT_REWRITE_ALWAYS_UPDATE) 
    30273046     */ 
    30283047    int              contact_rewrite_method; 
Note: See TracChangeset for help on using the changeset viewer.