Hangup does not work on my Asterisk 16.24.1

The problem is that the automatic hangup is not working in my voicemail, I have configured for the voicemail the following dialplan in the extensions.conf file:

    exten => _C001XXX1.,1,NoOp(Incoming call to: ${EXTEN}@${CONTEXT} from ${CALLERID(num)})
    same => n,Set(HOSTNAME=${SHELL(hostname)})
    same => n,Log(NOTICE, --- Call Information ---)
    same => n,Log(NOTICE, Call from: ${CALLERID(num)})
    same => n,Log(NOTICE, Call to: ${EXTEN})
    same => n,Log(NOTICE, Context: ${CONTEXT})
    same => n,Log(NOTICE, Channel: ${CHANNEL})
    same => n,Log(NOTICE, --- End of Call Information ---)
    same => n,Log(NOTICE, --- Statis Ended ---)
    same => n,NoOp(Stasis status: ${STASISSTATUS})
    same => n,NoOp(Channel state: ${CHANNEL(state)})
    same => n,GotoIf($["${STASISSTATUS}" = "FAILED"]?stasis_error:continuedialplan)

    same => n(stasis_error),NoOp(Error stasis status: ${STASISSTATUS})
    same => n,Log(ERROR,Error stasis status: ${STASISSTATUS} - ${EXTEN}@${CONTEXT} - ${CALLERID(num)})

    same => n(continuedialplan),NoOp(Exit from stasis, continue with Dialplan)
    same => n,NoOp(Channel status: ${CHANNEL(state)})
    same => n,GotoIf($["${CHANNEL(state)}" = "Ring"]?call_not_answered)
    same => n,GotoIf($["${CHANNEL(state)}" != "Up"]?call_ended:call_still_active)

    same => n(call_not_answered),NoOp(Call not answered)
    same => n(call_still_active),NoOp(Call still active)
    same => n,Hangup()

    same => n(call_ended),NoOp(Call hangup inside stasis)
    same => n,Set(CAUSE=${HANGUPCAUSE})
    same => n,NoOp(Hangup cause: ${CAUSE})
    same => n,GotoIf($[${CAUSE} == 16]?normal_clear:other_cause)

    same => n(normal_clear),NoOp(Call normal clearing)
    same => n,Hangup()

    same => n(other_cause),NoOp(Call hangup cause ${CAUSE})
    same => n,Hangup()

Do you know where else I can check why the hangup is not working?

What does “automatic hangup” mean exactly? As well, did you remove lines from your dialplan because it doesn’t really seem to… do… anything.

You should also provide console output showing a log, and explain how calls are received.

On Friday 07 February 2025 at 15:29:17, JonathanJimenezP via Asterisk
Community wrote:

The problem is that the automatic hangup is not working in my voicemail, I
have configured for the voicemail the following dialplan in the
extensions.conf file:

I’m puzzled. I see no call to Voicemail() in that dialplan.

Also, I see several Hangup() calls, so please show us the verbose log output
of the one which does not work, showing what the system does instead.

Hint: it is always a good idea, instead of simply saying “X is not working”,
to say “when I try to do X, I expect the following to happen, but instead this
is what happens” so that we have both an idea of what you were expecting to
see (in case that is incorrect) and also an accurate report of what actually
did happen (so we can try to understand / explain it).

Antony.


What do you get when you cross a joke with a rhetorical question?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.