The PreFIX PH app is able to detect which Phone carrier is used by the number you are dialling.
The App then puts the carrier details on your contacts, and you can choose which of your SIM cards to use when calling or messaging.
A statement from the website of this APP:
PreFIX PH is the intelligent phone directory app that automatically labels your contact’s phone numbers with their network name. It goes through your contacts and specifies which ones are Globe & TouchMobile, Smart & Talk’n’Text or Sun Cellular. Never accidentally waste load again!
Details at: www.prefix.ph