Speak lead Data in Survey Broadcast

All installation and configuration problems and questions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

Speak lead Data in Survey Broadcast

Postby cyberfab007 » Wed Nov 27, 2013 9:31 pm

Is it possible through a custom dial play using festival, to speak a dialed leads first and last name during broadcast? Like for instance , the broadcasted message is " Is this the phone number for "John Smith" If this is correct press 1" Can I insert the name or any other relevant information into the message from the lead file such as case number or last four digits of SSN? I have been installing VICI dial for years, I think this is possible in the dial plan with festival , if anyone else has done this or has any experience , any comments would be appreciated.
cyberfab007
 
Posts: 7
Joined: Wed Nov 27, 2013 9:23 pm

Re: Speak lead Data in Survey Broadcast

Postby mflorell » Fri Nov 29, 2013 10:12 am

We have integrated with Cepstral for Text to Speech. It is a commercial paid-for option, but it is much faster and better quality than festival.
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Re: Speak lead Data in Survey Broadcast

Postby cyberfab007 » Fri Nov 29, 2013 9:57 pm

Yes that would be a good option, I am just opposed to the start up costs with that, Cepstral is several hundred dollars per port and my client is going to be dialing a call load of maybe 10 or 15 channels at a time, He is just small operation, The survey is going to go something like this. "Hello "CLIENT NAME" we have your order "ORDERNUMBER" ready for processing. To schedule a pick up press 1 or two deliver the address we have on file Press 2 "

He does about 1000 orders a day, sometimes the clients want to pick up sometimes they want them delivered, because of the way the ordered are processed it is easiest to just call the list once a day and run the survey, the clients will know the number and respond.

Once my solutions is working I will be sure to post it to the community, First I need to install festival, I think festival will work for just speaking names and order numbers, Then I will have to write a custom dial plan to handel the data input into the call.

Any resources available for installing festival and if there is anything existing in building the custom dialplan would be appreciated.
cyberfab007
 
Posts: 7
Joined: Wed Nov 27, 2013 9:23 pm

Re: Speak lead Data in Survey Broadcast

Postby cyberfab007 » Sat Nov 30, 2013 12:58 am

Ok so I have festival working, now I must write the dial plan to query the Leads name from the database and play it during the survey, I will post instructions on getting festival running
cyberfab007
 
Posts: 7
Joined: Wed Nov 27, 2013 9:23 pm

Re: Speak lead Data in Survey Broadcast

Postby williamconley » Sat Nov 30, 2013 2:39 am

cyberfab007 wrote:Ok so I have festival working, now I must write the dial plan to query the Leads name from the database and play it during the survey, I will post instructions on getting festival running

Please do. And post questions here during the process if you require assistance.

Especially if your installation is stock Vicibox so the instructions could be used by all, but even if not they would still be well-received. 8-)
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20258
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Re: Speak lead Data in Survey Broadcast

Postby cyberfab007 » Sat Nov 30, 2013 3:38 pm

It was very easy to get festival running,

1. First have fresh install of goautodial 2.4 309a

2. login into command line and run " yum install festival "

3. edit festival.smc located in /usr/share/festival/
put this code at the bottom of the file :




;; set italian voice (comment the following 2 lines to use british_american)
;;(language_italian)
(set! voice_default 'voice_pc_diphone)

;;; Command for Asterisk begin


(define (tts_textasterisk string mode)
"(tts_textasterisk STRING MODE)
Apply tts to STRING. This function is specifically designed for
use in server mode so a single function call may synthesize the string.
This function name may be added to the server safe functions."
(let ((wholeutt (utt.synth (eval (list 'Utterance 'Text string)))))
(utt.wave.resample wholeutt 8000)
(utt.wave.rescale wholeutt 5)
(utt.send.wave.client wholeutt)))

;;; Command for Asterisk end


3. Edit festival.conf located in /etc/asterisk/festival.conf you can copy and past this file or simply uncomment the same settings in your file
;
; Festival Configuration
;
[general]
;
; Host which runs the festival server (default : localhost);
;
host=localhost
;
;Port on host where the festival server runs (default : 1314)
;
port=1314
;
; Use cache (yes, no - defaults to no)
;
usecache=yes
;
; If usecache=yes, a directory to store waveform cache files.
; The cache is never cleared (yet), so you must take care of cleaning it
; yourself (just delete any or all files from the cache).
; THIS DIRECTORY *MUST* EXIST and must be writable from the asterisk process.
; Defaults to /tmp/
;
cachedir=/var/lib/asterisk/festivalcache/
;
; Festival command to send to the server.
; Defaults to: (tts_textasterisk "%s" 'file)(quit)\n
; %s is replaced by the desired text to say. The command MUST end with a
; (quit) directive, or the cache handling mechanism will hang. Do not
; forget the \n at the end.
;
festivalcommand=(tts_textasterisk "%s" 'file)(quit)\n
;
;

4. create a custom context in your extensions.conf to read this


[sample]
exten => 555,1,Answer
exten => 555,2,Festival( Festival is working ) ; do NOT use quotes around the string! if you use commas, you will have to escape them with a "\" (backslash).
exten => 555,3,Hangup


4. log back into your command line and run

bash>> screen -a
bash>> festival --server
then close your putty window :)

5 Register your sip extension, assign it the custom context [sample]

6. dial 555 and you will hear your festival server running

Done
cyberfab007
 
Posts: 7
Joined: Wed Nov 27, 2013 9:23 pm

Re: Speak lead Data in Survey Broadcast

Postby cyberfab007 » Sat Nov 30, 2013 3:39 pm

Now i have also created this script , this php script takes the phone number dialed , queries the asterisk database and returns the name of the lead that was dialed ,

#!/usr/bin/php -q
<?
require 'phpagi.php';
$agi = new AGI();
mysql_connect('localhost','root','vicidialnow');
mysql_select_db('asterisk'); //or die("could not open database");
$DNAME = mysql_query(" SELECT first_name FROM `vicidial_list` WHERE `phone_number` = $argv[0]
LIMIT 0 , 30 ");
$agi->set_variable("DNAME", $DNAME);
?>
cyberfab007
 
Posts: 7
Joined: Wed Nov 27, 2013 9:23 pm

Re: Speak lead Data in Survey Broadcast

Postby cyberfab007 » Sat Nov 30, 2013 3:43 pm

now here is the million dollars question , Where am I gonna stick this script? WIll I have to write my own custome dial play for my survey broadcast ? Will I have to dive face first into agi-VDAD_ALL_outbound.agi ? Or does someone have a simple idea ? Remember I want to play the Leads in the message I am broadcasting.
cyberfab007
 
Posts: 7
Joined: Wed Nov 27, 2013 9:23 pm

Re: Speak lead Data in Survey Broadcast

Postby williamconley » Sat Nov 30, 2013 6:27 pm

Use the existing integration for Cepstral.

You can also write an agi script on your own, of course, in PHP instead of PERL if you are more comfortable.

An AGI script is a script that uses asterisk modules to accept channel data from a live call and then uses those same asterisk modules to send information to the call to make things happen ... such as playing a sound!

Most AGI scripts in vicidial are PERL scripts, but php also has modules to allow PHP scripts to be used.

These scripts all reside in /var/lib/asterisk/agi-bin

Of particular interest, you may like /var/lib/asterisk/agi-bin/cepstral_generate.pl

Note that there are two basic methods: 1) Generate the sound IN the channel (preferred) or 2) Generate a sound file and then play the sound in asterisk. This may also require converting the sound after creating it (if it does not meet the standard asterisk requirements for sound ...).
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20258
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)

Re: Speak lead Data in Survey Broadcast

Postby cyberfab007 » Mon Dec 02, 2013 10:24 am

I think I am just going to create a custom dial plan, I mean after VICI dial generates the call the the caller pics up it is passed to an extension, that extension the completes the survey, so I think I am just going to create a custom dial plan to perform this function, as I said , cepstral charge to much money per port, and festival is more then capable of speaking name clearly and numerical digits.
cyberfab007
 
Posts: 7
Joined: Wed Nov 27, 2013 9:23 pm

Re: Speak lead Data in Survey Broadcast

Postby gardo » Tue Dec 03, 2013 1:01 am

Thank you for posting this excellent tutorial. Can we have your permission to post this in our GOautodial wiki? Hopefully we get to have full Festival integration with Vicidial. Let's see what we can do here. :)
http://goautodial.com
Empowering the next generation contact centers
gardo
 
Posts: 1926
Joined: Fri Sep 15, 2006 10:24 am
Location: Manila, 1004

Re: Speak lead Data in Survey Broadcast

Postby rrb555 » Tue Dec 03, 2013 10:07 am

Cool! I'll try it to Vicibox system
One server that I am managing | Single Server | ViciBox Redux 6.0 | VERSION: 2.12-549a | BUILD: 160404-0940 | revision 2508| No other hardware
For help you can send me a direct email info@support.com.ph
rrb555
 
Posts: 585
Joined: Tue Feb 08, 2011 4:24 pm
Location: Quezon City, Philippines


Return to Support

Who is online

Users browsing this forum: Bing [Bot] and 161 guests