5

How do I get dial code from mcc (mobile country code)?

eg. India has 404 or 405 as mcc for various network operators, +91 as the standard dial-code.

I am using cordova-plugin-sim plugin of cordova.

When I use window.plugins.sim.getSimInfo function, I get this info through a JSON response (I have not shown all the info for privacy/security reasons):

callState: 0
carrierName: "BSNL MOBILE"
countryCode: "in"
dataActivity: <some number>
deviceId: "<some id as integer>"
deviceSoftwareVersion: "<a 2 digit code>"
isNetworkRoaming: false
mcc: "404"
mnc: "66"
networkType: 10
phoneNumber: "<my mobile number without dial code>"
phoneType: 1
simSerialNumber: "<sim serial number, long one>"
simState: 5
subscriberId: "<subscriber Id, long one>"

Do I need to use another API to get dial code using the information that I get from window.plugins.sim.getSimInfo?

Shri
  • 834
  • 1
  • 12
  • 36
  • Have you tried this https://github.com/dtmtec/cordova-plugin-carrier ? – SANAT Mar 07 '16 at 08:32
  • It will only give me a subset of information that I get using `cordova-plugin-sim`. So not enough @SANATSHUKLA – Shri Mar 07 '16 at 08:46

0 Answers0