Asterisk + MSSQL + Swift

Integrating the Cepstral engine

Asterisk + MSSQL + Swift

Postby jdabro » Sun Oct 24, 2010 11:54 am

General Information about setup
Asterisk 1.6.2.6
app_swift-1.6.2 + patch
Cepstral_Allison_i386-linux_5.1.0

Module Description Use Count
app_swift.so Cepstral Swift TTS Application 1

Swift works fine to read back standard text.
exten => 222,1,Swift(test swift)

_______________________________________


Situation

I'm trying to get Cepstral to read back data from a MSSQL database server using ODBC connections with UNIXODBC and Freetds.

This is for a sports line service where the information returned is sports lines(example displayed below).

I've gotten the asterisk to read back numbers using the "SayNumber" application, but when I try and use Swift I can't get it to read what the query returns.
NOTE: it works with SayNumber when returned data is a number. Also the query returns correctly using the odbc displayed below:

isql -v db DatabaseUser Databasepassword
SQL> select description from lines where gamenumber = 63058731;

Basketball - 754 Detroit Pistons -4 -110 for Game
SQLRowCount returns 1
1 rows fetched


func_odbc.conf

[db]
prefix=playlines
dsn=ISBDb1
select description from lines where gamenumber = 63058731;




Extensions.conf
exten => s,1,Playback(/var/lib/asterisk/sounds/en/lines)
exten => s,n,Swift(${playlines_db})
exten => s,n,Goto(mainmenu,s,1)
exten => s,n,Hangup()




<SIP/4404-00000001> Playing '/var/lib/asterisk/sounds/en/lines.gsm' (language 'en')
-- Executing [s@playlines:2] Swift("SIP/4404-00000001", "") in new stack
[Oct 24 10:35:43] WARNING[12982]: app_swift.c:299 engine: Swift requires text to speak!
== Spawn extension (playlines, s, 2) exited non-zero on 'SIP/4404-00

Please advise...

thanxs,
Jdabro
The box Said "For windows 95, 2000. XP or Better"
so I installed Linux
jdabro
 
Posts: 1
Joined: Sat Oct 23, 2010 12:53 pm

Postby AdamW » Sat Oct 30, 2010 12:14 pm

From the two lines in your log:


-- Executing [s@playlines:2] Swift("SIP/4404-00000001", "") in new stack
[Oct 24 10:35:43] WARNING[12982]: app_swift.c:299 engine: Swift requires text to speak!

It looks like Swift is being called with the second argument as the text, which is "". And it is complaining about the fact that it's empty. So if we assume playlines_db should contain the result of your query, then I'm not sure where playlines_db is being set to anything useful. I see playlines as prefix, but no prior reference to playlines_db. Hope this helps.
AdamW
 


Return to Asterisk

Who is online

Users browsing this forum: No registered users and 8 guests

cron