[asterisk-dev] [Code Review] 4352: testsuite: Add tests for ARI redirect; PJSIP Transfer

Matt Jordan reviewboard at asterisk.org
Tue Jan 20 22:06:39 CST 2015


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

(Updated Jan. 20, 2015, 10:06 p.m.)


Review request for Asterisk Developers.


Changes
-------

Addressed Mark's findings. Re-ran the tests with the proposed changes and the tests still pass (yay).


Bugs: ASTERISK-24015 and ASTERISK-24703
    https://issues.asterisk.org/jira/browse/ASTERISK-24015
    https://issues.asterisk.org/jira/browse/ASTERISK-24703


Repository: testsuite


Description
-------

This patch adds tests for https://reviewboard.asterisk.org/r/4316/, which includes both tests for PJSIP's .transfer channel callback and the ARI /channels/[id]/redirect operation.

*PJSIP Tests*
 - Test transferring an unanswered channel to a PJSIP endpoint, which responds to the initial INVITE request with a 302
 - Test transferring an answered channel to a PJSIP endpoint, which sends a REFER request to the target
 - Test transferring an unanswered channel to a SIP URI via PJSIP, which responds to the initial INVITE request with a 302
 - Test transferring an answered channel to a SIP URI via PJSIP, which sends a REFER request to the target

*ARI Tests*
 - Off-nominal testing of the new operation, verifying that the various off nominal error response codes are returned as expected
 - Nominal testing of the operation. For fun, this spawns four Asterisk instances (one call generator, one load balancer, and two destinations) - and proceeds to load balance 'calls' between the two destination instances.

As a pre-emptive note:
(1) The off-nominal test makes use of the ARI event matcher, as it requires a PJSIP channel and tests off nominal error response codes. Along with needing to originate a second channel, the Python callback for this is relatively self contained and limited, both of which remove most of the benefit of driving the whole thing in YAML.
(2) The nominal test is written in "old style" - a single run-test. I can't really see how anyone would re-use portions of it, but it was a fun test to write to show the power of the new operation - plus it does exercise the operation quite a lot.


Diffs (updated)
-----

  /asterisk/trunk/tests/rest_api/channels/tests.yaml 6332 
  /asterisk/trunk/tests/rest_api/channels/redirect/tests.yaml PRE-CREATION 
  /asterisk/trunk/tests/rest_api/channels/redirect/off-nominal/test-config.yaml PRE-CREATION 
  /asterisk/trunk/tests/rest_api/channels/redirect/off-nominal/redirect_off_nominal.py PRE-CREATION 
  /asterisk/trunk/tests/rest_api/channels/redirect/off-nominal/configs/ast1/pjsip.conf PRE-CREATION 
  /asterisk/trunk/tests/rest_api/channels/redirect/off-nominal/configs/ast1/extensions.conf PRE-CREATION 
  /asterisk/trunk/tests/rest_api/channels/redirect/nominal/test-config.yaml PRE-CREATION 
  /asterisk/trunk/tests/rest_api/channels/redirect/nominal/run-test PRE-CREATION 
  /asterisk/trunk/tests/rest_api/channels/redirect/nominal/configs/ast4/pjsip.conf PRE-CREATION 
  /asterisk/trunk/tests/rest_api/channels/redirect/nominal/configs/ast4/http.conf PRE-CREATION 
  /asterisk/trunk/tests/rest_api/channels/redirect/nominal/configs/ast4/extensions.conf PRE-CREATION 
  /asterisk/trunk/tests/rest_api/channels/redirect/nominal/configs/ast3/pjsip.conf PRE-CREATION 
  /asterisk/trunk/tests/rest_api/channels/redirect/nominal/configs/ast3/http.conf PRE-CREATION 
  /asterisk/trunk/tests/rest_api/channels/redirect/nominal/configs/ast3/extensions.conf PRE-CREATION 
  /asterisk/trunk/tests/rest_api/channels/redirect/nominal/configs/ast2/pjsip.conf PRE-CREATION 
  /asterisk/trunk/tests/rest_api/channels/redirect/nominal/configs/ast2/http.conf PRE-CREATION 
  /asterisk/trunk/tests/rest_api/channels/redirect/nominal/configs/ast2/extensions.conf PRE-CREATION 
  /asterisk/trunk/tests/rest_api/channels/redirect/nominal/configs/ast1/pjsip.conf PRE-CREATION 
  /asterisk/trunk/tests/rest_api/channels/redirect/nominal/configs/ast1/http.conf PRE-CREATION 
  /asterisk/trunk/tests/rest_api/channels/redirect/nominal/configs/ast1/extensions.conf PRE-CREATION 
  /asterisk/trunk/tests/channels/pjsip/transfers/tests.yaml 6332 
  /asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/tests.yaml PRE-CREATION 
  /asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/refer/test-config.yaml PRE-CREATION 
  /asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/refer/sipp/alice.xml PRE-CREATION 
  /asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/refer/configs/ast1/pjsip.conf PRE-CREATION 
  /asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/refer/configs/ast1/extensions.conf PRE-CREATION 
  /asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/redirect/test-config.yaml PRE-CREATION 
  /asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/redirect/sipp/alice.xml PRE-CREATION 
  /asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/redirect/configs/ast1/pjsip.conf PRE-CREATION 
  /asterisk/trunk/tests/channels/pjsip/transfers/asterisk/uri/redirect/configs/ast1/extensions.conf PRE-CREATION 
  /asterisk/trunk/tests/channels/pjsip/transfers/asterisk/tests.yaml PRE-CREATION 
  /asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/tests.yaml PRE-CREATION 
  /asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/refer/test-config.yaml PRE-CREATION 
  /asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/refer/sipp/alice.xml PRE-CREATION 
  /asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/refer/configs/ast1/pjsip.conf PRE-CREATION 
  /asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/refer/configs/ast1/extensions.conf PRE-CREATION 
  /asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/redirect/test-config.yaml PRE-CREATION 
  /asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/redirect/sipp/alice.xml PRE-CREATION 
  /asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/redirect/configs/ast1/pjsip.conf PRE-CREATION 
  /asterisk/trunk/tests/channels/pjsip/transfers/asterisk/endpoint/redirect/configs/ast1/extensions.conf PRE-CREATION 

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


Testing
-------


Thanks,

Matt Jordan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20150121/5fcce8d4/attachment.html>


More information about the asterisk-dev mailing list