Hangup not working

Dear All,
I am running Asterisk, I am trying to make a very simple script for saying “Hello World” then hangup, it able to say “Hello World” but it does not hanging up…

what I missed?

exten => 100,1,Answer()
exten => 100,n,Playback(hello-world)
exten => 100,n,Wait(1)
exten => 100,n,Hangup()

coudl anybody please help?

Can you please provide a protocol trace proving that it is not hanging up (e.g. no BYE for SIP or line loop not removed for analogue).

If the call is coming from a PSTN line it would be normal for the network to not release the call for several minutes. You would need to talk to your service provide about this. This is done so that the callee can hang up one phone and re-answer on a more appropriate one.

the call is not from PSTN, I just press 100
how to trace the protocol ?

[root@sip fw_fop]# asterisk -rvvvvv
Asterisk, Copyright (C) 1999 - 2011 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
  == Parsing '/etc/asterisk/asterisk.conf':   == Found
  == Parsing '/etc/asterisk/extconfig.conf':   == Found
Connected to Asterisk currently running on sip (pid = 24579)
Verbosity is at least 5
  == Using SIP RTP TOS bits 184
  == Using SIP RTP CoS mark 5
    -- Executing [100@from-internal:1] Answer("SIP/212-00000002", "") in new stack
    -- Executing [100@from-internal:2] Playback("SIP/212-00000002", "hello-world") in new stack
    -- <SIP/212-00000002> Playing 'hello-world.gsm' (language 'en')
    -- Executing [100@from-internal:3] Wait("SIP/212-00000002", "1") in new stack
    -- Executing [100@from-internal:4] Hangup("SIP/212-00000002", "") in new stack
  == Spawn extension (from-internal, 100, 4) exited non-zero on 'SIP/212-00000002'
    -- Executing [h@from-internal:1] Hangup("SIP/212-00000002", "") in new stack
  == Spawn extension (from-internal, h, 1) exited non-zero on 'SIP/212-00000002'

You will have to ask your telephone network operator if they are prepared to sell you a line with either party clearing. They may not offer one and they may only offer them on lines intended for PABX use.

The Asterisk CLI output shows that the call is hanged up just fine.

Copy paste the output of the Asterisk CLI command “sip set debug on”.