« Back to TCL-API

RE: sample tcl look into DB or txt file

Combination View Flat View Tree View
Threads [ Previous | Next ]
Hello Everyone,
 
Is there anyone who have or know sample tcl which will parse txt file or look into mysql and if match DID doing hangup call? I would appreciate any help so I can modify to my needs.
 
Best Regards

I don't think there's a DB capability builtin but what you could do is build a web services application in php/aspx,etc to do the db lookup and any logic you want to implement. you can return a simple 0 or 1 as result.
To make calls from your TCL script to this service, you'd use httpios::geturl procedure, passing in the DID you want to compare in a query string. the results of the call will determine if you want to hang up or proceed.

We are looking for a small, transient database of incoming caller phone numbers, so to detect if a caller has called back within a rolling 60 miniute cycle. Based on what is described so far, is there a simple provision within the language to Write caller id to a small flat file, along with Timestamp, and retrieve that list in a cyclical fashion?

standard Tcl "file" and "clock" command can still be used in Cisco Tcl IVR API, so I think you should be able to do that. Just you need to watch the performance i.e. how frequent you want to write the file