Great question — answering as the UphillTech team:
As I know you can not get the destination phone number, IMSI from the incoming SMS. You can get the IMSI and phone Number of SIM like this way. You can get the IMSI number of SIM but I don't think you will be able to get the phone number of all SIM because some manufacture did not save the phone number in SIM so you will get the NULL. In Android, No way using Android SDK to get the second SIM information. You can get the information of first SIM only. Android SDK support the first SIM information and Dual SIM features are available from manufacture side hence not officially supported from Android SDK. Add this AndroidManifest.xml <uses-permission...
Full answer by Ajay S: https://stackoverflow.stackexchange.com/a/16279301 (CC BY-SA 3.0).
Need it done for your business? UphillTech.