I would like to search a SQL DB in my IPCCX script so that it will do the following:
Get calling ANI in a variable. Parse the ANI so as to include "-" like this: '520-295-1111'
Then, run a SQL query and against stored ANI in new format to find a matching record against the table.
SQL query: select locationid from locations where phone = 'callingANI' (this is the calling ANI obtained earlier but don't know how to pass an IPCCX variable to the SQL query..)
If there's a match, grab the "LocationID" vlue for the matching number, place it in a variable.
Send a CTI screen popup using the following HTTP page on the connected agent computer:
the LocationID of 9846 would have been the value learned from the matching calling ANI...
so, high level: get ANI, Parse ANI, querey SQL column against ANI, store "locationID" value if there's a match. send http open to client containing the URL which references the value found from the LocationID...