I would like to check which SIM is making an outgoing call for DUAL SIM android phones. Read this article Android : Check whether the phone is dual SIM.
Works like a
You can create BroadcastReceiver, which will accept all outgoing calls. Then:
String number = intent.getStringExtra(Intent.EXTRA_PHONE_NUMBER);
int slot=intent.getIntExtra("com.android.phone.extra.slot",-1);
//0 or 1 are valid in my case
number is dialed number
slot is through which slot you make that call
You will need to register that receiver, and give proper permissions.
This works for dialed USSD codes also. It is tested on Privileg GSM S7589 2 SIM cards, Android 4.2.1