<html>
<head>
<base href="https://wiki.asterisk.org/wiki">
<link rel="stylesheet" href="/wiki/s/2042/1/7/_/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/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-unchanged" >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 *sip.conf*. (This file resides in the Asterisk configuration directory, which is typically */etc/asterisk*.) Let's name your phones *Alice* and *Bob*, so that we can easily differentiate between them. <br> <br></td></tr>
<tr><td class="diff-changed-lines" >Open *sip.conf* with your favorite text editor, and spend a minute or two looking at the file. (Don't let it overwhelm you --- the sample *sip.conf* has a *lot* 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 <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">*\[docs:general\]*</span> <span class="diff-added-words"style="background-color: #dfd;">\[general\]</span> and <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">*\[docs:authentication\]*,</span> <span class="diff-added-words"style="background-color: #dfd;">\[authentication\],</span> 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 *permit* line to match the settings for your local network. <br></td></tr>
<tr><td class="diff-unchanged" >{code}[demo-alice] <br>type=friend <br></td></tr>
<tr><td class="diff-snipped" >...<br></td></tr>
<tr><td class="diff-unchanged" > <br>{warning} <br></td></tr>
<tr><td class="diff-changed-lines" ><span class="diff-changed-words">h<span class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">4</span><span class="diff-added-chars"style="background-color: #dfd;">5</span>.</span> Be Serious About Account Security <br></td></tr>
<tr><td class="diff-unchanged" >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. <br> <br></td></tr>
<tr><td class="diff-snipped" >...<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 — 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> sip reload
Reloading SIP
server*CLI>
</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>Reloading Configuration Files
<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=10&originalVersion=9">View Changes</a>
|
<a href="https://wiki.asterisk.org/wiki/display/AST/Creating+SIP+Accounts?showComments=true&showCommentArea=true#addcomment">Add Comment</a>
</div>
</div>
</div>
</div>
</div>
</body>
</html>