Hi,
I am trying to verify caller id against the MySQL database when making a call to : _+44161XXXXXXX
I am using : FreePBX 2.11.0.3 and Asterisk 11.8.1
I tried using SmartRoutes and Dynamic Routes without success - all calls are getting rejected with the default IVR so now I am trying the hard way.
- Verify Caller ID
My plan is to use my php script to connect with mysql database on localhost check if I have stored the ${CALLERID(num)}) there, if not - do not connect the call - play busy tone ( i do not want the customer to be charged for the call that’s why I do not want to answer it in the system)
Fro what I googled I should edit extensions_custom.conf
[from-trunk-noanswer]
exten => _+44161XXXXXXX,1,noop(Incoming call to from-trunk-noanswer context)
exten => system(/myscripts/myfile.php ${CALLERID(num)}))
exten => s,n,Busy(10)
It seems not to work for me and also I do not know yet what to put in my php file to return to asterisk if the CLI was found and I want to divert the call to IVR.
- Have a special dedicated number which I can ask customer to call to add his Caller Id to the database ( calling php script first - not answering but rejecting the call after 5 rings)
I am not so good with dialplans / Freepbx / Asterisk logic so any help will be appreciated.