I did some reading of the Asterisk source code, and it seems to me there’s a bug (or flawed design?) regarding UpdateConfig.
get_input is used to read lines from the session.
Each line is added to m.headers, but this includes the end-line (\r\n) characters.
After receiving a complete message, process_message is called, which in the end calls main/manager.c function handle_updates for actually performing the config update.
In there, ast_variable_update is called to update the value of the variable with the exact header value, which includes \r\n. When looking on disk, the empty rows are \n characters. How to work solve this issue, or work around it?
René ter Woord