Ticket #970: More gracefull PJSUA-LIB shutdown sequence. Enhancements:
- wait for unregistration to complete (or a preconfigured delay expires)
- new account config field to set the maximum delay to wait for unregistration
- rejects incoming requests (INVITE, SUBSCRIBE, and OPTIONS) when shutdown is in progress
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@2943 74dad513-b988-da41-8d7b-12977e46ad98
diff --git a/pjsip/include/pjsua-lib/pjsua.h b/pjsip/include/pjsua-lib/pjsua.h
index d6db65b..c0eb8b2 100644
--- a/pjsip/include/pjsua-lib/pjsua.h
+++ b/pjsip/include/pjsua-lib/pjsua.h
@@ -1725,6 +1725,17 @@
/**
+ * Default maximum time to wait for account unregistration transactions to
+ * complete during library shutdown sequence.
+ *
+ * Default: 4000 (4 seconds)
+ */
+#ifndef PJSUA_UNREG_TIMEOUT
+# define PJSUA_UNREG_TIMEOUT 4000
+#endif
+
+
+/**
* Default PUBLISH expiration
*/
#ifndef PJSUA_PUBLISH_EXPIRATION
@@ -1919,6 +1930,14 @@
*/
unsigned reg_timeout;
+ /**
+ * Specify the maximum time to wait for unregistration requests to
+ * complete during library shutdown sequence.
+ *
+ * Default: PJSUA_UNREG_TIMEOUT
+ */
+ unsigned unreg_timeout;
+
/**
* Number of credentials in the credential array.
*/