[asterisk-dev] [Code Review] external sip attended transfer test

David Vossel dvossel at digium.com
Thu May 20 11:04:03 CDT 2010



> On 2010-05-20 09:18:07, Jeff Peeler wrote:
> > /asterisk/trunk/tests/sip_attended_transfer/run-test, line 141
> > <https://reviewboard.asterisk.org/r/662/diff/3/?file=10290#file10290line141>
> >
> >     Instead of making the reactor calls based on time, why not schedule the next method call at the end of each call or transfer? In fact, if there was some type of information returned for success from pjsua you wouldn't need the reactor at all. Although it probably is good to schedule a timeout in case something gets stuck and is undetected.

The reason for the delay is call setup.  Realistically, call setup will happen in less than a second, but the fact that there is a delay there at all means that doing two consecutive calls and a transfer asynchronously after one another will most definitely fail.  The delay of 5 seconds between each action is way over cautious, but at the same time it indicates that something seriously wrong has happened if call setup can not complete within that time frame.  The idea of having a callback to indicate when call setup is complete is the most ideal approach, but adds complications to the test design that I'm not sure are necessary.  At the moment I know of no good way of getting that information from pjsua (other than parsing stdout, which isn't a good way at all).  There are ways of watching for that sort of information over AMI, but that is only half a solution since the one-legged transfer requires call setup between two pjsua instances without Asterisk's involvement.


- David


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


On 2010-05-18 16:57:25, David Vossel wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/662/
> -----------------------------------------------------------
> 
> (Updated 2010-05-18 16:57:25)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> This is an external test to exercise the native sip method of doing attended transfers using the Replaces header.
> 
> A, B, and C are SIP endpoints.
> 
> A calls B
> A calls C
> A transfers B to C
> 
> This test is verified using the 'Status' manager action to make sure the channel's are bridged correctly after the transfer.
> 
> 
> To run this test, pjsip's pjsua app is required.  It can be found here, http://www.pjsip.org/download.htm.  After installing rename and move ..../pjsip-apps/bin/pjsua-x86-unknown-linux-gnu to /usr/sbin/pjsua. This puts pjsua into PATH, and this script expects it to be named 'pjsua'.
> 
> 
> Diffs
> -----
> 
>   /asterisk/trunk/tests/sip_attended_transfer/configs/extensions.conf PRE-CREATION 
>   /asterisk/trunk/tests/sip_attended_transfer/configs/manager.conf PRE-CREATION 
>   /asterisk/trunk/tests/sip_attended_transfer/configs/sip.conf PRE-CREATION 
>   /asterisk/trunk/tests/sip_attended_transfer/run-test PRE-CREATION 
>   /asterisk/trunk/tests/sip_attended_transfer/test-config.yaml PRE-CREATION 
>   /asterisk/trunk/tests/sip_one_legged_transfer/configs/extensions.conf PRE-CREATION 
>   /asterisk/trunk/tests/sip_one_legged_transfer/configs/manager.conf PRE-CREATION 
>   /asterisk/trunk/tests/sip_one_legged_transfer/configs/sip.conf PRE-CREATION 
>   /asterisk/trunk/tests/sip_one_legged_transfer/run-test PRE-CREATION 
>   /asterisk/trunk/tests/sip_one_legged_transfer/test-config.yaml PRE-CREATION 
> 
> Diff: https://reviewboard.asterisk.org/r/662/diff
> 
> 
> Testing
> -------
> 
> Tested with 1.4 and Trunk.  Trunk r263541 currently causes this test to segfault, but earlier revisions pass.
> 
> 
> Thanks,
> 
> David
> 
>




More information about the asterisk-dev mailing list