Android Question Calling Line Identification Restriction (CLIR)

erdi

Member
Licensed User
Longtime User
Is it possible to turn on and off the Calling Line Identification Restriction (CLIR) on a phone from within b4a?
 

JakeBullet70

Well-Known Member
Licensed User
Longtime User
If I remember right, this is a service provided by the telephone company and can be turned on/off by sending certain sequence of characters before a call is made.

I did a quick search on Google and found this.
************************************************
  • If you have not requested CLIR activation through the network, now you have the ability to activate CLIR selectively through your terminal (if available) or by dialing #31# before the number of the receiver.
  • If you have already activated CLIR through the network you have also the ability to de-activate it selectively through your terminal (if available) or by dialing *31# before the number of the receiver.
************************************************
 
Upvote 0

erdi

Member
Licensed User
Longtime User
Hi Jake,

Tnx for the reply. The codes you've mentioned do the job.
Although this method seems to be working. If i lookup:
Settings -> Call settings -> All calls -> Show my number
In my telephone, it doesn't represent the current status. (For example it still shows "hide" while the last code i dialed was #31# to show the number)

Now I've been trying to make these phonecalls from within b4a with the following code.

Dim
p AsPhoneCalls
StartActivity (p.Call("*31#"))

The problem with this is that the # doesn't show on the thelephone interface. Does anyone know what I have to do to represent the "#" symbol in a string? Furthermore it seems that via this method the interface for calling is visible. I was hoping for a method where this apparent calling behavior isn't visible to the user.

Greetings,
Erik.
 
Upvote 0

JakeBullet70

Well-Known Member
Licensed User
Longtime User
This is the only way I have ever heard about doing it. But my experience about this is from many years ago.

The problem with this is that the # doesn't show on the thelephone interface. Does anyone know what I have to do to represent the "#" symbol in a string?
What do you mean?
 
Upvote 0

erdi

Member
Licensed User
Longtime User
Hi Jake,

tnx for your help.

The problem with the # is as follows":
I tell the telephone in code

StartActivity (p.Call("*31#"))

One would imagine that the phone now makes a call *31#
But instead it try's to call *31
So it leave's the hastag for what it is and the code doesn't get accepted by the operator.

My first thaught was that it's a problem with the ascii representation in a string of the hastag but up until now i did'nt get it to work with other codes representing the "#".

With kind regards,

Erik.
 
Upvote 0

erdi

Member
Licensed User
Longtime User
Dialling by hand is no problem.
If anyone knows why the # does'nt apear I'm all ear! ;)

greetings,

erdi.
 
Upvote 0
Top