How to block all incoming calls on pstn trunk

As the subject states, I want to block ALL incoming calls on a pstn trunk.
The trunk is used for outgoing only.

Is there a simple way to do this or is it a case of using goto statements with callerid checking?
If so, a quick example would look like;

???

Thanks guys.

Danny

Asking your PSTN supplier to make it outgoing only, is the best solution.

Making the first dialplan line for your incoming calls context for that trunk run Hangup, will reject calls. However, unless you have either party clearing on the line, you will have to wait for the caller to go away before you can use the line, so you might be better off generating SIT and a message telling the caller your proper incoming number, and asking them to hang up immediately.

You should also negotiate with your PSTN supplier to present your proper incoming number as CLI.

Of course, if this is outgoing only because you are doing telephone spam, I have no sympathy.

[quote=“david55”]Asking your PSTN supplier to make it outgoing only, is the best solution.

Making the first dialplan line for your incoming calls context for that trunk run Hangup, will reject calls. However, unless you have either party clearing on the line, you will have to wait for the caller to go away before you can use the line, so you might be better off generating SIT and a message telling the caller your proper incoming number, and asking them to hang up immediately.

You should also negotiate with your PSTN supplier to present your proper incoming number as CLI.

Of course, if this is outgoing only because you are doing telephone spam, I have no sympathy.[/quote]

Spam! - No nothing like that lol.
I want to kill those guys as much as anyone else.

Simply put, I use a GSM gateway to forward landline and skype calls from my asterisk box to my mobile/cell phone.
The GSM Gateway obviously as a sim and number of it’s own.

If anyone rings that number (not that it’s advertised)they will hit the asterisk box which I don’t want.
I’ll ring my mobile provider and ask them to bar incoming calls, I was thinking about doing that anyway.

Cheers
Danny