VoiceGuide IVR Software Main Page
Jump to content

Database (Postgres)

Recommended Posts

I use other IVR platform and now try migrate to VG.

How to realize this kind of SQL query?

 

SELECT kol0{variable1}, reached_number{variable2}, pg_plik{variable3}, kol9{variable4}, placowka_id{variable5}

FROM wartosci_wyjsciowe

WHERE id=1

 

I want to use variable later as IVR parameter.

Share this post


Link to post

Do you want to have the returned data saved in variables that can then be used later on in the script?

 

This is done automatically by VoiceGuide. All data returned by database query is saved in 'Result Variables' and you can use them later on.

 

Please read section "Query Results" section of this help file page: http://www.voiceguide.com/vghelp/source/html/moddbquery.htm

 

 

If you want to have the SQL query modified based on selections made by caller then this van be done by using Result Variables in the SQL query expression. This is very similar to example you quote.

 

eg: if you have a Play module titled "AskForSelection" then key pressed by caller will be saved in $RV[AskForSelection].

And SQL query expression can then be:

 

SELECT column$RV[AskForSelection] FROM sometable WHERE id=1

 

Please see: http://www.voiceguide.com/vghelp/source/html/resultvariables.htm

Share this post


Link to post

How to connect to postgres database direct or with ODBC?

In each case how to fill Database Query Properties window (ODBC Data Source, Connect String)

 

 

My ODBC data source:

Data Source: manager

Database: manager5

SSL Mode: allow

Server: 192.168.0.10

Port: 5432

User Name: abc

Password: 123

Share this post


Link to post

Are you using v6 or v7 or VoiceGuide?

 

For v6 you just need to specify the ODBC data source, and then just specify that source name in the VoiceGuide module.

 

Please see:

 

http://www.voiceguide.com/vghelp/source/html/configodbcdatasource.htm

 

http://www.voiceguide.com/vghelp/source/html/moddbquery.htm

 

 

v7 uses ADO.NET, so if v7 is used you would need to use connect strings used by ADO.NET drivers.

Share this post


Link to post

I wrote:

 

Data Source: manager

Connect String:

Driver={PostgreSQL Unicode};Server=192.168.0.120;Port=5432;Database=manager5;User=abc;Password=123;

 

 

I don't see any information in log/0505tw.txt file about database connection.

Is possible to turn on trace database connection?

 

Or i should to look in other file searching information about database connection?

Share this post


Link to post

I use VG6 and have problem with connection with postgre SQL database.

 

Driver={PostgreSQL UNICODE}; Server=IP address; Port=5432; Database=myDataBase; Uid=myUsername; Pwd=myPassword;

 

returned fail answer.

 

I don't see any information in log files about database connection history, where can I find it?

Share this post


Link to post

Please post the log files capturing the database query module execution.

 

Please .ZIP up the logs before posting them.

 

(and if you like, change any passwords saved in connect string)

Share this post


Link to post

In v6: enable logging by setting the log levels to 10 in VG.INI as per below:

 

[Log]

VoiceGuide=10

NumberLoader=0

VoicemailManager=0

EmailSender=0

TapiWrapOcx=10

SapiWrapOcx=0

 

Then make a test call which demonstrates the problem.

 

Debug Trace files will be created in VG's \log\ subdirectory.

 

Please post the traces and the VoiceGuide script used.

 

When posting traces/scripts please .ZIP them up and post them as attachments..

Share this post


Link to post

Trace shows that the OpenDatabase comand returned error 3146

This means that the connection cannot be made.

This is usually cased by incorrect connection string.

 

Maybe try using

 

User ID

 

instead of

 

Uid

 

and use

 

password

 

instead of

 

Pwd

 

VG v6 uses DAO drivers (OLE DB).

 

 

See: http://www.connectionstrings.com/postgre-sql

 

 

Can you run logs on the PostgreSQL ODBC driver itself? Those logs should tell you more why the connection fails.

 

 

Are you able to try VG v7 instead of VG v6?

 

 

From trace:

 

102134,14 4 ERROR 6.0.3391 OpenDatabase [3146:Nieudane wywo³anie ODBC.]

Share this post


Link to post

Another thing to try is to just specify the ODBC data source, and leave the connect string blank.

 

The system looks like it uses the connect string when it is specified, so leave it blank to see if the system will use the data source name instead in that situation.

Share this post


Link to post

I reinstalled windows xp (home) sp. 3, DIALOGIC SR_5.1.1_Windows, VoiceGuideDialogic_6.0.0.3391, .NET 2.0

 

and still can't connect to database. log file shows this same information:

 

151127,38 4 ERROR 6.0.3391 OpenDatabase [3146:Nieudane wywołanie ODBC.]

 

 

 

Can You send me an simple example of working script with connection to ms access database?

Share this post


Link to post

Have you tried to just specify the ODBC data source, and leave the connect string blank? Can you post the traces?

 

Some of the sample scripts installed use MS Access database - please look through the VG's \Scripts\ subdirectory.

 

Have a look at these sample scripts:

 

Customer Enquiry

Collections

Share this post


Link to post

Script connecting to ms access but my application use postgres database, so I need this kind of connection to push forward my experience and decide to use VG in my business.

Share this post


Link to post

Please post the traces capturing the attempted database connect when the connect string is left blank (with only the data source name being specified).

 

Are you able to test the connection from the Windows ODBC Connection Manager? (where you have defined the data source name).

 

Are you able to run any traces on the ODBC connector itself?

Share this post


Link to post

I'm looking someone with experience with postgres and VG connection.

Thank's for a help, but it's not enough for me. Postgres database connection is necessary to be VG user.

Share this post


Link to post

next question:

 

SELECT id_proj$RV[id_proj]

FROM projekty

WHERE id_infolinii='11'

 

How to play data from this query?

 

I got an success in this sql query but don't know that a variable $RV[id_proj] is right saved.

 

can you to check script?

id_proj - database query and then say numbers

pierwszy.zip

Share this post


Link to post

I use postgres DB

 

This Connect String working

 

ODBC; Server=server;Database=databaseName;UID=postgres;PWD=password;

Share this post


Link to post

Looking at attached script the query

 

SELECT id_proj$RV[id_proj] FROM projekty WHERE id_infolinii='11'

 

is made from a Database Query module titled

 

id_proj

 

For sake of clarity lets change the name of the Database Query module to:

 

DbRetreieve

 

The data retrieved by module DbRetreieve would be stored in $RV: $RV[DbRetreieve_1_1]

As per: http://www.voiceguide.com/vghelp/source/html/moddbquery.htm (section Query Results)

 

Looking at the trace file would let you see the $RVs created during the course of running the script.

 

 

Also, the $RV[id_proj] is not set anywhere before the database query is made. From looking at the script it looks like you should be using $RV[input] instead?

Share this post


Link to post

As per above, the $RV which you should use in a subsequent Say Numbers module would be:

 

$RV[DbRetreieve_1_1]

 

- if you change the name of the DB Query module to:

 

DbRetreieve

Share this post


Link to post

Thank's for Your help.

I can now develop VG version of my IVR scenario.

 

next step:

I use about 20 sheets in my Telebutler scenario each with 20 - 40 elements.

It's good for visibility each modules, how to achieve this in VG?

Calling other VG scripts or is option creating parts inside main script?

Share this post


Link to post

It is possible to jump to other VoiceGuide scripts.

 

Please see: http://www.voiceguide.com/vghelp/source/html/paths.htm section: "Branching to other scripts and calling subscripts."

 

Please let us know if you need more information on this (please start a new topic if you do as this is unrealated to databases, and the databases question now looks like is answered).

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
×