Asterisk dialplan to block calls
Budget: $30 – $250 USD
We need an Asterisk 11 dialplan context that:
1. Executes when dialing any number from the extension 1005 and also from extensions 1070 through 1078 and 1081 through 1089
2. Blocks the call and plays the "number-not-in-service" playback file if the number dialed by the extensions above is equal to the result of the query "SELECT mobile FROM vtiger_contactdetails WHERE firstname REGEXP '^[0-9]+$' and mobile = ${EXTEN: -8}". The query is done to a localhost MySQL database
1. Executes when dialing any number from the extension 1005 and also from extensions 1070 through 1078 and 1081 through 1089
2. Blocks the call and plays the "number-not-in-service" playback file if the number dialed by the extensions above is equal to the result of the query "SELECT mobile FROM vtiger_contactdetails WHERE firstname REGEXP '^[0-9]+$' and mobile = ${EXTEN: -8}". The query is done to a localhost MySQL database