<html>
<head>
    <base href="https://wiki.asterisk.org/wiki">
            <link rel="stylesheet" href="/wiki/s/2042/1/7/_/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/Making+a+Phone+Call">Making a Phone Call</a></h2>
    <h4>Page <b>edited</b> by             <a href="https://wiki.asterisk.org/wiki/display/~lmadsen">Leif Madsen</a>
    </h4>
        <div id="versionComment">
        <b>Comment:</b>
        Formatting<br />
    </div>
        <br/>
                         <h4>Changes (3)</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" >{noformat} <br> <br></td></tr>
            <tr><td class="diff-changed-lines" >As you can see, Alice called extension *6002* in the <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">*\[docs:users\]*</span> <span class="diff-added-words"style="background-color: #dfd;">\[users\]</span> context, which in turn used the *Dial* application to call Bob&#39;s phone. Bob&#39;s phone rang, and then answered the call. Asterisk then bridged the two calls (one call from Alice to Asterisk, and the other from Asterisk to Bob), until Alice hung up the phone. <br></td></tr>
            <tr><td class="diff-unchanged" > <br>At this point, you have a very basic PBX. It has two extensions which can dial each other, but that&#39;s all. Before we move on, however, let&#39;s review a few basic troubleshooting steps that will help you be more successful as you learn about Asterisk. <br> <br>{tip} <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">h5. Basic PBX Troubleshooting <br></td></tr>
            <tr><td class="diff-unchanged" > <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">Basic PBX Troubleshooting <br> <br></td></tr>
            <tr><td class="diff-unchanged" >The most important troubleshooting step is to set your verbosity level to three (or higher), and watch the command-line interface for errors or warnings as calls are placed. <br> <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
    
            </table>
    </div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <p>At this point, you should be able to pick up Alice's phone and dial extension <b>6002</b> to call Bob, and dial <b>6001</b> from Bob's phone to call Alice. As you make a few test calls, be sure to watch the Asterisk command-line interface (and ensure that your verbosity is set to a value three or higher) so that you can see the messages coming from Asterisk, which should be similar to the ones below:</p>

<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>server*CLI&gt;     -- Executing [6002@users:1] Dial("SIP/demo-alice-00000000", "SIP/demo-bob,20") in new stack
    -- Called demo-bob
    -- SIP/demo-bob-00000001 is ringing
    -- SIP/demo-bob-00000001 answered SIP/demo-alice-00000000
    -- Native bridging SIP/demo-alice-00000000 and SIP/demo-bob-00000001
  == Spawn extension (users, 6002, 1) exited non-zero on 'SIP/demo-alice-00000000'
</pre>
</div></div>

<p>As you can see, Alice called extension <b>6002</b> in the [users] context, which in turn used the <b>Dial</b> application to call Bob's phone. Bob's phone rang, and then answered the call. Asterisk then bridged the two calls (one call from Alice to Asterisk, and the other from Asterisk to Bob), until Alice hung up the phone.</p>

<p>At this point, you have a very basic PBX. It has two extensions which can dial each other, but that's all. Before we move on, however, let's review a few basic troubleshooting steps that will help you be more successful as you learn about Asterisk.</p>

<div class='panelMacro'><table class='tipMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="/wiki/images/icons/emoticons/check.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td><h5><a name="MakingaPhoneCall-BasicPBXTroubleshooting"></a>Basic PBX Troubleshooting</h5>

<p>The most important troubleshooting step is to set your verbosity level to three (or higher), and watch the command-line interface for errors or warnings as calls are placed.</p>

<p>To ensure that your SIP phones are registered, type <b>sip show peers</b> at the Asterisk CLI.</p>

<p>To see which context your SIP phones will send calls to, type <b>sip show users</b>.</p>

<p>To ensure that you've created the extensions correctly in the <b>[users]</b> context in the dialplan, type <b>dialplan show users</b>.</p>

<p>To see which extension will be executed when you dial extension <b>6002</b>, type <b>dialplan show 6002@users</b>.</p></td></tr></table></div>
    </div>
        <div id="commentsSection" class="wiki-content pageSection">
        <div style="float: right;">
            <a href="https://wiki.asterisk.org/wiki/users/viewnotifications.action" class="grey">Change Notification Preferences</a>
        </div>
        <a href="https://wiki.asterisk.org/wiki/display/AST/Making+a+Phone+Call">View Online</a>
        |
        <a href="https://wiki.asterisk.org/wiki/pages/diffpagesbyversion.action?pageId=4817414&revisedVersion=6&originalVersion=5">View Changes</a>
                |
        <a href="https://wiki.asterisk.org/wiki/display/AST/Making+a+Phone+Call?showComments=true&amp;showCommentArea=true#addcomment">Add Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>