<html>
<head>
    <base href="https://wiki.asterisk.org/wiki">
            <link rel="stylesheet" href="/wiki/s/2029/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/Using+Templates?focusedCommentId=8127082#comment-8127082">Using Templates</a></h2>
        <h4>Page
        <b>comment added</b> by              <a href="https://wiki.asterisk.org/wiki/display/~pabelanger">Paul Belanger</a>
    </h4>
    <br/>
    <div class="notificationGreySide">
       <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 style="border-bottom: 1px solid #ddd; padding: 10px 20px 7px 20px;">
        <strong>In reply to a comment by <a href="/wiki/display/~jpms"
                          class="url fn confluence-userlink" data-username="jpms"
                   >José Méndez</a>:</strong><br/>
        <p>Shouldn't section <a href="/wiki/pages/createpage.action?spaceKey=AST&amp;title=test-three" class="createlink">test&#45;three</a>(foo,bar) read <a href="/wiki/pages/createpage.action?spaceKey=AST&amp;title=test-three" class="createlink">test&#45;three</a>(test-one,test-two) instead?</p>
        </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=8127082#comment-8127082">View Online</a>
              |
       <a id="reply-8127082" href="https://wiki.asterisk.org/wiki/display/AST/Using+Templates?replyToComment=8127082#comment-8127082">Reply To This</a>
           </div>

</div>
</div>
</div>
</div>
</body>
</html>