Task #180
openPrepare lua extensions
0%
Description
Please prepare asterisk lua extensions with basic functionality. Create switch besip, which will be called for all calls.
This script should do at first:
- Look into sqlite3, if calling user/number is local user (if call is originated from us)
- If destination is local
- Look into db for user parameters (please prepare function getuserparms() for it)
- Look into db for line parameters (please prepare function getlineparms() for it)
- If needed from user or line parameters, do or not this:
- enable debug
- enable call quality monitoring (tcpdump)
- look into local tariftable, if given user can call this number
- if so, get price for this direction (getprice(user,src,dst)
- compute maximum number of seconds to call (credit/price)
- set maximum call length
- after call, update credit and quality monitoring