# MS SQL SERVER With Asterisk

**URL:** <https://community.asterisk.org/t/ms-sql-server-with-asterisk/12252>\
**Category:** Asterisk Support\
**Created:** [February 8, 2007, 10:01am UTC](https://community.asterisk.org/t/ms-sql-server-with-asterisk/12252 "2007-02-08T10:01:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![naveed\_khan](https://avatars.discourse-cdn.com/v4/letter/n/e47c2d/32.png) [@naveed\_khan](https://community.asterisk.org/u/naveed_khan)\
**Post date:** [February 8, 2007, 10:01am UTC](https://community.asterisk.org/t/ms-sql-server-with-asterisk/12252/1 "2007-02-08T10:01:00Z")

</div>

Hi Guys

I am developing VRU in Asterisk and I need to use the SQL SERVER 2000 database hosted on another server.

Is there any way to connect Asterisk with Ms SqlServer using AGI?

Thanks In Advance

---

<div class="post-metadata">

**Author:** ![baconbuttie](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/baconbuttie/32/916_2.png) [@baconbuttie](https://community.asterisk.org/u/baconbuttie)\
**Post date:** [February 8, 2007, 10:18am UTC](https://community.asterisk.org/t/ms-sql-server-with-asterisk/12252/2 "2007-02-08T10:18:27Z")

</div>

if you’re using AGI, there is no link between Asterisk and the db backend … it’s a function of the engine you’re using. what are you using ?

---

<div class="post-metadata">

**Author:** ![naveed\_khan](https://avatars.discourse-cdn.com/v4/letter/n/e47c2d/32.png) [@naveed\_khan](https://community.asterisk.org/u/naveed_khan)\
**Post date:** [February 8, 2007, 10:47am UTC](https://community.asterisk.org/t/ms-sql-server-with-asterisk/12252/3 "2007-02-08T10:47:02Z")

</div>

I didn’t get your question.

I just want to get values from SQLSERVER during a call (VRU Call)…  
How I can do this?

---

<div class="post-metadata">

**Author:** ![baconbuttie](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/baconbuttie/32/916_2.png) [@baconbuttie](https://community.asterisk.org/u/baconbuttie)\
**Post date:** [February 8, 2007, 10:59am UTC](https://community.asterisk.org/t/ms-sql-server-with-asterisk/12252/4 "2007-02-08T10:59:07Z")

</div>

what platform are you developing this AGI script in ? that’s where you need to look for db-integration modules/add-ons etc … not in Asterisk itself.

if you’re using Perl, you need Perl modules to talk to ODBC, if PHP, then PHP modules to talk ODBC … as well as having the appropriate ODBC install on the machine in the first place.

---

<div class="post-metadata">

**Author:** ![naveed\_khan](https://avatars.discourse-cdn.com/v4/letter/n/e47c2d/32.png) [@naveed\_khan](https://community.asterisk.org/u/naveed_khan)\
**Post date:** [February 8, 2007, 11:04am UTC](https://community.asterisk.org/t/ms-sql-server-with-asterisk/12252/5 "2007-02-08T11:04:06Z")

</div>

Well I am Using Perl …  
I was looking at  
[sqlservercentral.com/columni … 32odbc.asp](http://www.sqlservercentral.com/columnists/bkelley/connectingtosqlserverusingperlwin32odbc.asp)

here we have  
three typical methods used to connect to SQL Server from Perl:

```
* Through Win32::ODBC
* Through ADO (ActiveX Data Objects) using Win32::OLE
* Through Perl DBI (the standard database interface for Perl)

```

Right now I am looking into DBI… If it communicate with Sql Server then It is kool…

If you have any further suggestions please write…

Thanks for your help…
