<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/Creating+SIP+Accounts">Creating SIP Accounts</a></h2>
    <h4>Page <b>edited</b> by             <a href="https://wiki.asterisk.org/wiki/display/~lmadsen">Leif Madsen</a>
    </h4>
        <br/>
                         <h4>Changes (2)</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>{info} <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">h5. Reloading Configuration Files <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;">Reloading Configuration Files <br> <br></td></tr>
            <tr><td class="diff-unchanged" >Don&#39;t forget to reload the appropriate Asterisk configuration files after you have made changes to them. <br>{info} <br></td></tr>
    
            </table>
    </div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <p>In order for our two phones to communicate with each other, we need to configure an account for each phone in the channel driver which corresponds to the protocol they'll be using. Since both the phones are using the SIP protocol, we'll configure accounts in the SIP channel driver configuration file, called <b>sip.conf</b>. (This file resides in the Asterisk configuration directory, which is typically <b>/etc/asterisk</b>.) Let's name your phones <b>Alice</b> and <b>Bob</b>, so that we can easily differentiate between them.</p>

<p>Open <b>sip.conf</b> with your favorite text editor, and spend a minute or two looking at the file. (Don't let it overwhelm you &#8212; the sample <b>sip.conf</b> has a <b>lot</b> of data in it, and can be overwhelming at first glance.) Notice that there are a couple of sections at the top of the configuration, such as [general] and [authentication], which control the overall functionality of the channel driver. Below those sections, there are sections which correspond to SIP accounts on the system. Scroll to the bottom of the file, and add a section for Alice and Bob. You'll need to choose your own unique password for each account, and change the <b>permit</b> line to match the settings for your local network.</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<script type="syntaxhighlighter" class="toolbar: false; theme: Confluence; brush: java; gutter: false"><![CDATA[[demo-alice]
type=friend
host=dynamic
secret=verysecretpassword ; put a strong, unique password here instead
context=users
deny=0.0.0.0/0
permit=192.168.5.0/255.255.255.0 ; replace with your network settings

[demo-bob]
type=friend
host=dynamic
secret=othersecretpassword ; put a strong, unique password here instead
context=users
deny=0.0.0.0/0
permit=192.168.5.0/255.255.255.0 ; replace with your network settings]]></script>
</div></div>

<div class='panelMacro'><table class='warningMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="/wiki/images/icons/emoticons/forbidden.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td><h5><a name="CreatingSIPAccounts-BeSeriousAboutAccountSecurity"></a>Be Serious About Account Security</h5>
<p>We can't stress enough how important it is for you to pick a strong password for all accounts on Asterisk, and to only allow access from trusted networks. Unfortunately, we've found many instances of people exposing their Asterisk to the internet at large with easily-guessable passwords, or no passwords at all. You could be at risk of toll fraud, scams, and other malicious behavior.</p>

<p>For more information on Asterisk security and how you can protect yourself, check out <a href="http://www.asterisk.org/security/webinar/" class="external-link" rel="nofollow">http://www.asterisk.org/security/webinar/</a>.</p></td></tr></table></div>

<p>After adding the two sections above to your <b>sip.conf</b> file, go to the Asterisk command-line interface and run the <b>sip reload</b> command to tell Asterisk to re-read the <b>sip.conf</b> configuration file.</p>

<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>server*CLI&gt; sip reload

Reloading SIP

server*CLI&gt;
</pre>
</div></div>

<div class='panelMacro'><table class='infoMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="/wiki/images/icons/emoticons/information.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td><h5><a name="CreatingSIPAccounts-ReloadingConfigurationFiles"></a>Reloading Configuration Files</h5>

<p>Don't forget to reload the appropriate Asterisk configuration files after you have made changes to them.</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/Creating+SIP+Accounts">View Online</a>
        |
        <a href="https://wiki.asterisk.org/wiki/pages/diffpagesbyversion.action?pageId=4817421&revisedVersion=11&originalVersion=10">View Changes</a>
                |
        <a href="https://wiki.asterisk.org/wiki/display/AST/Creating+SIP+Accounts?showComments=true&amp;showCommentArea=true#addcomment">Add Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>