Limit outbound call duration including ringing time

Hello Guys,

I have inbound calls that reach agents and then connect caller to third party number, after certain amount of time I need to stop this call due to legal rule but also playback a warning message 1 minute before the end.

In order to achieve it I’m using Dial with LIMIT option to announce a message to both parties 1 minute before prior hanging up and also a message at the end.

I’ve observed that Limit option doesn’t include ringing time which is painful for me as I need to stop the whole call duration to an exact time (in second) and playback a prompt 1 minute before the end. I saw that there is also ABSOLUTETIMEOUT command that redirect to T extension but only playback message to calling party and not to both at call end which is not exactly what I need.

Any ideas will be appreciated ?

Thanks

If you dialed a Local channel that answered immediately and then did a Dial() in itself you could set a timeout and warning on the first Dial and have it work as you expect. Even when ringing the timer would still be ticking down since to the first Dial it would be answered.

1 Like

Hi Joshua,

I tried what you told me and it worked, thanks for the advice and have a nice day !

Best Regards

By doing it I’m losing the original duration of ${CDR(billsec)} as it’s considered as a new call leg by Asterisk. Do you have any way to keep the original ${CDR(billsec)} across new call leg.

Best Regards

No, as they are different legs you would need to do reconcillation yourself afterwards.

the fact is that I need to check it on live to limit call duration, I was thinking to use DB variable to decrease remaining time.

You would need to use something like AMI to monitor the calls. Asterisk itself cannot change call time limits after the call has started.