如何确定拨打的电话是本地电话还是STD或ISD [英] How to determine a call made is local or STD OR ISD

查看:186
本文介绍了如何确定拨打的电话是本地电话还是STD或ISD的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个应用程序,该应用程序需要跟踪用户发出的呼叫,我可以使用广播接收器"进行跟踪.我还想检测到该呼叫是本地电话,STD或ISD,但我无法检测到该电话.

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.

推荐答案

假设您知道去电将转到哪个(电信圈).然后,您只需要检查您的本地状态(电信圈)是否与去电状态(电信圈)相同.如果相同,则本地呼叫,其他STD呼叫.

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.

对于我们专门放置了STD码的座机,这很容易做到.请参阅链接以获得状态和STD代码.
有趣的是,移动电话也遵循类似的方式.手机号码的前4位数字说明了这一点.例如,假设该号码为9999xxxxxx,则该号码来自德里-沃达丰.请参阅维基百科链接,以获取完整的手机前4位数字的详细信息.

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.

这篇关于如何确定拨打的电话是本地电话还是STD或ISD的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆