summaryrefslogtreecommitdiff
path: root/pjsip/include
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2009-10-13 14:01:59 +0000
committerBenny Prijono <bennylp@teluu.com>2009-10-13 14:01:59 +0000
commitb2aac52d83d6e4fb46e2bef723647fa2bb1ad8be (patch)
treeeabfe4b6c36338b5adb89dff298481f6fcbe85eb /pjsip/include
parent745a13dbbff423464a61dbc9311aba416c245754 (diff)
Ticket #364: Upon unregistration, (un)REGISTER should be sent only after (un)PUBLISH has completed successfully
- wait for unpublication to complete or some delay expires, before sending unregistration - added unpublish_max_wait_time_msec field in account config to control how long to wait git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2942 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/include')
-rw-r--r--pjsip/include/pjsua-lib/pjsua.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/pjsip/include/pjsua-lib/pjsua.h b/pjsip/include/pjsua-lib/pjsua.h
index bb6558db..d6db65b9 100644
--- a/pjsip/include/pjsua-lib/pjsua.h
+++ b/pjsip/include/pjsua-lib/pjsua.h
@@ -1751,6 +1751,22 @@ PJ_DECL(pj_status_t) pjsua_transport_close( pjsua_transport_id id,
/**
+ * Maximum time to wait for unpublication transaction(s) to complete
+ * during shutdown process, before sending unregistration. The library
+ * tries to wait for the unpublication (un-PUBLISH) to complete before
+ * sending REGISTER request to unregister the account, during library
+ * shutdown process. If the value is set too short, it is possible that
+ * the unregistration is sent before unpublication completes, causing
+ * unpublication request to fail.
+ *
+ * Default: 2000 (2 seconds)
+ */
+#ifndef PJSUA_UNPUBLISH_MAX_WAIT_TIME_MSEC
+# define PJSUA_UNPUBLISH_MAX_WAIT_TIME_MSEC 2000
+#endif
+
+
+/**
* This structure describes account configuration to be specified when
* adding a new account with #pjsua_acc_add(). Application MUST initialize
* this structure first by calling #pjsua_acc_config_default().
@@ -1802,6 +1818,19 @@ typedef struct pjsua_acc_config
pjsip_publishc_opt publish_opt;
/**
+ * Maximum time to wait for unpublication transaction(s) to complete
+ * during shutdown process, before sending unregistration. The library
+ * tries to wait for the unpublication (un-PUBLISH) to complete before
+ * sending REGISTER request to unregister the account, during library
+ * shutdown process. If the value is set too short, it is possible that
+ * the unregistration is sent before unpublication completes, causing
+ * unpublication request to fail.
+ *
+ * Default: PJSUA_UNPUBLISH_MAX_WAIT_TIME_MSEC
+ */
+ unsigned unpublish_max_wait_time_msec;
+
+ /**
* Authentication preference.
*/
pjsip_auth_clt_pref auth_pref;