Constant Strings in config files?

(thinking like a programmer here)

I’ve got some success with my setup, but I’m not happy with the state of my config files, having followed many different walk-throughs and tutorials. Everything works, but it’s a mess. I’d very much like to scrap them all and start over, including only what I need. And I’d like to do it properly and neatly. Since I’m still in hobby mode and not yet on a production system this is a good time to play.

What I’m hoping for is the ability to declare named constants. For example, my sip.conf defines one extension as

[6000] type=friend qualify=yes context=my-phones secret=MYPSW host=dynamic mailbox=6000
and part of extensions.conf contains

[my-phones] exten => 6000,1,Dial(SIP/6000,5) exten => 6000,2,VoiceMail(6000,u)
These are just short excepts from only two of the files, and 6000 has been mentioned six times already, once with a SIP/ prefix. If I ever decide to change the extension number, things get dirty. Declaring things like this as constants makes life easier. For example, if I had a constants.conf that contained something like:

and then could code the portion of sip.conf as

[&KenGS] #include "constants.conf" type=friend qualify=yes context=my-phones secret=MYPSW host=dynamic mailbox=&KenGS and extensions.conf as

#include "constants.conf" [my-phones] exten => &KenGS,1,Dial(SIP/&KenGS,5) exten => &KenGS,2,VoiceMail(&KenGS,u)
then things would be that much simpler to maintain - only one thing to change in one place.

I know that some of this can be assisted by entries in the [globals] section of extensions.conf, but not to the level I’m looking at here. Did I miss something, or have I just completely misunderstood everything and there are far better ways of doing this?