Fixed ticket #36: pjsip_regc_unregister() SHOULD NOT unregister all contacts but rather only contact that was previously sent in the registration. In addition, added function pjsip_regc_unregister_all() to unregister all contacts
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@843 74dad513-b988-da41-8d7b-12977e46ad98
diff --git a/pjsip/include/pjsip-ua/sip_regc.h b/pjsip/include/pjsip-ua/sip_regc.h
index 81aa07e..04f2752 100644
--- a/pjsip/include/pjsip-ua/sip_regc.h
+++ b/pjsip/include/pjsip-ua/sip_regc.h
@@ -230,7 +230,8 @@
/**
- * Create REGISTER request to unregister all contacts from server records.
+ * Create REGISTER request to unregister the contacts that were previously
+ * registered by this client registration.
*
* @param regc The client registration structure.
* @param p_tdata Pointer to receive the REGISTER request.
@@ -241,6 +242,21 @@
pjsip_tx_data **p_tdata);
/**
+ * Create REGISTER request to unregister all contacts from server records.
+ * Note that this will unregister all registered contact for the AOR
+ * including contacts registered by other user agents. To only unregister
+ * contact registered by this client registration instance, use
+ * #pjsip_regc_unregister() instead.
+ *
+ * @param regc The client registration structure.
+ * @param p_tdata Pointer to receive the REGISTER request.
+ *
+ * @return PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_regc_unregister_all(pjsip_regc *regc,
+ pjsip_tx_data **p_tdata);
+
+/**
* Update Contact details in the client registration structure.
*
* @param regc The client registration structure.