anarkhos at vfemail.net
2007-Aug-13 03:53 UTC
[asterisk-users] Can't HANGUP call or channel on 1.4.9
I've isolated this problem the furthest that I can, and I'm now convinced this is a bug in asterisk. I have a context in extensions.conf like so: [my_context] exten => _X.,1,AGI(my_agi|${EXTEN}|${CHANNEL}) exten => _X.,2,GOTO(my_other_context|${EXTEN}|1) exten => h,1,DeadAGI(my_agi_cleanup) For the purposes of this scenario, my_agi simply will try to HANGUP the channel to avoid the call going to priority 2 and instead go to my_agi_cleanup. Try as I might, I cannot hang up the channel from within the agi! I originate the channel thusly: CLI> originate SIP/50 extension 46 at my_context I have agi debug turned on etc. I pick up the call, my_agi is called with the correct parameters. my_agi writes EXEC HANGUP and sleeps for 10 seconds. Asterisk responds 200 result=-1. The phone is still on the line. my_agi writes EXEC HANGUP SIP/50-12345 (whatever channel it's given) and sleeps for 10 seconds. Asterisk responds 200 result=-1. The phone is still on the line. When the script exits, asterisk goes to the second priority which goes to my_other_context. This shouldn't happen! I try writing a GOTO h|1 in my_agi after my two HANGUP commands. Asterisk responds 200 result=0. This does go to h|1, but the channel doesn't hang up until my_agi_cleanup exits. This is a possible ugly work-around if no other solution can be found. I try putting a HANGUP() as the second priority and moving the GOTO to the third. This does hangup the channel and goes to the 'h' priority, but defeats the whole purpose of priorities. If I do a soft hangup SIP/50-12345 in the console while my_agi sleeping (copying the channel from the HANGUP command feedback from agi debug), the correct thing happens. The channel is hung up and it avoids priority 2. Why soft hangup works, HANGUP() as a priotity works, and HANGUP or HANGUP <chan> within the AGI doesn't work is beyond me. Asterisk reports the correct arguments are passed and so on. I also tried dialing into the context via a GOTO from a DID extension. The same problem manifests itself with the only change being the channel is a IAX2 trunk instead of a SIP phone.
Steve / Eric When configuring the queue I tested works fine but one issue. My agent auto logs off after I am done with the call. I tried ignoring that option in agents.conf no luck....Also the below with the Answer line does not work either...still stays on and ring about 1:15 secs then goes to voicemail.... Otis Eric "ManxPower" Wieling wrote:> Steve Totaro wrote: > >> Steve Totaro wrote: >> >>> Eric "ManxPower" Wieling wrote: >>> >>> >>>> Steve Totaro wrote: >>>> >>>> >>>> >>>>> OCOSA ListAcct wrote: >>>>> >>>>> >>>>> >>>>>> I apologize if this question has already been answered / asked. I was >>>>>> searching on Google and nothing I do will work. All that happens is that >>>>>> the phones ring for 00:01:15 then voicemail kicks in. >>>>>> >>>>>> My goal here is to let the phones ring and ring until someone is not >>>>>> busy. I think 20000 secs is long enough. >>>>>> >>>>>> Here is how the dial plan is setup >>>>>> >>>>>> exten=>5,1,StartMusicOnHold >>>>>> exten=>5,2,Dial(SIP/support&SIP/support2,20000,tr) >>>>>> exten=>5,3,VoiceMail(455 at mailbox) >>>>>> exten=>5,4,PlayBack(vm-goodbye) >>>>>> exten=>5,5,HangUp() >>>>>> exten=>1222,1,VoiceMailMain(455 at mailbox) >>>>>> >>>>>> Any help is appreciated.... >>>>>> >>>>>> Otis >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>> Easiest way to solve your problem is to implement a support queue. >>>>> >>>>> >>>>> >>>> Queues in Asterisk are horrid little creatures. >>>> >>>> Many SIP phones and ITSPs will disconnect the call if the destination >>>> rings for a long time. >>>> >>>> Put an Answer as your first priority, this should fix your problem. >>>> >>>> >>>> >>>> >>> That is an odd statement about queues. I ran a call center handling >>> over 15,000 calls a day using Asterisk and queues. No real problems. >>> >>> Please qualify your completely abstract statement, "Queues in Asterisk >>> are horrid little creatures." Statements like this are completely non >>> productive to anyone. >>> >>> Thanks, >>> Steve >>> >>> >>> >> Sorry to reply to my own post but for clarification, we had four >> queues. English sales, English support, Spanish sales, Spanish Support. >> >> At peek times, we would have 200-300 agents logged in and 600 or so >> callers. This was usually when our ads were running during Jerry >> Springer or Judge Judy. >> >> I think his two agent single queue would work just fine. Add >> Queuemetrics which is free (I believe) for five or less agents and then >> you can actually get some reporting on how your support role is handled. >> > >> In your situation it seems that queues work well for you. When you have > dedicated agents answering calls full time queues work well. > > In non-call shops people forget to log out of the queue, are away from > their desk often, and otherwise just screw up many of the assumptions > that the Asterisk queue system makes. This is in addition to the > learning curve. > > For a low number of calls and/or non-dedicated agents, a little bit of > dialplan logic can do everything someone needs with something that is > massively more flexible. > > > > _______________________________________________ > --Bandwidth and Colocation Provided by http://www.api-digital.com-- > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >