summaryrefslogtreecommitdiff
path: root/include/asterisk
diff options
context:
space:
mode:
authorGeorge Joseph <george.joseph@fairview5.com>2015-05-20 10:11:20 -0600
committerGeorge Joseph <george.joseph@fairview5.com>2015-05-22 10:18:07 -0500
commit60e2fbfe624680d7df948aab243d77ff111e4f4e (patch)
tree099825e3b14aad7723f450835cb29f55c6ca97d8 /include/asterisk
parent620054c5274bd8d7071e21c66d73c492c29472bf (diff)
res_pjsip: Refactor endpt_send_transaction (qualify_timeout)
This patch refactors the transaction timeout processing to eliminate calling the lower level public pjsip functions and reverts to calling pjsip_endpt_send_request again. This is the result of me noticing a possible incompatibility with pjproject-2.4 which was causing contact status flapping. The original version of this feature used the lower level calls to get access to the tsx structure in order to cancel the transaction when our own timer expires. Since we no longer have that access, if our own timer expires before the pjsip timer, we call the callbacks and just let the pjsip transaction take it's own course. When the transaction ends, it discovers the callbacks have already been run and just cleans itself up. A few messages in pjsip_configuration were also added/cleaned up. ASTERISK-25105 #close Change-Id: I0810f3999cf63f3a72607bbecac36af0a957f33e Reported-by: George Joseph <george.joseph@fairview5.com> Tested-by: George Joseph <george.joseph@fairview5.com>
Diffstat (limited to 'include/asterisk')
-rw-r--r--include/asterisk/res_pjsip.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/asterisk/res_pjsip.h b/include/asterisk/res_pjsip.h
index cbae5955e..b9ece71ea 100644
--- a/include/asterisk/res_pjsip.h
+++ b/include/asterisk/res_pjsip.h
@@ -1304,6 +1304,13 @@ int ast_sip_send_request(pjsip_tx_data *tdata, struct pjsip_dialog *dlg,
*
* \retval 0 Success
* \retval -1 Failure (out-of-dialog callback will not be called.)
+ *
+ * \note Timeout processing:
+ * There are 2 timers associated with this request, PJSIP timer_b which is
+ * set globally in the "system" section of pjsip.conf, and the timeout specified
+ * on this call. The timer that expires first (before normal completion) will
+ * cause the callback to be run with e->body.tsx_state.type = PJSIP_EVENT_TIMER.
+ * The timer that expires second is simply ignored and the callback is not run again.
*/
int ast_sip_send_out_of_dialog_request(pjsip_tx_data *tdata,
struct ast_sip_endpoint *endpoint, int timeout, void *token,