I want to reject in-coming call for a particular number but it does not work
<p>I am trying to block incoming call for a particular number. first I try for all incoming call.
it works well.
but when I try for a particular number by the following code the call is not rejected and the phone is ringing ,I tried with my android phone..</p>

<pre><code>       @Override
     public void onReceive(Context context, Intent intent) {
      Log.v(TAG, "Receving....");
      String t1="01741297163",t2="08801741297163";
      TelephonyManager telephony = (TelephonyManager) 
      context.getSystemService(Context.TELEPHONY_SERVICE);  
      try {
       Class c = Class.forName(telephony.getClass().getName());
       Method m = c.getDeclaredMethod("getITelephony");
       m.setAccessible(true);
       Bundle b=intent.getExtras();
       num=b.getString(telephony.EXTRA_INCOMING_NUMBER);
       if(num.equals(t1)||num.equals(t2)){
       telephonyService = (ITelephony) m.invoke(telephony);
       //telephonyService.silenceRinger();
       telephonyService.endCall();
      } }catch (Exception e) {
       e.printStackTrace();
      }
</code></pre>

<p>I do not know the format of incoming number get from the Telephonymanager. </p>
