how if I use the auto generate once from freepbx ? On Tue, Sep 22, 2015 at 10:12 PM, Ishfaq Malik <i...@pack-net.co.uk> wrote:
> > > On 22 September 2015 at 16:04, Thyda ENG <ength...@gmail.com> wrote: > >> 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, >> >> [100] >> >> type=endpoint >> >> aors=100 >> >> auth=100-auth >> >> allow=ulaw,alaw,gsm,g726 >> >> context=from-internal >> >> callerid=device <100> >> >> dtmf_mode=rfc4733 >> >> use_avpf=no >> >> ice_support=no >> >> media_use_received_transport=no >> >> trust_id_inbound=yes >> >> send_pai=yes >> >> rtp_symmetric=yes >> >> rewrite_contact=yes >> >> message_context=astsms >> >> >> [200] >> >> type=endpoint >> >> aors=200 >> >> auth=200-auth >> >> allow=ulaw,alaw,gsm,g726 >> >> context=from-internal >> >> callerid=device <200> >> >> dtmf_mode=rfc4733 >> >> use_avpf=no >> >> ice_support=no >> >> media_use_received_transport=no >> >> trust_id_inbound=yes >> >> send_pai=yes >> >> rtp_symmetric=yes >> >> rewrite_contact=yes >> >> message_context=astsms >> >> >> how could I avoid duplicate thing like this ? >> >> -- >> >> > From my brief look at pjsip.conf it uses the same template concept as the > sip.conf. > > Here's the relevant instructions from the sip.conf in asteris13 > > ; > ; Because you might have a large number of similar sections, it is > generally > ; convenient to use templates for the common parameters, and add them > ; the the various sections. Examples are below, and we can even leave > ; the templates uncommented as they will not harm: > > [basic-options](!) ; a template > dtmfmode=rfc2833 > context=from-office > type=friend > > [natted-phone](!,basic-options) ; another template inheriting > basic-options > directmedia=no > host=dynamic > > [public-phone](!,basic-options) ; another template inheriting > basic-options > directmedia=yes > > [my-codecs](!) ; a template for my preferred codecs > disallow=all > allow=ilbc > allow=g729 > allow=gsm > allow=g723 > allow=ulaw > ; Or, more simply: > ;allow=!all,ilbc,g729,gsm,g723,ulaw > > [ulaw-phone](!) ; and another one for ulaw-only > disallow=all > allow=ulaw > ; Again, more simply: > ;allow=!all,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 > ; ... > ; > > Regards > > Ish > -- > > Ishfaq Malik > Department: VOIP Support > Company: Packnet Limited > t: +44 (0)161 660 2350 > f: +44 (0)161 660 9825 > e: i...@pack-net.co.uk > w: http://www.pack-net.co.uk > > Registered Address: PACKNET LIMITED, Duplex 2, Ducie House > 37 Ducie Street > Manchester, M1 2JW > COMPANY REG NO. 04920552 > > > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > New to Asterisk? Join us for a live introductory webinar every Thurs: > http://www.asterisk.org/hello > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >
-- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users