<html>
<head>
    <base href="https://wiki.asterisk.org/wiki">
            <link rel="stylesheet" href="/wiki/s/en/2176/25/9/_/styles/combined.css?spaceKey=AST&amp;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>added</b> by             <a href="https://wiki.asterisk.org/wiki/display/~mmichelson">Mark Michelson</a>
    </h4>
         <br/>
    <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>
</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 =&gt; echo,1,Answer()
same  =&gt;      n,Echo()
same  =&gt;      n,Hangup()

exten =&gt; playback,1,Answer()
same  =&gt;          n,Playback(hello-world)
same  =&gt;          n,Hangup()

exten =&gt; early,1,Progress()
same  =&gt;       n,Playback(hello-world,noanswer)
same  =&gt;       n,Hangup(INTERWORKING)

;This dialstring can be altered once endpoints can be used directly
exten =&gt; bob,1,Dial(Gulp/sip:bob@127.0.0.1:5062)
same  =&gt;     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 =&gt; 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 =&gt; 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 =&gt; 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 =&gt; 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 =&gt; 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 =&gt; 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>

    </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/display/AST/Tests+for+Basic+Call+Functionality?showComments=true&amp;showCommentArea=true#addcomment">Add Comment</a>
           </div>
</div>
</div>
</div>
</div>
</body>
</html>