Use templates by entering the template name (without spaces!) immediately after the section title. The contents of the template are interpreted first, then the other lines in the section. Sections can inherit multiple templates, e.g.:
[201](my-phones,sales) ; inherits "my-phones" and "sales" username=201 secret=1111
Parameters in the template may be overwritten with parameters in the section, if necessary.
[stations](!) ; Template "stations" type=friend qualify=yes dtmfmode=rfc2833 disallow=all allow=alaw [snom](!,stations) ; Template "snom", inherits "stations" dtmfmode=inband [linksys](!,stations) ; Template "linksys", inherits "stations" qualify=no [snom1](snom) ; Station "snom1", inherits "snom" username=101 secret=123 [snom2](snom) ; Station "snom2", inherits "snom" username=102 secret=123 [linksys1](linksys) ; Station "linksys1", inherits "linksys" username=103 secret=123
Additional examples: http://www.voip-info.org/wiki/index.php?page=Asterisk+config+template