[asterisk-users] HELP! AGI AUTOHANGUP does not seem to hangup the channel.
lardconcepts at gmail.com
Wed May 26 11:22:25 CDT 2021
"Cause the channel to automatically hangup at time seconds in the future"
SET AUTOHANGUP TIME
Looks great. Except... it doesn't. It just causes AGI to send "HANGUP"
and any audio to stop playing.
It does NOT hangup the channel, or even send any SIP event. The line
just goes silent.
It's been an entire afternoon of profuse googling; I have tried adding
and removing hangup handlers, I have even tried setting the
AGIEXITONHANGUP flag to "1" as per
But this is all that happens (5 seconds is ridiculous, it's just to
test). This is with "pjsip set logger on"
AGI Rx << SET AUTOHANGUP 5
AGI Tx >> 200 result=0
AGI Rx << SET VARIABLE AGIEXITONHANGUP "1"
AGI Tx >> 200 result=1
AGI Tx >> HANGUP <<
AGI Rx << HANGUP
AGI Tx >> 511 Command Not Permitted on a dead channel or intercept routine
basically, the next log event is whenever the next REGISTER would
And of course, if I try and respond to the AGI again, it tells me the
channel is dead. So WHY is the "hangup" event not sent to the phone?
I cannot use other methods like setting the absolute channel timeout
variable, or using a local "dial" with a timeout message because:
1: the system tests whether the next file will push the listener over
the 1 hour limit for included calls in UK packages, so the autohangup
value has to be dynamic
2: It has to be over-ridable so that the listener can continue past the hour
3: The message that plays out is dynamically generated
Everything about it works fine... except the fact that it doesn't
Which leaves the possibility that an old person might fall asleep and
end up with a large bill, which we don't want!
More information about the asterisk-users