sample tcl look into DB or txt file

Version 1
    This document was generated from CDN thread

    Created by: Renata Krstanovic on 27-03-2012 06:34:52 PM
    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

    Subject: RE: sample tcl look into DB or txt file
    Replied by: Chris Manuh on 28-03-2012 01:38:01 PM
    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.

    Subject: RE: sample tcl look into DB or txt file
    Replied by: Yaw-Ming Chen on 15-05-2012 11:58:19 AM
    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

    Subject: RE: sample tcl look into DB or txt file
    Replied by: Alfred Sette on 15-05-2012 11:34:20 AM
    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?