[asterisk-dev] [Code Review] 4585: res_pjsip: Refactor endpt_send_request to include transaction timeout

George Joseph reviewboard at asterisk.org
Fri Apr 3 15:12:04 CDT 2015


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4585/
-----------------------------------------------------------

Review request for Asterisk Developers, Joshua Colp and Mark Michelson.


Repository: Asterisk


Description
-------

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 

This patch pulls the pjsip_endpt_send_request function out of pjproject and into res_pjsip in order to implement transaction timeout capability.  Now when the transaction is initiated, an asterisk sched timer is started.  If the transaction completes (or pjsip itself times it out) before the timer expires, the timer is cancelled.  If the timer expires before the transaction is completed, the transaction is cancelled.  Either way, the callback is called with the TIMER event code.

The timeout is supplied in the call to ast_sip_send_out_of_dialog_request.  If '-1', no timer is started and the transaction will continue until successful completion or pjsip itself cancels it.


Diffs
-----

  branches/13/res/res_pjsip.c 433967 
  branches/13/include/asterisk/res_pjsip.h 433967 

Diff: https://reviewboard.asterisk.org/r/4585/diff/


Testing
-------

Tested that both of the pjsip timeout and asterisk timeout scenarios work and clean up properly.

All pjsip testsuite tests that worked before the change still work after the change.  A new testsuite test will be written when the companion pjsip_options work is done.


Thanks,

George Joseph

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20150403/07bc3a7c/attachment.html>


More information about the asterisk-dev mailing list