Found out calling autopi command is a bit faster. But there seem to be all options missing. For example the option to get the raw output only, link I can do with:
sudo salt-call --out raw ec2x.query 'AT+CMGL="all"'
But not with autopi, because it also has an issue parsing the quotes in arguments. So following commands fail:
sudo autopi --out raw ec2x.query 'AT+CMGL="all"'
sudo autopi ec2x.query 'AT+CMGL="all"'