Accepting calls only from a certain number

Hello all,

newbie here.
just a simple (I think) question - how should I set up a dialplan that only calls from a certain user xxx would be accepted, and everybody else would be rejected? I want to do this as simple as possible, preferably without using AGI.

Hi
for thsi you need to simply use cmd GotoIf & fucntion CALLERID(num)
If callerid match proceed that call further otherwise hangup that call or play any message.
gotoif provide you 2 option using that u can manup;ate ur calls.

Amit

Hey, thanks a lot.

Hi,
amit’s solution works great, but here is one more way to do it:

exten => 5000/10054,1,Answer()

where 5000 is the extension and 10054 is the CALLERID,
you can also use wildcards (_500X/_100XX).

Best Regards
Stefan Bäckström