Tim King
2005-Sep-22 09:52 UTC
[Asterisk-Users] AGI Script to interact with ACCESS Databse and Set CID info on the fly.
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. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20050922/e44c9fff/attachment.htm
Paul
2005-Sep-22 10:06 UTC
[Asterisk-Users] AGI Script to interact with ACCESS Databse and Set CID info on the fly.
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.
Tom Hayden
2005-Sep-22 10:14 UTC
[Asterisk-Users] AGI Script to interact with ACCESS Databse and Set CID info on the fly.
If you used a perl or PHP agi script, you could probably use some kind of ODBC drivers to communicate between the two. -- Tom Hayden On 9/22/05, Tim King <tim@compnetwork.net> 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. > _______________________________________________ > --Bandwidth and Colocation sponsored by Easynews.com -- > > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users > To UNSUBSCRIBE or update options visit: > > http://lists.digium.com/mailman/listinfo/asterisk-users > >-- Tom
pbx@itsngroup.com
2005-Sep-22 10:15 UTC
[Asterisk-Users] AGI Script to interact with ACCESS Databse and Set CID info on the fly.
ACCESS supports ODBC driven connections..> 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> 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. >