Page 1 of 1

Set a MAX call duration

PostPosted: Wed May 23, 2018 3:54 pm
by vkad
I just realised today that we were spending $10-$20 a day on calls that were lasting nearly 10-20 hours.

I don't know why that is happening, but I want to set a cap of 3600 seconds on call duration....How can I do that?

Thanks

Re: Set a MAX call duration

PostPosted: Wed May 23, 2018 5:34 pm
by blackbird2306
There is a TIMEOUT(absolute) function in asterisk, which you can use in your dialplan to limit the duration of all calls.
Try something like this (add 2nd. line) only as an example:
Code: Select all
exten => _91999NXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _91999NXXXXXX,2,Set(TIMEOUT(absolute)=3600)
exten => _91999NXXXXXX,3,Dial(${TESTSIPTRUNK}/${EXTEN:2},,To)
exten => _91999NXXXXXX,4,Hangup