I have change a file /etc/asterisk/gw/custom.sh to folowed version:
echo ""> /etc/asterisk/extensions_routing.conf
echo "qqq">/etc/asterisk/test # I add this line for testing
but extensions_routing.conf still with content after reboot asterisk or reboot OS. I think file extensions_routing.conf recovered after execute custom.sh becouse file /etc/asterisk/test has created so script executed on startup.
When I run /etc/asterisk/gw/custom.sh in ssh consloe - it execute noraml: extensions_routing.conf is clean and /etc/asterisk/test created with content qqq.