<div dir="ltr">I have a plain text file, ASCII, unix line breaks. 1 single line, and all that is in it is the word "radio".<br><br>Here's some test dialplan:<br><br>exten => 5,1,Verbose(Context: ${CONTEXT} Exten:${EXTEN})<br><br>    same => n,Set(feature=${FILE(/home/test/feature-1.txt,0,1,l,u)})<br>    same => n,Verbose(${feature})<br>   <br>    same => n,Set(featurefile=/home/test/feature-1.txt)<br>    same => n,Set(feature2=${FILE(${featurefile},0,1,l,u)})<br>    same => n,Verbose(${feature2})<br><br>Both should output "radio", right? Here's the output:<br><font face="monospace, monospace"><br>    -- Executing [5@fromvoipfone201:2] Set("PJSIP/6001-00000052", "feature=radio") in new stack<br>    -- Executing [5@fromvoipfone201:3] Verbose("PJSIP/6001-00000052", "radio") in new stack<br>radio<br><br>    -- Executing [5@fromvoipfone201:4] Set("PJSIP/6001-00000052", "featurefile=/home/test/feature-1.txt") in new stack<br>    -- Executing [5@fromvoipfone201:5] Set("PJSIP/6001-00000052", "feature2=<b>radi</b>") in new stack </font><div><font face="monospace, monospace">                                                        <b>GAAAAARRRGGGHHHH!  ^^^^^</b></font></div><div><font face="monospace, monospace"><br></font><div><font face="monospace, monospace">    -- Executing [5@fromvoipfone201:6] Verbose("PJSIP/6001-00000052", "radi") in new stack</font><br><br>And this is what's just at the top of the script. If I put it way down in another context:<br><font face="monospace, monospace"><br>    -- Executing [s@track-handler:3] Verbose("Local/s@root-00000026;2", "/home/test/feature-1") in new stack<br>/home/test/feature-1<br>    -- Executing [s@track-handler:4] Set("Local/s@root-00000026;2", "feature=<b>radio▒▒</b>") in new stack </font></div><div><font face="monospace, monospace">                                                    <b>EVEN MORE</b></font><span style="font-family:monospace,monospace"><b> GAAAAARRRGGGHHHH!  ^^^^^</b></span></div><div><font face="monospace, monospace"><br>[Oct 17 13:29:33] ERROR[5093][C-0000003c]: json.c:704 ast_json_vpack: Error building JSON from '{s: s, s: s}': Invalid UTF-8 string.<br>[Oct 17 13:29:33] ERROR[5093][C-0000003c]: stasis_channels.c:773 ast_channel_publish_varset: Error creating message<br>    -- Executing [s@track-handler:5] Verbose("Local/s@root-00000026;2", "radio▒▒") in new stack<br>radio▒▒<br>    -- Executing [s@track-handler:6] GotoIf("Local/s@root-00000026;2", "1?radio▒▒,s,1") in new stack</font><br><br></div><div><br></div><div>So, at the top of the file, when it's just a straight file as the filename, it gives the full word. If the filename is a variable, it strips and character. And further down, same thing, but it adds two weird blocks, which appear side by side in the console, but weirdly, stacked up in this email.</div><div><br></div><div>(Oh, by the way, if there is more than one line in the file, even if I used "u" for line breaks, it adds a newline to the variable, Is that correct?)<br><br>What am I missing? I've opened it in both nano and notepad++, I've used iconv and all the tools I can think of to check that file, and all the asterisk conf files, too.<br>It all looks as it should here:</div><div><br>$ cat feature-1.txt<br>radio$ file feature-1.txt<br>feature-1.txt: ASCII text<br>$ wc -l feature-1.txt<br>0 feature-1.txt<br>wc -c feature-1.txt<br>5 feature-1.txt</div></div><div><br></div><div>After 6 hours struggling with this, I think I'm starting to lose the plot. Can anyone tell me where I'm going wrong? Thanks.<br></div></div>