If you are using interposer sims to unlock your phone such as rsim, xsim, gpp sim, heicard, etc, read the guide below.
Here's how to fix USSD function on device running iOS 8 or up.
1. make sure your device is jailbroken.
2. Open Cydia- Sources
3. click Edit- Add and type: http://bovor.net/ios and click add source
4. Click on bovor.net/ios source- All packages
5. Select 'Fix USSD on iOS 8.x' package - Install - Confirm
6. Reboot Device. Done!
credits to the video owner.