[Asterisk-Users] Include a variable from another file in configfiles

Administrator TOOTAI admin at tootai.net
Tue Dec 6 02:38:18 MST 2005


amaury BOSSE a écrit :

>Thanks for your answer but I don't want to include a file, I only want to include a variable.
>
>Is it possible to execute linux commands like grep or top in a .conf file in order to parse a file and get a variable?
>  
>
AGI is your friend

>-----Message d'origine-----
>De : Administrator TOOTAI [mailto:admin at tootai.net] 
>Envoyé : lundi 5 décembre 2005 12:43
>À : Asterisk Users Mailing List - Non-Commercial Discussion
>Objet : Re: [Asterisk-Users] Include a variable from another file in configfiles
>
>Amaury BOSSE a écrit :
>
>  
>
>>I would like to know if it is possible to include a variable in 
>>sip_nat.conf.
>>
>>I have a file with my network configuration and I want to parse it and 
>>to use LAN IP in sip_nat.conf.
>>
>>Is there a way to parse a file and include variables in a .conf file.
>>
>> 
>>
>>Amaury
>>
>>    
>>
>In your sip.conf
>
>#include /path/to/the/file/you/want/to/include
>
>In this file Asterisk will find the command, eg localnet=<your LAN IP>
>
>  
>
-- 
Daniel



More information about the asterisk-users mailing list