[quote=“totogogo”]Actually what I want to implement is not “answer”, just “hangup” directly. What I mean is that when a call is incoming, asterisk “hangup/disconnect” it directly.
How to implement it? Thanks.[/quote]
This is impossible on FXO lines. Hangup is done by going from a low DC resistance to a high one. Going the other way answer the call. I don’t know if there is a refuse protocol for common channel digital signalling (for which you will need digital presentation).
This is a limitation of FXO lines, not of Asterisk.
What is the real world problem you are trying to solve by attempting to refuse a call without answering it?
(Incidentally, for many FXO lines, particularly domestic ones, even hanging up after answering will not release the line for several minutes - to allow the call to be picked up on another phone connected to the same line.)