summaryrefslogtreecommitdiff
path: root/pjsip/include/pjsip-simple/publish.h
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2009-04-28 22:19:49 +0000
committerBenny Prijono <bennylp@teluu.com>2009-04-28 22:19:49 +0000
commit00ed64489de3c39a6a452e11bb43b2c1090c9307 (patch)
treee871adbe53ea5daa64515cdb0feb1102df7e34cc /pjsip/include/pjsip-simple/publish.h
parent7a0ee1a7208ddfe8575d1f1179f66fda2fa99339 (diff)
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 git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2661 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/include/pjsip-simple/publish.h')
-rw-r--r--pjsip/include/pjsip-simple/publish.h23
1 files changed, 22 insertions, 1 deletions
diff --git a/pjsip/include/pjsip-simple/publish.h b/pjsip/include/pjsip-simple/publish.h
index ebbd1cf1..3c7c7d55 100644
--- a/pjsip/include/pjsip-simple/publish.h
+++ b/pjsip/include/pjsip-simple/publish.h
@@ -78,7 +78,9 @@ struct pjsip_publishc_cbparam
int code; /**< SIP status code received. */
pj_str_t reason; /**< SIP reason phrase received. */
pjsip_rx_data *rdata; /**< The complete received response. */
- int expiration;/**< Next expiration interval. */
+ int expiration;/**< Next expiration interval. If the
+ value is -1, it means the session
+ will not renew itself. */
};
@@ -190,6 +192,25 @@ PJ_DECL(pj_status_t) pjsip_publishc_set_route_set(pjsip_publishc *pubc,
/**
+ * Set list of headers to be added to each PUBLISH request generated by
+ * the client publication session. Note that application can also add
+ * the headers to the request after calling #pjsip_publishc_publish()
+ * or #pjsip_publishc_unpublish(), but the benefit of this function is
+ * the headers will also be added to requests generated internally by
+ * the session, such as during session renewal/refresh.
+ *
+ * Note that calling this function will clear the previously added list
+ * of headers.
+ *
+ * @param pubc The client publication structure.
+ * @param hdr_list The list of headers.
+ *
+ * @return PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_publishc_set_headers(pjsip_publishc *pubc,
+ const pjsip_hdr *hdr_list);
+
+/**
* Create PUBLISH request for the specified client publication structure.
* Application can use this function to both create initial publication
* or to modify existing publication.