<div dir="ltr">how if I use the auto generate once from freepbx ?</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 22, 2015 at 10:12 PM, Ishfaq Malik <span dir="ltr"><<a href="mailto:ish@pack-net.co.uk" target="_blank">ish@pack-net.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On 22 September 2015 at 16:04, Thyda ENG <span dir="ltr"><<a href="mailto:engthyda@gmail.com" target="_blank">engthyda@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">I have many endpoints and each endpoint has some parameter in common so i wonder is there any way to config one for all endpoints? Like in my example I have two endpoints and I repeat the same thing,<div><br></div><div>







<p><span>[100]</span></p>
<p><span>type=endpoint</span></p>
<p><span>aors=100</span></p>
<p><span>auth=100-auth</span></p>
<p><span>allow=ulaw,alaw,gsm,g726</span></p>
<p><span>context=from-internal</span></p>
<p><span>callerid=device <100></span></p>
<p><span>dtmf_mode=rfc4733</span></p>
<p><span>use_avpf=no</span></p>
<p><span>ice_support=no</span></p>
<p><span>media_use_received_transport=no</span></p>
<p><span>trust_id_inbound=yes</span></p>
<p><span>send_pai=yes</span></p>
<p><span>rtp_symmetric=yes</span></p>
<p><span>rewrite_contact=yes</span></p><p><span>message_context=astsms</span></p>
<p><span></span><br></p>
<p><span>[200]</span></p>
<p><span>type=endpoint</span></p>
<p><span>aors=200</span></p>
<p><span>auth=200-auth</span></p>
<p><span>allow=ulaw,alaw,gsm,g726</span></p>
<p><span>context=from-internal</span></p>
<p><span>callerid=device <200></span></p>
<p><span>dtmf_mode=rfc4733</span></p>
<p><span>use_avpf=no</span></p>
<p><span>ice_support=no</span></p>
<p><span>media_use_received_transport=no</span></p>
<p><span>trust_id_inbound=yes</span></p>
<p><span>send_pai=yes</span></p>
<p><span>rtp_symmetric=yes</span></p>
<p><span>rewrite_contact=yes</span></p><p><span>message_context=astsms<br></span></p><p><span><br></span></p><p>how could I avoid duplicate thing like this ?</p></div></div>
<br></div></div>--<br>
<br></blockquote><div><br></div><div>From my brief look at pjsip.conf it uses the same template concept as the sip.conf.</div><div><br></div><div>Here's the relevant instructions from the sip.conf in asteris13</div><div><br></div><div> ;</div><div>; Because you might have a large number of similar sections, it is generally</div><div>; convenient to use templates for the common parameters, and add them</div><div>; the the various sections. Examples are below, and we can even leave</div><div>; the templates uncommented as they will not harm:</div><div><br></div><div>[basic-options](!)                ; a template</div><div>        dtmfmode=rfc2833</div><div>        context=from-office</div><div>        type=friend</div><div><br></div><div>[natted-phone](!,basic-options)   ; another template inheriting basic-options</div><div>        directmedia=no</div><div>        host=dynamic</div><div><br></div><div>[public-phone](!,basic-options)   ; another template inheriting basic-options</div><div>        directmedia=yes</div><div><br></div><div>[my-codecs](!)                    ; a template for my preferred codecs</div><div>        disallow=all</div><div>        allow=ilbc</div><div>        allow=g729</div><div>        allow=gsm</div><div>        allow=g723</div><div>        allow=ulaw</div><div>        ; Or, more simply:</div><div>        ;allow=!all,ilbc,g729,gsm,g723,ulaw</div><div><br></div><div>[ulaw-phone](!)                   ; and another one for ulaw-only</div><div>        disallow=all</div><div>        allow=ulaw</div><div>        ; Again, more simply:</div><div>        ;allow=!all,ulaw</div><div><br></div><div>; and finally instantiate a few phones</div><div>;</div><div>; [2133](natted-phone,my-codecs)</div><div>;        secret = peekaboo</div><div>; [2134](natted-phone,ulaw-phone)</div><div>;        secret = not_very_secret</div><div>; [2136](public-phone,ulaw-phone)</div><div>;        secret = not_very_secret_either</div><div>; ...</div><div>;</div><div><br></div><div>Regards</div><div><br></div><div>Ish</div></div>-- <br><div><div dir="ltr"><div><div dir="ltr"><pre>Ishfaq Malik 
Department: VOIP Support
Company: Packnet Limited
t: <a href="tel:%2B44%20%280%29161%20660%202350" value="+441616602350" target="_blank">+44 (0)161 660 2350</a>
f: <a href="tel:%2B44%20%280%29161%20660%209825" value="+441616609825" target="_blank">+44 (0)161 660 9825</a>
e: <a href="mailto:ish@pack-net.co.uk" target="_blank">ish@pack-net.co.uk</a>
w: <a href="http://www.pack-net.co.uk" target="_blank">http://www.pack-net.co.uk</a>

Registered Address: PACKNET LIMITED, Duplex 2, Ducie House
37 Ducie Street 
Manchester, M1 2JW
COMPANY REG NO. 04920552
</pre></div></div></div></div>
</div></div>
<br>--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" rel="noreferrer" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
               <a href="http://www.asterisk.org/hello" rel="noreferrer" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
   <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" rel="noreferrer" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br></blockquote></div><br></div>