I am able to capture the incoming ussd message, but how to compare the incoming ussd message in case of dual sim phone? If I receive a ussd message alert how can I know that the
Started with Wikipedia for staring info, not much. Found out there was / is a security (pdf warning) problem with it. Then jackpot: specks (pdf warning). As I scimmed it, I don't think you will find the info you want in the USSD message itself. It is probably somewhere in the handshake before that. But did not find it.
tldr: it's not in the USSD message itself.