diff options
Diffstat (limited to 'pjsip/include')
-rw-r--r-- | pjsip/include/pjsip-simple/publish.h | 23 | ||||
-rw-r--r-- | pjsip/include/pjsua-lib/pjsua.h | 5 |
2 files changed, 25 insertions, 3 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. diff --git a/pjsip/include/pjsua-lib/pjsua.h b/pjsip/include/pjsua-lib/pjsua.h index 99869344..e17a7f64 100644 --- a/pjsip/include/pjsua-lib/pjsua.h +++ b/pjsip/include/pjsua-lib/pjsua.h @@ -2037,7 +2037,7 @@ PJ_DECL(pj_status_t) pjsua_transport_close( pjsua_transport_id id, * Default PUBLISH expiration */ #ifndef PJSUA_PUBLISH_EXPIRATION -# define PJSUA_PUBLISH_EXPIRATION 600 +# define PJSUA_PUBLISH_EXPIRATION PJSIP_PUBC_EXPIRATION_NOT_SPECIFIED #endif @@ -3493,7 +3493,8 @@ PJ_DECL(pj_status_t) pjsua_call_dump(pjsua_call_id call_id, /** * This specifies how long the library should retry resending SUBSCRIBE - * if the previous SUBSCRIBE failed. + * if the previous SUBSCRIBE failed. This also controls the duration + * before failed PUBLISH request will be retried. * * Default: 300 seconds */ |