summaryrefslogtreecommitdiff
path: root/configs
diff options
context:
space:
mode:
authorLuigi Rizzo <rizzo@icir.org>2006-10-06 16:43:36 +0000
committerLuigi Rizzo <rizzo@icir.org>2006-10-06 16:43:36 +0000
commitb19b4b9764f1b460472c90df7cb97ae68c78a971 (patch)
tree59875043038c44b1e400da723ff77fb67230be41 /configs
parentf94849ca2ac2371e0006d6b6c7a338d64e2f3583 (diff)
document a bit the use of templates.
They are highly convenient for writing configuration files, especially if you have many similar entries, or want to switch quickly between different configurations without having to comment/uncomment large sections of the files. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44579 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'configs')
-rw-r--r--configs/sip.conf.sample44
1 files changed, 44 insertions, 0 deletions
diff --git a/configs/sip.conf.sample b/configs/sip.conf.sample
index 7f706dbb3..24dfccc76 100644
--- a/configs/sip.conf.sample
+++ b/configs/sip.conf.sample
@@ -486,7 +486,51 @@ srvlookup=yes ; Enable DNS SRV lookups on outbound calls
; If Asterisk is on a public IP, and the phone is inside of a NAT device
; you will need to configure nat option for those phones.
; Also, turn on qualify=yes to keep the nat session open
+;
+; 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
+ nat=yes
+ canreinvite=no
+ host=dynamic
+
+[public-phone](!,basic-options) ; another template inheriting basic-options
+ nat=no
+ canreinvite=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-hone)
+; secret = not_very_secret
+; [2136](public-phone,ulaw-hone)
+; secret = not_very_secret_either
+; ...
+;
+
+; Standard configurations not using templates look like this:
+;
;[grandstream1]
;type=friend
;context=from-sip ; Where to start in the dialplan when this phone calls