<html>
<head>
<base href="https://wiki.asterisk.org/wiki">
<link rel="stylesheet" href="/wiki/s/2030/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/Using+Templates?focusedCommentId=8814599#comment-8814599">Using Templates</a></h2>
<h4>Page
<b>comment added</b> by <a href="https://wiki.asterisk.org/wiki/display/~russell">Russell Bryant</a>
</h4>
<br/>
<div class="notificationGreySide">
<p>True, it's not the best example. However, since it was blatantly wrong, I went ahead and made the suggested fix.</p>
</div>
<div style="border-bottom: 1px solid #ddd; padding: 10px 20px 7px 20px;">
<strong>In reply to a comment by <a href="/wiki/display/~pabelanger"
class="url fn confluence-userlink" data-username="pabelanger"
>Paul Belanger</a>:</strong><br/>
<p>IMO this is actually a bad example. Having multiple host definitions within a peer is not a valid configuration. Same can be said about deny, permit, deny, permit logic.</p>
<p>sip.conf.sample currently has the following example:</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[
[basic-options](!) ; a template
dtmfmode=rfc2833
context=from-office
type=friend
[natted-phone](!,basic-options) ; another template inheriting basic-options
nat=yes
directmedia=no
host=dynamic
[public-phone](!,basic-options) ; another template inheriting basic-options
nat=no
directmedia=yes
[my-codecs](!) ; a template for my preferred codecs
disallow=all
allow=ilbc
allow=g729
allow=gsm
allow=g723
allow=ulaw
[ulaw-phone](!) ; and another one for ulaw-only
disallow=all
allow=ulaw
; and finally instantiate a few phones
;
; [2133](natted-phone,my-codecs)
; secret = peekaboo
; [2134](natted-phone,ulaw-phone)
; secret = not_very_secret
; [2136](public-phone,ulaw-phone)
; secret = not_very_secret_either
]]></script>
</div></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/Using+Templates?focusedCommentId=8814599#comment-8814599">View Online</a>
|
<a id="reply-8814599" href="https://wiki.asterisk.org/wiki/display/AST/Using+Templates?replyToComment=8814599#comment-8814599">Reply To This</a>
</div>
</div>
</div>
</div>
</div>
</body>
</html>