How To Set The Global Setting For Each Pjsip Endpoint
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
aors0
auth0-auth
allow=ulaw,alaw,gsm,g726
context=from-internal
callerid
4 thoughts on - How To Set The Global Setting For Each Pjsip Endpoint
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
how if I use the auto generate once from freepbx ?
My pjsip.conf is the auto_generated file from freepbx and it should not be modified. I really cannot find where to set the messge_context in freepbx UI at all. could you please show me where?
( fixed top-posting order )
Most FreePBX config generated files (can) have the _custom additions that can be edited by hand and are not overwritten by the config creator.
And pjsip_endpoint_custom.conf can add options to whatever extension:
http://community.freepbx.org/t/pjsip-endpoint-custom-conf-not-working-resolved/30321
(provided you run a recent enough version of FreePBX)
el es