Hi there,
I made a php script (click2call.php), which I am using inside my web page. This script generates a call through registered softphone.
Now, since I am calculating some statistics, I need to know, who made a phone call and how many, etc… so it is neccessary that user generates calls by click2call.php script.
Is there any way, I can prevent user to dialout using softphone directly? I need to block dialing user manually on softphone.
Thank you.
Put a proper dialplan (to reject the calls) in a context specified in endpoint definition for soft phone user in sip.conf
e.g.
in sip.conf
[1234]
… …
context=from-softphone
… …
And in extensions.conf
[from-softphone]
exten => _X.,1,Busy()
–Satish Barot
That simple? 
I do have a context, but was affraid that I would block also calls made through click2call script.
Thanks!
He said use a specific context, that means one that is different from the click to call context.
Thanks for warning. Missed that spot.
So, now, inside my php script I define context “clickcall” for click functionality:
fputs($socket, “Context: clickcall\r\n”);
and all my softphones are registered within context "softphone"
in sip.conf
[901]
context=softphone
…
in extensions.conf
[softphone]
exten => _X.,1,Busy()
Thanks for help.

No,… I was too fast,… it is not working as expected,…
I think I didn’t give enough information.
User logs into web app. When he clicks a number to call (using click2call script), his softphone auto-answers and outbound call is made.
If I create a context for this softphone with Busy(), then click to call no longer “activates” softphone,… it doesn’t ring.
What am I missing here?

It works!
I had a typo in dialplan (for logging purposes).
Thanks for help.