In my dial plan, extensions.conf, I have a the following variables:
SALES=Dahdi/9&Dahdi/10&Dahdi/11
CUSTSVC=Dahdi/12&Dahdi/13&Dahdi/14
I would like to get the value of the second variable from a file which contains only the Dahdi extensions string of people available. I have tried:
CUSTSVC=/home/richard/InTheOffice.txt
CUSTSVC=FILE(/home/richard/InTheOffice.txt)
CUSTSVC=ReadFile(/home/richard/InTheOffice.txt)
However none seem to assign the global variable with the value in the file. Anyone know how I can achieve this?
DarkBee
14.4k9 gold badges86 silver badges135 bronze badges
1 Answer 1
In your dialplan try:
CUSTSVC=${FILE(/home/richard/InTheOffice.txt)}
Sign up to request clarification or add additional context in comments.
1 Comment
gatorreina
Thank you for the reply. Your answer may work but I cannot confirm that it does. I can confirm that CUSTSVC=${FILE(/home/richard/InTheOffice.txt)} (without the set) has been working for almost a month. If you edit your answer (removing the set) I will accept it as solved.
ReadFile()? It was deprecated like 10 years ago or something