[asterisk-users] How to detect long calls

Manrique Feoli manrique.feoli at kinetos.com
Tue Jan 16 13:11:22 MST 2007


I had the same problem last year,  at the time for some reason Timeout 
instruction wouldn't trigger,  so,  just to be sure not to have to pay 
for another longdistance call,  I did the following,  (following 
someone's advise in here)

/usr/sbin/asterisk -rx "show channels concise" |awk -F : '($11 > 1500) 
{print "/usr/sbin/asterisk -rx \"soft hangup " $1 "\""} '|sh

this will hangup any call longer than 1500 seconds,     or what ever 
value you choose

hope it helps you somehow


;-)

Manrique




Cullin J. Wible escribió:
> You should:
>
> Set(TIMEOUT(absolute)=14400)
>
> When the call is received - this will set the maximum limit of a call and
> asterisk will force hang-up when the limit is reached.
>
> 14400 seconds = 4 hours, which for our purposes is longer then any call we
> expect. Even if you double-it or set it to several days some limit is better
> then nothing.
>
> When we found the same problem we had a call that was stuck open for 20
> days. The call was stuck in a conference and was sending the on-hold music,
> which is what kept it open.
>
> Hope that helps.
>
> Cullin J. Wible
>
> -----Original Message-----
> From: asterisk-users-bounces at lists.digium.com
> [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of yusuf
> Sent: Tuesday, January 16, 2007 12:51 PM
> To: Asterisk Users Mailing List - Non-Commercial Discussion
> Subject: Re: [asterisk-users] How to detect long calls
>
> Savoy, Kevin - Williston, ND wrote:
>   
>> We have been running an Asterisk box with 1.2.9.1 on it since August 
>> in a call center environment. We use the Asterisk box as an IVR and 
>> then pass the calls on to a Nortel Option 11C. Today we found in our 
>> long distance bill two calls that lasted a VERY long time. One was 58 
>> hours and another was 38 DAYS!!!
>>
>>  
>>
>> Nortel does not show this call being that long. Obviously the person 
>> that called in didn't hold the line for 58 days so somehow between 
>> Asterisk and MCI the call got stuck open and didn't hang up on the
>>     
> network.
>   
>>  
>>
>> My question is two parts, part one, has anyone heard of anything like 
>> this where a call doesn't hang up properly and seems "stuck" in the 
>> system. Part two is there anyway to monitor in Asterisk the length of 
>> all active calls and then if a call lasts longer then, say one hour, 
>> we could send off a text message or warning.
>>
>>
>>     
> Hi ,
>
> similiar thing happend to me.  Try looking at the L() optin in Dial.  I
> define a max call time, say few hours, then warn every x seconds, then cut
> the call.
>
> --
> thanks,
> Yusuf
>
> --
> This message has been scanned for viruses and dangerous content by
> MailScanner, and is believed to be clean.
>
>
>   

-- 
**********************************
Manrique Feoli
R & D Director
manrique.feoli at kinetos.com
Kínetos Software
www.kinetos.com
408-538-2113
**********************************




More information about the asterisk-users mailing list