Yes, this is possible. Nowadays you do not even need "special firmware", any standard/base firmware release are also able to do that.
Simply use above instructions. In short:
- Connect to your router via SSH/CLI:
- SSH/CLI login: root
- SSH/CLI password: <your router's password>
- Then send your desired USSD command with "gsmctl -U" CLI/SSH command. Example: gsmctl -U "*100#"
- Read the response form operator using "cat /tmp/ussd" CLI/SSH command. Take note that answer might few moments to arrive. If this response is not yet available (e.g. file is not present), simply check few moments latter.