<html>
<head>
<base href="https://wiki.asterisk.org/wiki">
<link rel="stylesheet" href="/wiki/s/en/2176/25/9/_/styles/combined.css?spaceKey=AST&forWysiwyg=true" type="text/css">
</head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
<h2><a href="https://wiki.asterisk.org/wiki/display/AST/Tests+for+Basic+Call+Functionality">Tests for Basic Call Functionality</a></h2>
<h4>Page <b>edited</b> by <a href="https://wiki.asterisk.org/wiki/display/~mmichelson">Mark Michelson</a>
</h4>
<div id="versionComment">
<b>Comment:</b>
Added a couple of off-nominal tests.<br />
</div>
<br/>
<h4>Changes (1)</h4>
<div id="page-diffs">
<table class="diff" cellpadding="0" cellspacing="0">
<tr><td class="diff-snipped" >...<br></td></tr>
<tr><td class="diff-unchanged" > <br>h3. Off-nominal paths <br></td></tr>
<tr><td class="diff-added-lines" style="background-color: #dfd;"> <br>h5. Test 1: Unknown Source <br> <br>Procedure: <br>Carol places a call to extension playback@default <br> <br>Pass conditions: <br>Ensure Asterisk sends a 403 to Carol <br> <br>h5. Test 2: Authentication failure <br> <br>This test requires several iterations. The differences in each iteration are detailed in the table below <br> <br>||Iteration||Alice-specific Data||Alice-auth-specific data||Supplied Credentials||Comment <br>|1|auth=alice-auth|password=swordfish|realm=asterisk username=alice password=halibut|Userpass authentication, wrong password <br>|2|auth=alice-auth|password=swordfish|realm=asterisk username=carol password=swordfish|Userpass authentication, wrong username <br>|3|auth=alice-auth|password=swordfish|realm=ampersand username=alice password=swordfish|Userpass authentication, wrong realm <br>|4|auth=alice-auth|auth_type=md5\\md5_cred=c9b9e23e2160fd69b19f99116da19711|realm=asterisk username=alice password=halibut|MD5 authentication, wrong password <br>|5|auth=alice-auth|auth_type=md5\\md5_cred=c9b9e23e2160fd69b19f99116da19711|realm=asterisk username=carol password=swordfish|MD5 authentication, wrong username <br>|6|auth=alice-auth|auth_type=md5\\md5_cred=c9b9e23e2160fd69b19f99116da19711|realm=ampersand username=alice password=swordfish|MD5 authentication, wrong realm <br> <br> <br>Procedure: <br>Alice places a call to extension playback@default <br> <br>Pass Conditions: <br>Ensure that Asterisk rejects all INVITEs with credentials with 401s. <br></td></tr>
</table>
</div> <h4>Full Content</h4>
<div class="notificationGreySide">
<p>This page outlines some basic call tests for the new SIP work in Asterisk.</p>
<div>
<ul>
<li><a href='#TestsforBasicCallFunctionality-ConfigurationforTests'>Configuration for Tests</a></li>
<li><a href='#TestsforBasicCallFunctionality-Oneleggedtests'>One-legged tests</a></li>
<ul>
<li><a href='#TestsforBasicCallFunctionality-IncomingCalls'>Incoming Calls</a></li>
<ul>
<li><a href='#TestsforBasicCallFunctionality-Nominalpath'>Nominal path</a></li>
<ul>
<li><a href='#TestsforBasicCallFunctionality-Test1%3AFilePlayback'>Test 1: File Playback</a></li>
<li><a href='#TestsforBasicCallFunctionality-Test2%3AEcho'>Test 2: Echo</a></li>
</ul>
<li><a href='#TestsforBasicCallFunctionality-Offnominalpaths'>Off-nominal paths</a></li>
<ul>
<li><a href='#TestsforBasicCallFunctionality-Test1%3AUnknownSource'>Test 1: Unknown Source</a></li>
<li><a href='#TestsforBasicCallFunctionality-Test2%3AAuthenticationfailure'>Test 2: Authentication failure</a></li>
</ul>
</ul>
</ul>
</ul></div>
<h1><a name="TestsforBasicCallFunctionality-ConfigurationforTests"></a>Configuration for Tests</h1>
<p>The configuration for these tests will all be made from a basic template. Some tests will require configuration to be added to the template. This will be specified in the test if necessary.</p>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedHeader panelHeader" style="border-bottom-width: 1px;"><b>res_sip.conf</b></div><div class="preformattedContent panelContent">
<pre>[local-transport-template](!)
type=transport
bind=127.0.0.1
[local-transport](local-transport-template)
; Place test-specific transport options here
[endpoint-template](!)
type=endpoint
context=default
transport=local-transport
allow=!all,ulaw,alaw
; alice is the caller
[alice](endpoint-template)
; Place alice-specific options here
; bob is the recipient of outbound calls
[bob](endpoint-template)
host=127.0.0.1:5062
; Place bob-specific options here
[auth-template](!)
type=auth
[alice-auth](auth-template)
username=alice
; Place alice-specific auth options here
[bob-auth](auth-template)
username=bob
; Place bob-specific auth options here
; Note: in the first iteration of tests on
; this page, there will never be any bob-specific
; auth options because we do not respond properly
; to auth challenges.
</pre>
</div></div>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedHeader panelHeader" style="border-bottom-width: 1px;"><b>extensions.conf</b></div><div class="preformattedContent panelContent">
<pre>exten => echo,1,Answer()
same => n,Echo()
same => n,Hangup()
exten => playback,1,Answer()
same => n,Playback(hello-world)
same => n,Hangup()
exten => early,1,Progress()
same => n,Playback(hello-world,noanswer)
same => n,Hangup(INTERWORKING)
;This dialstring can be altered once endpoints can be used directly
exten => bob,1,Dial(Gulp/sip:bob@127.0.0.1:5062)
same => n,Hangup()
</pre>
</div></div>
<h1><a name="TestsforBasicCallFunctionality-Oneleggedtests"></a>One-legged tests</h1>
<p>These tests center around non-bridged calls between Asterisk and an endpoint.</p>
<h2><a name="TestsforBasicCallFunctionality-IncomingCalls"></a>Incoming Calls</h2>
<p>Incoming call tests involve a call placed from endpoint "alice" to Asterisk.</p>
<h3><a name="TestsforBasicCallFunctionality-Nominalpath"></a>Nominal path</h3>
<p>All Nominal path tests will be run multiple times. Each iteration of the test is detailed in the table below.</p>
<div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'>Iteration</th>
<th class='confluenceTh'>Transport-specific Data</th>
<th class='confluenceTh'>Alice-specific Data</th>
<th class='confluenceTh'>Alice-auth-specific data</th>
<th class='confluenceTh'>modules.conf addons</th>
<th class='confluenceTh'>Comment</th>
</tr>
<tr>
<td class='confluenceTd'>1</td>
<td class='confluenceTd'>protocol=udp</td>
<td class='confluenceTd'>none</td>
<td class='confluenceTd'>none</td>
<td class='confluenceTd'>none</td>
<td class='confluenceTd'>Identify by username, no auth</td>
</tr>
<tr>
<td class='confluenceTd'>2</td>
<td class='confluenceTd'>protocol=udp</td>
<td class='confluenceTd'>auth = alice-auth</td>
<td class='confluenceTd'>password = swordfish</td>
<td class='confluenceTd'>none</td>
<td class='confluenceTd'>Identify by username, userpass auth</td>
</tr>
<tr>
<td class='confluenceTd'>3</td>
<td class='confluenceTd'>protocol=udp</td>
<td class='confluenceTd'>auth = alice-auth</td>
<td class='confluenceTd'>auth_type=md5<br class="atl-forced-newline" />md5_cred=c9b9e23e2160fd69b19f99116da19711</td>
<td class='confluenceTd'>none</td>
<td class='confluenceTd'>Identify by username, md5 auth</td>
</tr>
<tr>
<td class='confluenceTd'>4</td>
<td class='confluenceTd'>protocol=udp</td>
<td class='confluenceTd'>host = 127.0.0.1:5061</td>
<td class='confluenceTd'>none</td>
<td class='confluenceTd'>noload => res_sip_endpoint_identifier_user.so</td>
<td class='confluenceTd'>Identify by host, no auth</td>
</tr>
<tr>
<td class='confluenceTd'>5</td>
<td class='confluenceTd'>protocol=udp</td>
<td class='confluenceTd'>host = 127.0.0.1:5061<br class="atl-forced-newline" />auth = alice-auth</td>
<td class='confluenceTd'>password = swordfish</td>
<td class='confluenceTd'>noload => res_sip_endpoint_identifier_user.so</td>
<td class='confluenceTd'>Identify by host, userpass auth</td>
</tr>
<tr>
<td class='confluenceTd'>6</td>
<td class='confluenceTd'>protocol=udp</td>
<td class='confluenceTd'>host = 127.0.0.1:5061<br class="atl-forced-newline" />auth = alice-auth</td>
<td class='confluenceTd'>auth_type=md5<br class="atl-forced-newline" />md5_cred=c9b9e23e2160fd69b19f99116da19711</td>
<td class='confluenceTd'>noload => res_sip_endpoint_identifier_user.so</td>
<td class='confluenceTd'>Identify by host, md5 auth</td>
</tr>
<tr>
<td class='confluenceTd'>7</td>
<td class='confluenceTd'>protocol=tcp</td>
<td class='confluenceTd'>none</td>
<td class='confluenceTd'>none</td>
<td class='confluenceTd'>none</td>
<td class='confluenceTd'>Identify by username, no auth (TCP)</td>
</tr>
<tr>
<td class='confluenceTd'>8</td>
<td class='confluenceTd'>protocol=tcp</td>
<td class='confluenceTd'>auth = alice-auth</td>
<td class='confluenceTd'>password = swordfish</td>
<td class='confluenceTd'>none</td>
<td class='confluenceTd'>Identify by username, userpass auth (TCP)</td>
</tr>
<tr>
<td class='confluenceTd'>9</td>
<td class='confluenceTd'>protocol=tcp</td>
<td class='confluenceTd'>auth = alice-auth</td>
<td class='confluenceTd'>auth_type=md5<br class="atl-forced-newline" />md5_cred=c9b9e23e2160fd69b19f99116da19711</td>
<td class='confluenceTd'>none</td>
<td class='confluenceTd'>Identify by username, md5 auth (TCP)</td>
</tr>
<tr>
<td class='confluenceTd'>10</td>
<td class='confluenceTd'>protocol=tcp</td>
<td class='confluenceTd'>host = 127.0.0.1:5061</td>
<td class='confluenceTd'>none</td>
<td class='confluenceTd'>noload => res_sip_endpoint_identifier_user.so</td>
<td class='confluenceTd'>Identify by host, no auth (TCP)</td>
</tr>
<tr>
<td class='confluenceTd'>11</td>
<td class='confluenceTd'>protocol=tcp</td>
<td class='confluenceTd'>host = 127.0.0.1:5061<br class="atl-forced-newline" />auth = alice-auth</td>
<td class='confluenceTd'>password = swordfish</td>
<td class='confluenceTd'>noload => res_sip_endpoint_identifier_user.so</td>
<td class='confluenceTd'>Identify by host, userpass auth (TCP)</td>
</tr>
<tr>
<td class='confluenceTd'>12</td>
<td class='confluenceTd'>protocol=tcp</td>
<td class='confluenceTd'>host = 127.0.0.1:5061<br class="atl-forced-newline" />auth = alice-auth</td>
<td class='confluenceTd'>auth_type=md5<br class="atl-forced-newline" />md5_cred=c9b9e23e2160fd69b19f99116da19711</td>
<td class='confluenceTd'>noload => res_sip_endpoint_identifier_user.so</td>
<td class='confluenceTd'>Identify by host, md5 auth (TCP)</td>
</tr>
</tbody></table>
</div>
<h5><a name="TestsforBasicCallFunctionality-Test1%3AFilePlayback"></a>Test 1: File Playback</h5>
<p>Procedure:<br/>
Alice places a call to extension playback@default</p>
<p>Pass conditions:<br/>
Ensure that the audio reaches Alice properly<br/>
Ensure that Asterisk sends a BYE to Alice</p>
<h5><a name="TestsforBasicCallFunctionality-Test2%3AEcho"></a>Test 2: Echo</h5>
<p>Procedure:<br/>
Alice places a call to extension echo@default.<br/>
Alice plays audio towards Asterisk. The audio is reflected back to her.<br/>
After 5 seconds, Alice hangs up.</p>
<p>Pass conditions:<br/>
Ensure that audio from Alice reaches Asterisk<br/>
Ensure that echoed audio from Asterisk reaches Alice<br/>
Ensure that Asterisk responds to Alice's BYE with a 200 OK</p>
<h3><a name="TestsforBasicCallFunctionality-Offnominalpaths"></a>Off-nominal paths</h3>
<h5><a name="TestsforBasicCallFunctionality-Test1%3AUnknownSource"></a>Test 1: Unknown Source</h5>
<p>Procedure:<br/>
Carol places a call to extension playback@default</p>
<p>Pass conditions:<br/>
Ensure Asterisk sends a 403 to Carol</p>
<h5><a name="TestsforBasicCallFunctionality-Test2%3AAuthenticationfailure"></a>Test 2: Authentication failure</h5>
<p>This test requires several iterations. The differences in each iteration are detailed in the table below</p>
<div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'>Iteration</th>
<th class='confluenceTh'>Alice-specific Data</th>
<th class='confluenceTh'>Alice-auth-specific data</th>
<th class='confluenceTh'>Supplied Credentials</th>
<th class='confluenceTh'>Comment</th>
</tr>
<tr>
<td class='confluenceTd'>1</td>
<td class='confluenceTd'>auth=alice-auth</td>
<td class='confluenceTd'>password=swordfish</td>
<td class='confluenceTd'>realm=asterisk username=alice password=halibut</td>
<td class='confluenceTd'>Userpass authentication, wrong password</td>
</tr>
<tr>
<td class='confluenceTd'>2</td>
<td class='confluenceTd'>auth=alice-auth</td>
<td class='confluenceTd'>password=swordfish</td>
<td class='confluenceTd'>realm=asterisk username=carol password=swordfish</td>
<td class='confluenceTd'>Userpass authentication, wrong username</td>
</tr>
<tr>
<td class='confluenceTd'>3</td>
<td class='confluenceTd'>auth=alice-auth</td>
<td class='confluenceTd'>password=swordfish</td>
<td class='confluenceTd'>realm=ampersand username=alice password=swordfish</td>
<td class='confluenceTd'>Userpass authentication, wrong realm</td>
</tr>
<tr>
<td class='confluenceTd'>4</td>
<td class='confluenceTd'>auth=alice-auth</td>
<td class='confluenceTd'>auth_type=md5<br class="atl-forced-newline" />md5_cred=c9b9e23e2160fd69b19f99116da19711</td>
<td class='confluenceTd'>realm=asterisk username=alice password=halibut</td>
<td class='confluenceTd'>MD5 authentication, wrong password</td>
</tr>
<tr>
<td class='confluenceTd'>5</td>
<td class='confluenceTd'>auth=alice-auth</td>
<td class='confluenceTd'>auth_type=md5<br class="atl-forced-newline" />md5_cred=c9b9e23e2160fd69b19f99116da19711</td>
<td class='confluenceTd'>realm=asterisk username=carol password=swordfish</td>
<td class='confluenceTd'>MD5 authentication, wrong username</td>
</tr>
<tr>
<td class='confluenceTd'>6</td>
<td class='confluenceTd'>auth=alice-auth</td>
<td class='confluenceTd'>auth_type=md5<br class="atl-forced-newline" />md5_cred=c9b9e23e2160fd69b19f99116da19711</td>
<td class='confluenceTd'>realm=ampersand username=alice password=swordfish</td>
<td class='confluenceTd'>MD5 authentication, wrong realm</td>
</tr>
</tbody></table>
</div>
<p>Procedure:<br/>
Alice places a call to extension playback@default</p>
<p>Pass Conditions:<br/>
Ensure that Asterisk rejects all INVITEs with credentials with 401s.</p>
</div>
<div id="commentsSection" class="wiki-content pageSection">
<div style="float: right;" class="grey">
<a href="https://wiki.asterisk.org/wiki/users/removespacenotification.action?spaceKey=AST">Stop watching space</a>
<span style="padding: 0px 5px;">|</span>
<a href="https://wiki.asterisk.org/wiki/users/editmyemailsettings.action">Change email notification preferences</a>
</div>
<a href="https://wiki.asterisk.org/wiki/display/AST/Tests+for+Basic+Call+Functionality">View Online</a>
|
<a href="https://wiki.asterisk.org/wiki/pages/diffpagesbyversion.action?pageId=22088169&revisedVersion=2&originalVersion=1">View Changes</a>
|
<a href="https://wiki.asterisk.org/wiki/display/AST/Tests+for+Basic+Call+Functionality?showComments=true&showCommentArea=true#addcomment">Add Comment</a>
</div>
</div>
</div>
</div>
</div>
</body>
</html>