Jonathan H
2021-May-26 16:57 UTC
[asterisk-users] HELP! AGI AUTOHANGUP does not seem to hangup the channel.
I have also tried configuring pjsip wizard like this. endpoint/rtp_timeout=5 And I see this shortly after the "hangup" command has been sent, so that part is working: [May 26 17:36:37] NOTICE[1276]: res_pjsip_sdp_rtp.c:150 rtp_check_timeout: Disconnecting channel 'PJSIP/fromvoipfone-206-0000000b' for lack of audio RTP activity in 5 seconds But, again, it doesn't disconnect. The line stays open. And yes, my fallthrough after agi is same => n, Hangup() Also, apparently I now have a load of channels, which won't even hangup with channel request hangup all Requested Hangup on channel 'PJSIP/fromvoipfone-206-0000000b' Requested Hangup on channel 'PJSIP/fromvoipfone-206-0000000a' Requested Hangup on channel 'PJSIP/fromvoipfone-206-00000009' ...and wait.. and then... Channel Location State Application(Data) PJSIP/fromvoipfone-2 s at test:2 Up AGI(agi://localhost:3456) PJSIP/fromvoipfone-2 s at test:2 Up AGI(agi://localhost:3456) PJSIP/fromvoipfone-2 s at test:2 Up AGI(agi://localhost:3456) 3 active channels 3 active calls So they just won't die. Asterisk 18.4.0 - worth filing a bug? On Wed, 26 May 2021 at 17:22, Jonathan H <lardconcepts at gmail.com> wrote:> > https://wiki.asterisk.org/wiki/display/AST/Asterisk+18+AGICommand_set+autohangup > > "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 > https://wiki.asterisk.org/wiki/display/AST/Asterisk+Standard+Channel+Variables > > 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 > normally happen. > > 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 > actually hangup. > Which leaves the possibility that an old person might fall asleep and > end up with a large bill, which we don't want!
Joshua C. Colp
2021-May-26 16:59 UTC
[asterisk-users] HELP! AGI AUTOHANGUP does not seem to hangup the channel.
On Wed, May 26, 2021 at 1:58 PM Jonathan H <lardconcepts at gmail.com> wrote:> I have also tried configuring pjsip wizard like this. > > endpoint/rtp_timeout=5 > > And I see this shortly after the "hangup" command has been sent, so > that part is working: > > [May 26 17:36:37] NOTICE[1276]: res_pjsip_sdp_rtp.c:150 > rtp_check_timeout: Disconnecting channel > 'PJSIP/fromvoipfone-206-0000000b' for lack of audio RTP activity in 5 > seconds > > But, again, it doesn't disconnect. The line stays open. And yes, my > fallthrough after agi is > > same => n, Hangup() > > Also, apparently I now have a load of channels, which won't even hangup > with > > channel request hangup all > > Requested Hangup on channel 'PJSIP/fromvoipfone-206-0000000b' > Requested Hangup on channel 'PJSIP/fromvoipfone-206-0000000a' > Requested Hangup on channel 'PJSIP/fromvoipfone-206-00000009' > > ...and wait.. and then... > > Channel Location State Application(Data) > PJSIP/fromvoipfone-2 s at test:2 Up > AGI(agi://localhost:3456) > PJSIP/fromvoipfone-2 s at test:2 Up > AGI(agi://localhost:3456) > PJSIP/fromvoipfone-2 s at test:2 Up > AGI(agi://localhost:3456) > 3 active channels > 3 active calls > > So they just won't die. > > Asterisk 18.4.0 - worth filing a bug? >Is your AGI closing the connection or are you expecting Asterisk to drop it? (I'm not that familiar with FastAGI or AGI these days, just wondering what happens if you drop the connection) -- Joshua C. Colp Asterisk Technical Lead Sangoma Technologies Check us out at www.sangoma.com and www.asterisk.org -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20210526/b5a9a406/attachment.html>