How to determine a call made is local or STD OR ISD

南楼画角 提交于 2019-12-07 04:05:23

问题


I am developing an application which requires to keep track of the outgoing calls made by user, which I am able to track by Using Broadcast Receiver. I also want to detect that is that call is Local or STD or ISD, but I am not able to detect that.


回答1:


Suppose, you know to which State(Telecom Circles) the outgoing call is going. Then you just need to check if your Local-State(Telecom Circles) is same as Outgoing-call-State(Telecom Circles) or not. If it is same, then local call else STD calls.


Now, the problem boils down to, how to find the State(Telecom Circles) of an outgoing-calls.

This can be easily done for Landline phones where we specifically put STD codes. See the link for state and there STD codes.
Interestingly, mobile phones also follow something very similar. First 4 digits of a mobile number tells that. For e.g suppose the number is 9999xxxxxx, then this number is from Delhi - Vodafone. See the wikipedia link for complete mobile phones first 4 digit details.



来源:https://stackoverflow.com/questions/15109329/how-to-determine-a-call-made-is-local-or-std-or-isd

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!