Changeset 2730 for pjproject/trunk


Ignore:
Timestamp:
Jun 1, 2009 3:39:52 PM (15 years ago)
Author:
bennylp
Message:

Ticket #869: Make various event/presence subscription time settings configurable (thanks Johan Lantz for the suggestion)

Location:
pjproject/trunk/pjsip
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/include/pjsip/sip_config.h

    r2724 r2730  
    793793 
    794794 
     795/***************************************************************************** 
     796 *  SIP Event framework and presence settings. 
     797 */ 
     798 
     799/** 
     800 * Specify the time (in seconds) to send SUBSCRIBE to refresh client  
     801 * subscription before the actual interval expires. 
     802 * 
     803 * Default: 5 seconds 
     804 */ 
     805#ifndef PJSIP_EVSUB_TIME_UAC_REFRESH 
     806#   define PJSIP_EVSUB_TIME_UAC_REFRESH         5 
     807#endif 
     808 
     809 
     810/** 
     811 * Specify the time (in seconds) to wait for the final NOTIFY from the 
     812 * server after client has sent un-SUBSCRIBE request. 
     813 * 
     814 * Default: 5 seconds 
     815 */ 
     816#ifndef PJSIP_EVSUB_TIME_UAC_TERMINATE 
     817#   define PJSIP_EVSUB_TIME_UAC_TERMINATE       5 
     818#endif 
     819 
     820 
     821/** 
     822 * Specify the time (in seconds) for client subscription to wait for another 
     823 * NOTIFY from the server, if it has rejected the last NOTIFY with non-2xx 
     824 * final response (such as 401). If further NOTIFY is not received within 
     825 * this period, the client will unsubscribe. 
     826 * 
     827 * Default: 5 seconds 
     828 */ 
     829#ifndef PJSIP_EVSUB_TIME_UAC_WAIT_NOTIFY 
     830#   define PJSIP_EVSUB_TIME_UAC_WAIT_NOTIFY     5 
     831#endif 
     832 
     833 
     834/** 
     835 * Specify the default expiration time for presence event subscription, for 
     836 * both client and server subscription. For client subscription, application 
     837 * can override this by specifying positive non-zero value in "expires"  
     838 * parameter when calling #pjsip_pres_initiate(). For server subscription, 
     839 * we would take the expiration value from the Expires header sent by client 
     840 * in the SUBSCRIBE request if the header exists and its value is less than  
     841 * this setting, otherwise this setting will be used. 
     842 * 
     843 * Default: 600 seconds (10 minutes) 
     844 */ 
     845#ifndef PJSIP_PRES_DEFAULT_EXPIRES 
     846#   define PJSIP_PRES_DEFAULT_EXPIRES           600 
     847#endif 
     848 
     849 
    795850PJ_END_DECL 
    796851 
  • pjproject/trunk/pjsip/src/pjsip-simple/evsub.c

    r2394 r2730  
    106106 
    107107/* Number of seconds to send SUBSCRIBE before the actual expiration */ 
    108 #define TIME_UAC_REFRESH        5 
     108#define TIME_UAC_REFRESH        PJSIP_EVSUB_TIME_UAC_REFRESH 
    109109 
    110110/* Time to wait for the final NOTIFY after sending unsubscription */ 
    111 #define TIME_UAC_TERMINATE      5 
     111#define TIME_UAC_TERMINATE      PJSIP_EVSUB_TIME_UAC_TERMINATE 
    112112 
    113113/* If client responds NOTIFY with non-2xx final response (such as 401), 
     
    115115 * unsubscribe 
    116116 */ 
    117 #define TIME_UAC_WAIT_NOTIFY    5 
     117#define TIME_UAC_WAIT_NOTIFY    PJSIP_EVSUB_TIME_UAC_WAIT_NOTIFY 
    118118 
    119119 
  • pjproject/trunk/pjsip/src/pjsip-simple/presence.c

    r2394 r2730  
    3333 
    3434#define THIS_FILE                   "presence.c" 
    35 #define PRES_DEFAULT_EXPIRES        600 
     35#define PRES_DEFAULT_EXPIRES        PJSIP_PRES_DEFAULT_EXPIRES 
    3636 
    3737/* 
Note: See TracChangeset for help on using the changeset viewer.