[Asterisk-code-review] Change in asterisk[master]: res_pjsip: Refactor endpt_send_request to include transactio...
Matt Jordan (Code Review)
asteriskteam at digium.com
Thu Apr 16 06:44:56 CDT 2015
Hello Joshua Colp,
I'd like you to reexamine a change. Please visit
https://gerrit.asterisk.org/46
to look at the new patch set (#9).
Change subject: res_pjsip: Refactor endpt_send_request to include transaction timeout
......................................................................
res_pjsip: Refactor endpt_send_request to include transaction timeout
This is the first follow-on to https://reviewboard.asterisk.org/r/4572/ and the
discussion at
http://lists.digium.com/pipermail/asterisk-dev/2015-March/073921.html
Since we currently have no control over pjproject transaction timeout, this
patch pulls the pjsip_endpt_send_request function out of pjproject and into
res_pjsip/endpt_send_transaction in order to implement that capability.
Now when the transaction is initiated, we also schedule our own pj_timer with
our own desired timeout.
If the transaction completes before either timeout, pjproject cancels its timer,
and calls our tsx callback where we cancel our timer and run the app callback.
If the pjproject timer times out first, pjproject calls our tsx callback where
we cancel our timer and run the app callback.
If our timer times out first, we terminate the transaction which causes
pjproject to cancel its timer and call our tsx callback where we run the app
callback.
Regardless of the scenario, pjproject is calling the tsx callback inside the
group_lock and there are checks in the callback to make sure it doesn't run
twice.
As part of this patch ast_sip_send_out_of_dialog_request was created to replace
its similarly named private function. It takes a new timeout argument in
milliseconds (<= 0 to disable the timeout).
ASTERISK-24863 #close
Reported-by: George Joseph <george.joseph at fairview5.com>
Tested-by: George Joseph <george.joseph at fairview5.com>
Change-Id: I0778dc730d9689c5147a444a04aee3c1026bf747
---
M include/asterisk/res_pjsip.h
M res/res_pjsip.c
2 files changed, 177 insertions(+), 6 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/46/46/9
--
To view, visit https://gerrit.asterisk.org/46
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I0778dc730d9689c5147a444a04aee3c1026bf747
Gerrit-PatchSet: 9
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: George Joseph <george.joseph at fairview5.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
More information about the asterisk-code-review
mailing list