[Asterisk-Users] RE: asterisk-wide variables

Kramer, R.D.J. R.D.J.Kramer at tue.nl
Wed Aug 18 03:29:24 MST 2004


--> {Rene wrote:}
As an example: I set the gateway's telephone number both in
extensions.conf, oh323.conf and phones.conf but I don't want to change
the same data in three separate files whenever I want to set a different
telephone number for the gateway.

-> {Darryl Ross wrote:}
I have no idea whether this would work or not, but couldn't you do a
#include vars.conf
in the relevant places in extensions.conf, oh323.conf and phones.conf 
and then define the variables in vars.conf ??


{Rene:}
Hi Darryl, all,

Thanks for your suggestion, I like that idea. It works for
extensions.conf, where under [globals] I
#include vars.conf
and in vars.conf I set
MY_E164=31111111111
and in the remainder of the extensions.conf file I can get the
variable's value via ${MY_E164}.

But for the oh323.conf file this does not work. If I insert at the top
[globals]
#include vars.conf

and further on in oh323.conf
alias=${MY_E164}

then asterisk tries to register to the H.323 gatekeeper with alias
${MY_E164} instead of with 31111111111, resulting in apparent failure.

Should I perhaps use something different than [globals] in oh323.conf?
Or is there another reason why it is not working?

Cheers,
Rene.



More information about the asterisk-users mailing list