summaryrefslogtreecommitdiff
path: root/pjsip/include
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2009-04-26 11:02:04 +0000
committerBenny Prijono <bennylp@teluu.com>2009-04-26 11:02:04 +0000
commitb757220012cfbb65f835982be24a988d911ce1fb (patch)
treee6a1b6a3a1bbe067dd265b65a8d9051c442254e2 /pjsip/include
parent0d88d0975fe2a236bb99516e35c2290a3587d4bd (diff)
Fixed ticket #503: Handle the case when CANCEL is responded with 200/OK but 487 is not sent
- added new API pjsip_tsx_set_timeout() - set 64*T1 timeout after CANCEL is initiated - also added SIPp scenario to simulate the UAS git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2646 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/include')
-rw-r--r--pjsip/include/pjsip/sip_transaction.h29
1 files changed, 28 insertions, 1 deletions
diff --git a/pjsip/include/pjsip/sip_transaction.h b/pjsip/include/pjsip/sip_transaction.h
index b94f8991..eb8510ae 100644
--- a/pjsip/include/pjsip/sip_transaction.h
+++ b/pjsip/include/pjsip/sip_transaction.h
@@ -311,7 +311,6 @@ PJ_DECL(pj_status_t) pjsip_tsx_create_key( pj_pool_t *pool,
const pjsip_method *method,
const pjsip_rx_data *rdata );
-
/**
* Force terminate transaction.
*
@@ -330,11 +329,39 @@ PJ_DECL(pj_status_t) pjsip_tsx_terminate( pjsip_transaction *tsx,
* This operation normally is used for INVITE transaction only, when
* the transaction is cancelled before any provisional response has been
* received.
+ *
+ * @param tsx The transaction.
+ *
+ * @return PJ_SUCCESS or the appropriate error code.
*/
PJ_DECL(pj_status_t) pjsip_tsx_stop_retransmit(pjsip_transaction *tsx);
/**
+ * Start a timer to terminate transaction after the specified time
+ * has elapsed. This function is only valid for INVITE transaction,
+ * and only before final response is received for the INVITE transaction.
+ * It is normally called after the UAC has sent CANCEL for this
+ * INVITE transaction.
+ *
+ * The purpose of this function is to terminate the transaction if UAS
+ * does not send final response to this INVITE transaction even after
+ * it sends 200/OK to CANCEL (for example when the UAS complies to RFC
+ * 2543).
+ *
+ * Once this timer is set, the transaction will be terminated either when
+ * a final response is received or the timer expires.
+ *
+ * @param tsx The transaction.
+ * @param millisec Timeout value in milliseconds.
+ *
+ * @return PJ_SUCCESS or the appropriate error code.
+ */
+PJ_DECL(pj_status_t) pjsip_tsx_set_timeout(pjsip_transaction *tsx,
+ unsigned millisec);
+
+
+/**
* Get the transaction instance in the incoming message. If the message
* has a corresponding transaction, this function will return non NULL
* value.