How to hangup without "answer" for pstn?

System environment: asterisk 1.6 + x100p

Following context works fine.
[from-pstn]
exten => s,1,Playback(vm-goodbye)
exten => s,2,Hangup()

After 2 rings, I hear goodbye voice, and then auto hangup.

However, if I use following context setting
[from-pstn]
exten => s,1,Hangup()

It keeps ringing and can’t hangup. How to hangup without “answer” for pstn? Thanks.

Taking a stab here…you can’t hang up what you haven’t answered?

try…

[from-pstn]
exten => s,1,Answer()
exten => s,n,Hangup()

in your first example the playback command is issuing an answer since the line wasn’t already answered.

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.

Try going to a non-existent priority:

[from-pstn] exten => s,1,Goto(99999)

I just tried goto(99999), same problem: keep ringing. please take a look at following asterisk console output, it looks that asterisk keeps trying to hangup, but failed.

Aghhhh, another case where the docs are out of sync:

Try adding

to your dialplan

[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).

“exten => h,1,Noop” is added, same problem. :frowning: Is there any configuration missing in chan_dahdi.conf file?

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.)

Thanks. If I use GSM card with GSM gateway instead of FXO line, can it support “refuse call without answering” feature with asterisk?