-1

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
asked Mar 26, 2025 at 12:53
1
  • Well, what happened? Did you get errors in your console? Did you check file permissions? Please edit the question to show your actual attempt in dialplan code. Where did you dig up ReadFile()? It was deprecated like 10 years ago or something Commented Mar 28, 2025 at 21:44

1 Answer 1

1

In your dialplan try:

CUSTSVC=${FILE(/home/richard/InTheOffice.txt)}
answered Apr 18, 2025 at 23:54
Sign up to request clarification or add additional context in comments.

1 Comment

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.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.