• V20: 3CX Re-engineered. Get V20 for increased security, better call management, a new admin console and Windows softphone. Learn More.

3CX_VAD_TTS_Auto_Dial

Status
Not open for further replies.

smart22

Joined
Mar 13, 2013
Messages
12
Reaction score
0
This is our 1st VAD project. The project is about auto call service agent by retrieving data from database.

We using VAD to allow customer to insert their contact number which latter be called automatically by system through our customize software that we had already prepared.

I have 2 small issue which I stuck with :

1) When I confirm customer contact number by using TTS , now after that I want to ask them # to cancel or * to continue .
If customer press * , number input by customer will be saved in database. but if customer press # then it again go back to user input menu. How I can do above process, what should I use loop or conditional component.
2) How I can add thai prompt i.e Thai TTS.

Please see the attached application diagram.
 

Attachments

  • 3CX_VAD.PNG
    3CX_VAD.PNG
    66.2 KB · Views: 1,561
Hi there!

I'm answering your questions below:
1) To do that, you need to use a Loop component, and use some variable to define if the loop must continue looping or you can exit the loop. Here you have an example on how to do it:
http://www.3cx.com/blog/docs/vad-phone- ... -portal-1/

2) In order to add a voice for a different language, you can follow the steps here under section "Adding Voices and Supporting More Languages": 3cx.com/blog/docs/text-to-speech-3cx-vad/

As you can see, the VAD uses the voices available from Windows Operating System, so you need to buy a voice for your language and add it to Windows. Then you can define that voice as the default voice, or specify the voice name in the TTS prompt.

I'm not sure where you can buy Thai voices. Maybe if your Windows is installed with the Thai language, it includes a Thai voice. Or you can try searching in Google to see who sells Thai voices...

Hope the information helps.

Kind regards.
 
Thanks for your reply.. I will try. I have one more issue after I add loop and condition.. My whole application is not working.
I don't know what went wrong.

0:33:34.661|15756|(0):Subtag SBjsiDestroyContext. entering: 0x0000000001656318 (0x0000000001617010)
10:33:34.662|15756|(0):Subtag SBjsiDestroyContext. exiting: returned 0
10:33:34.663|15756|api\VXIFactory.cpp(330):IvrDll, VXISessionImpl::processDocument(), Error! VXIinterpreter->Run() failed, error code -100
10:33:34.663|15756|(0):Event occurred (ID # 1).
10:33:34.663|15756|api\VXItelImpl.cpp(83):IvrDll, VXItelImpl::Impl::EndSession(), EndSession
10:33:34.663|15756|(0):Subtag VXIplatformProcessDocument. exiting: rc = -100, 0x0000000000000000
10:33:34.663|15756|VXIMachine.cpp(55):IvrDll, VXISessionThread::Run(), Error! Call 'From_1003_To_8522_Menu_8522_#0/4': session finished with error code -57. Error of document interpretation: -57, interp.code: -100
10:33:34.663|15756|PbxMedia\IVREngine.cpp(1021):IvrService, IVREngine::IVRCallListener::SessionFinished(), (0)IVR session has been finished for established call from 1003
10:33:34.663|15756|VXIMachine.cpp(1789):IvrDll, VXIMachine::EndSession(), Removing From_1003_To_8522_Menu_8522_#0/4 call
10:33:34.663|15756|(0):Subtag SBjsiDestroyResource. entering: 0x000000000161FC58 (0x00000000016442E0)
10:33:34.663|15756|(0):Subtag SBjsiDestroyResource. exiting: returned 0
10:34:18.391|6044|(0):Subtag VXIplatformCreateResources. entering: 0, 0x0000000001610960
10:34:18.391|6044|(0):Subtag SBjsiCreateResource. entering: 0x0000000001623760, 0x0000000001620138
10:34:18.391|6044|(0):Subtag SBjsiCreateResource. exiting: returned 0
10:34:18.391|6044|(0):Subtag VXIplatformCreateResources. exiting: rc = 0, 0x0000000001620100
10:34:18.392|6044|VXIMachine.cpp(503):IvrDll, CallSession::Start(), Using VXML document 'http://3cx.demo.com/ivr/ivr_start.aspx?IVRHandlerMENU=8522&IVRHandlerFROM=1003&IVRHandlerTO=8522&IVRHandlerURL=http%3A%2F%2F3cx.demo.com%2Fivr%2Fivr_start.aspx&ISID=From_1003_To_8522_Menu_8522_%230%2F5'
10:34:18.392|13780|PbxMedia\IVREngine.cpp(1012):IvrService, IVREngine::IVRCallListener::SessionStarted(), (0)IVR session has been started for call from 1003
10:34:18.392|13780|api\VXItelImpl.cpp(76):IvrDll, VXItelImpl::Impl::BeginSession(), BeginSession
10:34:18.392|13780|(0):Event occurred (ID # 0). ANIIDNISVURLhttp://3cx.demo.com/ivr/ivr ... 2_%230%2F5
10:34:18.398|13780|(0):Subtag SBjsiCreateContext. entering: 0x0000000001656318


Sorry to worry you .. I did some test project earlier and it worked.. Could you please help me to find out where I am getting wrong.
 
I check step by step.. I found when I define variable in main component then it show error "error of document interpretation -57" . when I remove it.. it start working.

Could you please tell me how I can fix this as I need to define variable.
 
How are you defining your variable? Can you share a screenshot of the variable assignment component configuration and the variable definition?
 
Hi,

Thanks for your reply. I appreciate your effort to help me out with this project.

I have attached the screenshot of my variable assignment.

Apart from that would you please tell me 1 more thing, I read in 3CX TTS post that I can change voice and speed of TTS from window setting.
I did try that , but 3CX VAD use same old voice and speed.
 

Attachments

  • TTS.PNG
    TTS.PNG
    7.6 KB · Views: 1,520
  • Validate.PNG
    Validate.PNG
    8.5 KB · Views: 1,520
The InitialValue for the variable Validate should have quotes:
'*'
instead of just
*

Because it's a string, not a number.

In regards to voice and speed, you can set the defaults from the Control Panel, or you can also change them from the TTS prompt properties.

Regards.
 
Hi,

Thanks for your reply . I have complete my project.

The only thing left is change TTS voice prompt. i want to play female voice. I have change and apply male voice to female from TTS option present in control panel. But 3CX VAD always play default TTS voice i.e male.

I have attached snapshot for reference. Anything we can do to solve the issue.

Thanks again for your patience and help.
 

Attachments

  • TTS_window.PNG
    TTS_window.PNG
    14.1 KB · Views: 1,455
Try setting the voice name, exactly as it appears in Control Panel, into the TTS Prompt.
 
Everything is prepared, now because I have to use THAI TTS to repeat the user contact number to them.

I have prepared thai TTS software, where audio file with name as contact number is created at runtime. Audio file name is user 'contact number.mp3' , later I need to play that file using dynamic audio.

I see in Audio folder file mp3 is saved with contact number.mp3 , but when I try to retrieve it using dynamic audio it not work.

I am using CONCATENATE('\\Test_VAD\\Audio\\',Request_Mb_number.Buffer,'.mp3') in Dynamic Audio file prompt.

same file when play on my PC it work.

Please see the below debug..

VARIABLE_CHANGED: application.project$_WorkingDirectory$=C:\ProgramData\3CX\Instance1\Data\Http\Interface\ivr\New.lift.work_Debug_128\
VARIABLE_CHANGED: session.ani=1003
VARIABLE_CHANGED: session.callid=From_1003_To_856_Menu_856_#0/39
VARIABLE_CHANGED: session.dnis=856
END_EXECUTION: Main.flow - - MF
VARIABLE_CHANGED: Main_Thai_english_option_Result=ValidOption
END_EXECUTION: Main.flow - Thai_english_option - MF
END_EXECUTION: Main.flow - menuComponentBranch2 - MF
END_EXECUTION: Main.flow - Cancel_option - MF
VARIABLE_CHANGED: Main_Request_Mb_number_Buffer=0987654321
VARIABLE_CHANGED: Main_Request_Mb_number_Result=ValidDigits
END_EXECUTION: Main.flow - Request_Mb_number - MF
END_EXECUTION: Main.flow - componentBranch1 - MF
VARIABLE_CHANGED: Main_filename=0987654321.mp3
END_EXECUTION: Main.flow - variableAssignmentComponent1 - MF
VARIABLE_CHANGED: Main_externalCodeExecutionComponent2_ReturnValue=True
END_EXECUTION: Main.flow - externalCodeExecutionComponent2 - MF
END_EXECUTION: Main.flow - testTTSenglish - MF
VARIABLE_CHANGED: Main_Validation_option_Buffer=*
VARIABLE_CHANGED: Main_Validation_option_Result=ValidDigits
END_EXECUTION: Main.flow - Validation_option - MF
END_EXECUTION: Main.flow - componentBranch3 - MF
END_EXECUTION: Main.flow - Check_ACK - MF
END_EXECUTION: Main.flow - isSuccess - MF
END_EXECUTION: Main.flow - Receive_Ack - MF
VARIABLE_CHANGED: Main_databaseAccessComponent1_ScalarResult=
VARIABLE_CHANGED: Main_databaseAccessComponent1_NonQueryResult=0
VARIABLE_CHANGED: Main_databaseAccessComponent1_QueryResult=
END_EXECUTION: Main.flow - databaseAccessComponent1 - MF
END_EXECUTION: Main.flow - - DH


Could you please tell me where I am getting wrong.
 

Attachments

  • audio_new.PNG
    audio_new.PNG
    44.5 KB · Views: 1,109
I check further :

In dynamic audio if I use CONCATENATE('0960489935','.mp3') this work, here I have file name in Audio folder i.e '0960489935'

But when I use CONCATENATE(Eng_Mb_number_Buffer,'.mp3') it not work , though the file is created with number enterted by user.

It means Dynamic audio can locate the audio file, but cannot retrieve , if I use Eng_Mb_Buffer .

VARIABLE_CHANGED: session.ani=1003
VARIABLE_CHANGED: session.callid=From_1003_To_856_Menu_856_#0/75
VARIABLE_CHANGED: session.dnis=856
END_EXECUTION: Main.flow - - MF
VARIABLE_CHANGED: Main_test_1_Result=ValidOption
END_EXECUTION: Main.flow - test_1 - MF
END_EXECUTION: Main.flow - menuComponentBranch2 - MF
END_EXECUTION: Main.flow - Eng_loop - MF
VARIABLE_CHANGED: Main_Eng_Mb_number_Buffer=0369258147
VARIABLE_CHANGED: Main_Eng_Mb_number_Result=ValidDigits
END_EXECUTION: Main.flow - Eng_Mb_number - MF
END_EXECUTION: Main.flow - componentBranch3 - MF
VARIABLE_CHANGED: Main_filename=0369258147
END_EXECUTION: Main.flow - Dynamic_File_Name - MF
VARIABLE_CHANGED: Main_ECE_For_TTS_ReturnValue=True
END_EXECUTION: Main.flow - ECE_For_TTS - MF
END_EXECUTION: Main.flow - TTS_English - MF
END_EXECUTION: Main.flow - - DH
 
Please find the attached project snap for reference.
 

Attachments

  • project_snap.PNG
    project_snap.PNG
    61.3 KB · Views: 1,095
I check further by following the below link :

post173162.html?hilit=Dynamic%20audio#p173162

Still it not work for me.

To test I put 1 file with name 0960489935.mp3.

and try to locate by using CONCATENATE('../../ExternalAudio/',Eng_Mb_number.Buffer,'.mp3') in dynamic audio parameter.

Let me know If I misunderstood.
This is debug info :

VARIABLE_CHANGED: application.project$_CurrentErrorName$=
VARIABLE_CHANGED: application.project$_PbxSipPort$=5060
VARIABLE_CHANGED: application.project$_WorkingDirectory$=C:\ProgramData\3CX\Instance1\Data\Http\Interface\ivr\New.lift.work_Debug_207\
VARIABLE_CHANGED: session.ani=1003
VARIABLE_CHANGED: session.callid=From_1003_To_856_Menu_856_#0/25
VARIABLE_CHANGED: session.dnis=856
END_EXECUTION: Main.flow - - MF
VARIABLE_CHANGED: Main_test_1_Result=ValidOption
END_EXECUTION: Main.flow - test_1 - MF
END_EXECUTION: Main.flow - menuComponentBranch2 - MF
END_EXECUTION: Main.flow - Eng_loop - MF
VARIABLE_CHANGED: Main_Eng_Mb_number_Buffer=0960489935
VARIABLE_CHANGED: Main_Eng_Mb_number_Result=ValidDigits
END_EXECUTION: Main.flow - Eng_Mb_number - MF
END_EXECUTION: Main.flow - componentBranch3 - MF
VARIABLE_CHANGED: Main_ECE_For_TTS_ReturnValue=True
END_EXECUTION: Main.flow - ECE_For_TTS - MF
VARIABLE_CHANGED: Main_f=0960489935.mp3
END_EXECUTION: Main.flow - variableAssignmentComponent1 - MF
END_EXECUTION: Main.flow - TTS_English - MF
END_EXECUTION: Main.flow - - DH


Please find the attached snapshot for reference.
 

Attachments

  • Concatenate_Dynamic_audio.PNG
    Concatenate_Dynamic_audio.PNG
    94.8 KB · Views: 1,086
  • External_Audio.PNG
    External_Audio.PNG
    45.1 KB · Views: 1,086
Hi there,

First, please note that you should use WAV files, and not MP3 files. The required format is PCM, mono, 8khz, 16 bits per sample.

Next, you should put your audio files into the "Audio" folder of your VAD project structure. Then, when you deploy your project, the audio files are copied to the server, and you just need to specify the audio file name, and you don't need to deal with the path. Please note that audio files must be inside the application folder, because the web server might reject access to it because of security. So if you put the audio files in D:\Test_VAD\Audio, pretty sure the web server will not be able to access it. Also, the paths must be relative to the application deployment folder. So it's always better to put the files in the Audio folder of your project, and let them be deployed to the 3CX server.

Kind regards.
 
Hi,

Thanks for your reply. Now I change my project location to C drive and save audio file in Audio folder .

Please find the attached snapshot for reference.

It still not working.

Could you please tell me '../ExternalAudio/' it will direct locate to position "C:\ProgramData\3CX\Instance1\Data\Http\Interface\ivr\ExternalAudio"

I have test wave also but that also not work.
 

Attachments

  • Project_location.PNG
    Project_location.PNG
    37.1 KB · Views: 718
  • VAD_Audio.PNG
    VAD_Audio.PNG
    56.3 KB · Views: 718
  • Audio_file.PNG
    Audio_file.PNG
    38.3 KB · Views: 718
First, you can't point to files outside the IVR app folder, i.e. C:\ProgramData\3CX\Instance1\Data\Http\Interface\ivr\

The web server will reject access to files outside the application folder, so you need to put files into that folder.

If you want to add the files to a static folder (not changed every time you deploy a VAD project), you can use for example the folder:
C:\ProgramData\3CX\Instance1\Data\Http\Interface\ivr\ExternalAudio

When you execute the VAD app, your current folder is this:
C:\ProgramData\3CX\Instance1\Data\Http\Interface\ivr\VAD_PROJECT_FOLDER

So, in order to access the ExternalAudio folder above you need to point to it as follows:
'../ExternalAudio/YourFile.wav'

You CAN'T access files in C:\VAD\Audio, that will not work because of the security restrictions of the web server.


If you don't need a static folder for audio files like "C:\ProgramData\3CX\Instance1\Data\Http\Interface\ivr\ExternalAudio", then you can just add your WAV files to the "Audio" folder in your VAD project, and they will be automatically deployed along with your VAD app. In that case, you just need to specify the file name.

Kind regards.
 
Status
Not open for further replies.
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.