Asterisk expert needed

hi : i already have asterisk installed , i configured bluetooth to work with asterisk so i can generate calls through my mobile passing asterisk , now what i need to be done , is that i need asterisk to limit the sum of calls duration per mobile/bluetooth adapter to 60 min a day , and by calculating based on 60/60 minute increment ,that means if one call duration is 1:30 min ,it will written in sql as 2 min and when sum duration reaches 60 min i need asterisk to disconnect the call ,obviously here we have to create cdrs table in mysql and link to asterisk so all calls data will be saved and retrieved from database .
waiting some one to give me his offer ,thanks.

Use the L option on Dial. The rest is just a SMOP (small matter of programming).

The normal variation on this, for which there is no simple solution, is where the same account can make concurrent calls, as it is only easy to work out the remaining balance at the start of a call.

1 Like

thanks for your reply :
my purpose is to send 1 single call per one bluetooth adapter , so remaining duration will be linked to name of adapter.