Ignore:
Timestamp:
Apr 28, 2009 10:19:49 PM (15 years ago)
Author:
bennylp
Message:

Ticket #760: Enhancements to PUBLISH management (thanks Johan Lantz for the suggestion)

  • Changes in PJSUA-LIB
    • retry with fresh request on 412/Conditional Request Failed response
    • changed default Expires in PUBLISH request to none (we will not put Expires), to avoid getting 423/Interval Too Brief response
    • if the PUBLISH fails for any reason, it will be retried on every PJSUA_PRES_TIMER (default 300 seconds), similar to how failed SUBSCRIBE will be retried
  • Changes to publish.h:
    • added API to add headers in every PUBLISH request
  • Added test scenario in Python unit tests
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/include/pjsip-simple/publish.h

    r2394 r2661  
    7979    pj_str_t             reason;    /**< SIP reason phrase received.        */ 
    8080    pjsip_rx_data       *rdata;     /**< The complete received response.    */ 
    81     int                  expiration;/**< Next expiration interval.          */ 
     81    int                  expiration;/**< Next expiration interval. If the 
     82                                         value is -1, it means the session 
     83                                         will not renew itself.             */ 
    8284}; 
    8385 
     
    191193 
    192194/** 
     195 * Set list of headers to be added to each PUBLISH request generated by 
     196 * the client publication session. Note that application can also add 
     197 * the headers to the request after calling #pjsip_publishc_publish() 
     198 * or #pjsip_publishc_unpublish(), but the benefit of this function is 
     199 * the headers will also be added to requests generated internally by 
     200 * the session, such as during session renewal/refresh. 
     201 * 
     202 * Note that calling this function will clear the previously added list 
     203 * of headers. 
     204 * 
     205 * @param pubc      The client publication structure. 
     206 * @param hdr_list  The list of headers. 
     207 * 
     208 * @return          PJ_SUCCESS on success. 
     209 */ 
     210PJ_DECL(pj_status_t) pjsip_publishc_set_headers(pjsip_publishc *pubc, 
     211                                                const pjsip_hdr *hdr_list); 
     212 
     213/** 
    193214 * Create PUBLISH request for the specified client publication structure. 
    194215 * Application can use this function to both create initial publication 
Note: See TracChangeset for help on using the changeset viewer.