[asterisk-dev] [Code Review]: Testsuite: Add tests for SIP session timers

Mark Michelson reviewboard at asterisk.org
Mon Nov 5 16:43:13 CST 2012



> On Nov. 5, 2012, 3:51 p.m., Mark Michelson wrote:
> > You could make these tests time out less quickly if you changed the session-timers-minse and session-timers-expires settings in Asterisk on each test. That way, you could set the session timer to be something like 10 seconds instead of 90.
> 
> Mark Michelson wrote:
>     s/less quickly/more quickly/
>     
>     oops
> 
> opticron wrote:
>     This works when Asterisk is the UAC and gets told that the refresh interval is going to be 10s (it probably shouldn't work), but when operating as the UAS and 10s is requested Asterisk replies with a "422 Interval Too Small" even if I try to set min-se to 10s (the RFC mandates minimum min-se of 90s which Asterisk enforces and Asterisk only checks the incoming SE when it is UAS).

Yep, you're right that RFC 4028 says that the session-expires can be no less than 90 seconds. I'd say that Asterisk should immediately hang the call up if it gets told the session interval is 10 seconds.

I was going to suggest that we allow lower-than-the-RFC values for Session-Expires and Min-SE as long as TEST_FRAMEWORK is enabled, but then we couldn't have a test to make sure that Asterisk, as the UAS, properly rejects incoming calls when the Session-Expires is too low.


- Mark


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


On Nov. 5, 2012, 4:38 p.m., opticron wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2180/
> -----------------------------------------------------------
> 
> (Updated Nov. 5, 2012, 4:38 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> This adds a series of 4 basic SIP session timer tests where Asterisk is UAS or UAC and where Asterisk or the SIPp scenario on the remote end is expected to refresh the session.  There are several additional timer tests that are already planned that will cover more complex scenarios.
> 
> 
> This addresses bug SWP-5054.
>     https://issues.asterisk.org/jira/browse/SWP-5054
> 
> 
> Diffs
> -----
> 
>   asterisk/trunk/lib/python/asterisk/SimpleTestCase.py 3504 
>   asterisk/trunk/lib/python/asterisk/TestCase.py 3504 
>   asterisk/trunk/lib/python/asterisk/sipp.py 3504 
>   asterisk/trunk/tests/channels/SIP/tests.yaml 3504 
>   asterisk/trunk/tests/channels/SIP/timers/basic_uac_refresh/configs/ast1/extensions.conf PRE-CREATION 
>   asterisk/trunk/tests/channels/SIP/timers/basic_uac_refresh/configs/ast1/sip.conf PRE-CREATION 
>   asterisk/trunk/tests/channels/SIP/timers/basic_uac_refresh/originator.py PRE-CREATION 
>   asterisk/trunk/tests/channels/SIP/timers/basic_uac_refresh/sipp/uas-no-hangup.xml PRE-CREATION 
>   asterisk/trunk/tests/channels/SIP/timers/basic_uac_refresh/test-config.yaml PRE-CREATION 
>   asterisk/trunk/tests/channels/SIP/timers/basic_uac_teardown/configs/ast1/extensions.conf PRE-CREATION 
>   asterisk/trunk/tests/channels/SIP/timers/basic_uac_teardown/configs/ast1/sip.conf PRE-CREATION 
>   asterisk/trunk/tests/channels/SIP/timers/basic_uac_teardown/originator.py PRE-CREATION 
>   asterisk/trunk/tests/channels/SIP/timers/basic_uac_teardown/sipp/uas-no-hangup.xml PRE-CREATION 
>   asterisk/trunk/tests/channels/SIP/timers/basic_uac_teardown/test-config.yaml PRE-CREATION 
>   asterisk/trunk/tests/channels/SIP/timers/basic_uas_refresh/configs/ast1/extensions.conf PRE-CREATION 
>   asterisk/trunk/tests/channels/SIP/timers/basic_uas_refresh/configs/ast1/sip.conf PRE-CREATION 
>   asterisk/trunk/tests/channels/SIP/timers/basic_uas_refresh/sipp/uac-no-hangup.xml PRE-CREATION 
>   asterisk/trunk/tests/channels/SIP/timers/basic_uas_refresh/test-config.yaml PRE-CREATION 
>   asterisk/trunk/tests/channels/SIP/timers/basic_uas_teardown/configs/ast1/extensions.conf PRE-CREATION 
>   asterisk/trunk/tests/channels/SIP/timers/basic_uas_teardown/configs/ast1/sip.conf PRE-CREATION 
>   asterisk/trunk/tests/channels/SIP/timers/basic_uas_teardown/sipp/uac-no-hangup.xml PRE-CREATION 
>   asterisk/trunk/tests/channels/SIP/timers/basic_uas_teardown/test-config.yaml PRE-CREATION 
>   asterisk/trunk/tests/channels/SIP/timers/tests.yaml PRE-CREATION 
> 
> Diff: https://reviewboard.asterisk.org/r/2180/diff
> 
> 
> Testing
> -------
> 
> Tested on Asterisk 1.8, 11, and trunk.
> 
> 
> Thanks,
> 
> opticron
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20121105/1fb5a95c/attachment.htm>


More information about the asterisk-dev mailing list