My Asterisk gets an ARI request to make a call, but I want limit max call length based on account balance of user (user name will be in ARI request).
Need that Asterisk after receive an ARI request but before actually make a call, will go to database, based on user name get his account balance, based on account balance calculate max call length, set max call length for Dial application (by use parameters “S” or “L”) and eventually make a call.
Do not realized where this additional layer (simple billing) should be added. Is this should be in Stasis or in dialplan?
Thanks in advance.