VoiceGuide IVR Software Main Page
Jump to content

Can Vg Announce The Current Ip Of My Internet Connection?

Recommended Posts

I would like to access the same database with VG and also througth the internet. The database is on my home PC that runs on Win XP and I use Apache webserver.

My IP dynamically changes.

Is it possible to send the current IP to VG? How? In this case, the caller could listen to the current IP address on the phone and connect to my pc through the internet by entering my IP in a web browser.

Share this post


Link to post

Guess from VG you could retrieve IP info from http://www.whatismyip.org/ or similar and play that over the phone.

 

Some examples of how to 'screen scrape' web pages are provided in Help file's entry on the Run VBScript module.

Share this post


Link to post

Yes. Thank you. But in this case I would depend on a third party's internet service. Can VoiceGuide directly retrieve my own IP from my computer with a VBscript modul.

When I type ipconfig in the DOS command promt I can see my IP address.

So if I could make a script in VG to capture this IP address info directly from my pc into a VG variable, I could announce it through another VG modul.

I just need this script sample.

Share this post


Link to post

A quick search on Google turned up the sample code below. We tried it and it does report the IP addresses on the system.

 

arAddresses = GetIPAddresses()

msgbox ubound(arAddresses)+1 & " IP Address(es) found"

for each ip in arAddresses

msgbox ip

next

 

 

Function GetIPAddresses()

'=====

' Returns array of IP Addresses as output by ipconfig or winipcfg...

'

' Note: The PPP Adapter (Dial Up Adapter) is

' excluded if not connected (IP address will be 0.0.0.0)

' and included if it is connected.

'=====

set sh = createobject("wscript.shell")

set fso = createobject("scripting.filesystemobject")

 

workfile = fso.gettempname

sh.run "%comspec% /c ipconfig > " & workfile,0,true

set sh = nothing

set ts = fso.opentextfile(workfile)

data = split(ts.readall,vbcrlf)

ts.close

set ts = nothing

fso.deletefile workfile

set fso = nothing

arIPAddress = array()

index = -1

for n = 0 to ubound(data)

if instr(data(n),"IP Address") then

parts = split(data(n),":")

if trim(parts(1)) <> "0.0.0.0" then

index = index + 1

ReDim Preserve arIPAddress(index)

arIPAddress(index)= trim(cstr(parts(1)))

end if

end if

next

GetIPAddresses = arIPAddress

End Function

Share this post


Link to post

Thank you for your help. It works.

 

Do you have a special depository on your web site where people can submit their VB scripts, snippets, VG designs and other solutions that they think can be useful for others?

That would be a great help for VG users and a good marketing tool for your business, too.

Share this post


Link to post

If you would like to submit a script we could add it to the Example Scripts section.

 

We would also accept scripts which are saved as Protected (.vgp) or are limited in some other way and other users after evaluating the solution could contact the script supplier to obtain the full working version or a version modified to suit their requirements.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×