Page 1 of 1

How to limit the call duration

PostPosted: Mon Oct 18, 2010 11:20 pm
by marzo
I have a vicidial server with:
install from scratch | Vicidial VERSION: 2.2.1-237 BUILD: 100510-2015 | Asterisk 1.2.30.2 | Single Server | Yeastar TDM800 | No Extra Software After Installation|kernel 2.6.18-194.11.4.el5

I need to limit the call duration of certain call to five minutes. I am using the following in carrier configuration:
; Marcacion a extensiones del IPPBX
exten => _94ZXX,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _94ZXX,2,Dial(${TSIPFRONT}/${EXTEN:1},55,To,L(300000))
exten => _94ZXX,3,Hangup

This is what cli shows:
[Oct 18 23:06:28] -- Executing MeetMe("Local/8600051@default-6bfa,2", "8600051|F") in new stack
[Oct 18 23:06:28] > Channel Local/8600051@default-6bfa,1 was answered.
[Oct 18 23:06:28] -- Executing AGI("Local/8600051@default-6bfa,1", "agi://127.0.0.1:4577/call_log") in new stack
[Oct 18 23:06:28] -- AGI Script agi://127.0.0.1:4577/call_log completed, returning 0
[Oct 18 23:06:28] -- Executing Dial("Local/8600051@default-6bfa,1", "SIP/ccfront/4107|55|To|L(30000)") in new stack
[Oct 18 23:06:28] -- Called ccfront/4107
[Oct 18 23:06:28] -- SIP/ccfront-099e07f8 is ringing
[Oct 18 23:06:28] -- SIP/ccfront-099e07f8 is ringing
[Oct 18 23:06:38] -- SIP/ccfront-099e07f8 answered Local/8600051@default-6bfa,1

But the call does not end after five minutes.

Any help will be appreciate

thanks

PostPosted: Tue Oct 19, 2010 7:47 am
by brett05
try this

exten => _94ZXX,1,Set(TIMEOUT(absolute)=3600) # 3600 second
exten => _94ZXX,n,AGI(agi://127.0.0.1:4577/call_log)
exten => _94ZXX,n,Dial(${TSIPFRONT}/${EXTEN:1},55,tToR)
exten => _94ZXX,n,Hangup

PostPosted: Thu Oct 21, 2010 10:27 am
by marzo
It works great !
Thank you !

PostPosted: Fri Nov 19, 2010 12:21 pm
by marzo
This Set(TIMEOUT(absolute)=3600) applies over all calls in the Dialplan or only to the channel where is defined ?

Re: How to limit the call duration

PostPosted: Mon Oct 25, 2021 10:36 am
by Josiah2021
Thank you @brett05 I used your method and it did the magic!