[Asterisk-Users] AGI Script to interact with ACCESS Databse and Set CID info on the fly.

Paul digium-list at 9ux.com
Thu Sep 22 10:06:13 MST 2005


Tim King wrote:

> Well guys here comes the fun part. I have a Microsoft access (VBA) 
> application that interfaces with my SQL database. This app pulls of 
> info from the SQL record and than picks up the phone and dials that 
> locations number. I have purchased a few hundred NpaNxx’s for my own 
> use. I want get into too much detail there but no worries this is 
> legal. I need to change my CID info on the fly. So I am thinking it 
> should be easy to make an AGI script that just sets the CID info on a 
> particular line using two variables being passed to it $Line_No to 
> tell it what line to set and than $CID to be the number to set on that 
> extension for that call. It also should be relatively simple to have 
> the access app take a look at the area code and phone number for the 
> location being called and pull a phone number from the NUMBERS table 
> which has all of my numbers in it and pass that over. The real 
> question is how do we get Access to speak to an AGI script. Has anyone 
> done anything like this? Thanks a lot for reading but this will be a 
> fun one.
>
Use odbc to update a database on the same server the agi runs on. The 
agi script can get the latest data that way.

I did this before to export data from access to postgresql. It works.

I showed a customer how to do it. First he converted his vb programs so 
that all databases were on the postgre server. Then he wrote a php 
web-based app that replaced the vb app.

You can use something besides postgres if there is win odbc support for it.






More information about the asterisk-users mailing list