Incoming call feature

Hi there,

here is my rather simple question:

How do I ensure that incoming calls are rejected immediately so that

  • the caller (via mobile network) only hears a busy/congestion signal generated by the network operator or someone along the line but definitely not from Asterisk (as otherwise the call wouldn’t be free for the caller)

To see what kind of user experience I am talking about please dial +27879407450 (call not charged although you require funds on your phone) from your cell phone. While you will get a ussd message in this instance our setup would send a standard sms message to the caller.

Many thanks in advance!


After making sure that you are connected to the PSTN over a network that supports such cause codes and the usage is acceptable to the network operator, use Hangup() with an appropriate cause code. This will not work on POTS analogue lines, as they must be answered before the call can be cleared.

The documentation for Hangup lists some of the more common cause codes.

This should have been asked on a support forum.

Our setup is using a hosted virtual machine with Asterisk 1.6 on the one side and mobile phone callers via various mobile networks on the other side. There is no PSTN involved, the call goes via the mobile network operator’s switch to his SIP gateway, from there to our DID (Virtual local number, Cape Town , South AFrica) service provider’ sip gateway and then to our Asterisk. Everything is connected via internet.

I will see how to modify the cause code as explained by you. In which Asterisk file do I do this?