Home
3CX Voice Application Designer
Contents
1. User Name project D atabaseU serN ame Password project D atabasePassword Statement Type Query Timeout secs 30 SOL Statement select DESCRIPTION AMOUNT from PAYMENTS where CREDIT_CARD_NUMBER 0 a Parameters Value callflow CreditC ardh umber 4 To assign a variable to one of the fields of the form press the Expression Editor Button on the right side of the field and choose the desired variable For example the following figure shows the configuration of the Server field Expression Editor Javascript Expression 2 Variable O VAD Expression Variable selection lao RecordCount TestName 2 5 Initialize T est T A T est ame SP MenuResult h Invalidi ption E Timeout E YalidO ption a project wet DatabaseName or DatabasePassword lo DatabaseServer a Database ser ame AN The Project needs to have the variables DatabaseServer DatabaseName DatabaseUserName and DatabasePassword They are defined in the Properties Window when the Project is selected in the Project Explorer 5 In order to assign a value to a parameter click the LS button and use the Expression Editor to create the desired expression The following figure shows the resulting flow at this point Page 64 30X 3CX Phone System for Windows www 3cx com Start Page Main QueryPayments xX q databaseAccessCo SQ mponentl ES Main
2. 4 Local intranet Screenshot 11 Voice applications are listed as digital receptionists Now you have built and deployed your voice application you are ready to try it out Simply ring the extension that you have assigned to the voice application Page 14 30X 3CX Phone System for Windows www 3cx com 3CX Voice Application Designer Workspace Introduction F Maru a poe 2 5 a Manlio ith Uze input E Compon dK Promat Playback Py Amex 7 Record AB Amex comp KL Tranetes ES Cone S gt Pest como amp Duconnect Call QuewP aymerts comp Control Structures RequesiiediCadNdumber core Z Conditional SS T A E Matter Act Venable Arucrmert Timeout ce Invalid Option E Master como y Visa 21 Incremant Variable 8 Visa comp 5 Decrement Variable i HH Oo lee tansterToDperator 2 Ext Callow j lt gt gt Advanced L i bi Cryptography oF x en Database Access p U A SE Mal Sender Sie l Extemal Code Execution E Callllow SP Fla Management ActvalonE tensor 851 902 ce ActivationE tension 851 Q Socket Chant PoxCaltlowName Main P veo Interachon E File we Sennces Interaction Nams Main flow User Defined Components Variabl Collection B Misc 43 Amex 3 Master 43 PedomPaymart 3 Query aymerts 43 RequestCredtC ardNurnber Evita v l Name The name of the file lt gt L Main Flow e Ence Handler Flow Disconnect Handler Flow Ready Screenshot 12 The 3CX VAD
3. 30x PERES ACT User s Manual 3CX Voice Application Designer Version 2 0 Copyright 2006 2009 3CX Lid http www 3cx com E mail info 3cx com Information in this document is subject to change without notice Companies names and data used in examples herein are fictitious unless otherwise noted No part of this document may be reproduced or transmitted in any form or by any means electronic or mechanical for any purpose without the express written permission of 3CX Ltd 3CX Phone System for Windows is copyright of 3CX Ltd 3CX is a registered trademark and 3CX Phone System for Windows and the 3CX logo are trademarks of 3CX Ltd in Europe the United States and other countries Version 2 0 Last updated 30 09 2009 Table of Contents TOQUE Massa 1 What is 3CX Voice Application Designer eee e ee 1 POW OCS IU WONK ai A Ai erste alenip inte 1 TSG INN ON OG Visas lisis is da genoa eats ra nena anes ST 2 DOcUMentcon Usta 2 Installing 3CX Voice Application DesignNer oocococcocccconoconnoconnononcnnonnonononnnnononnnnnennnnnnnnnnns 3 Velem REUE meN aee a N 3 UID SGT E 3 Allowing remote access to the configuration see ee e ee e e ec ec ee 3 Activating 3CX Voice Application Designer cce e eee e e 4 Contigurina Phone System local id 4 Getting started Creating a simple callflOW oo oocooconccconccconoconnoconnnnncnnonnnnononnnnon 6 INTO e E a 6 realnog INE POEG srr a a ii tias a
4. The Append mode allows adding text at the end of the file The Create mode allows creating the file if tt does not exist or truncate it if it already exists so it always starts with an empty file The Open mode allows opening the file as it is and write to it since the first character overriding what was on it The data to be written is the information that is stored in the Content property If the AppendFinalCrLf property is set Carriage Return and Line Feed characters are added at the end of the line This component has the following input properties Property Description Use Append to append data at the end of the file when Action is OpenMode Write Use Create to open a new file or truncate an existing one Use Open to open an existing file Action The action to perform It could be Read or Write l The relative path from the deployment web server to the file to read FileName or write Content The text to write to the file Only valid when Action is Write True to append a final CR LF after writing to the file False otherwise AppendFinalCrLf PP 9 Only valid when Action is Write The number of lines to read from the file Only valid when Action is Read The zero based index of the first line to read from the file Only valid when Action is Read LinesToRead FirstLineToRead Overrides LinesToRead reading until the end of file is reached Only valid when Action is Read Table 18 File Manage
5. MaxRetyCount 3 Timeout 5 Options Is ValidOption0 False Is alidOption_1 True IsValidOption_2 True Is alidOption_3 False IsValidOption_4 False IsValidOption_5 False IsvalidOption_6 False Ae t lid ebe 7 Estan Configure Add Option 0 Add Option 3 Add Option Add Option Option 4 4dd Option 5 4dd Option 6 4dd Option Z Add Option 8 Add Option 9 Add A Collapse d Name Please specify the name of the component It has to be unique in the entire flow Screenshot 43 Adding a menu option Page 59 30X 3CX Phone System for Windows www 3cx com 8 Before going on with the Main callflow we are going to create some folders that will let us store the components Using the command to create a New Folder right click on the Project Explorer and choose New Folder lets create the following folders inside de CreditCard Project CreditCard gt Callflows gt Components Amex Master Visa Common 9 Now we are ready to create the User Components that will implement each one of the main menu options Configuring the Main Callflow Now we must create the User Components om imon PestormPayment comp QueryPayments comp RequestCreditCandN umber comp Screenshot 44 Creating the user components 1 From the Project Explorer e Right click on the Amex folder and choose New Component Name it Amex comp e Repeat for the Master folder and name it Master comp e Again for
6. User Input de Prompt Playbact Z Recoid CC Trancter amp Discar vect Cab Control Structures amp Conditional AsB Variable Assignment 11 Increment Variable Z 1 Decrement Variable Y Loop E Ext Callow Advanced Cayptography 3 oF x ea Database Access aT amp E Mail Sender w Z 3 al Ce 5 Calltiow 9 maia 4 ActivabonE tensio 851 ActivationEMtenso 852 FP Socket Chent PtoCaliowName Main P web Interaction File p Web Services Interaction Name Main flow User Defined Components He Collection Name The name of the file lt gt 3 Main Flow ty Ence Handes Flow Dsconrec Handier Flow Screenshot 4 Creating a call flow When the project is created an empty Main callflow is automatically created too A new tab will open on which you can drag the components that will form your call flow Each callflow will be created with three basic properties which can be edited from the properties Window ActivationExtension The extension number on which the application will register this callflow in 3CX Phone System when the project is deployed in release mode You will be able to call this extension from any extension in 3CX to execute this callflow ActivationExtensionDebug The extension number where the application will register this callflow in 3CX Phone System when the project is deployed in debug mode You will be able to call this extension from any extension in 3CX to execute this callfl
7. 6 creating Eeee 7 Adding Components to ala 8 B ilding ING siso 13 Deploying the project to 3CX Phone System ee ee eee e e eee 13 EXecuting YOUF ee Applicaton T 14 3CX Voice Application Designer Workspace ocoocococcococconocconoconnocononconnnnonnnnnnonnnconnnnnnnnnos 15 INTO a 15 A A A A A N 15 Navigating within the designer css eee eee 16 TADS Ol Call leu 16 TAC DOCKING OAM GIS E ia 19 Components TOODO rererere A anil ed Aeon suai 20 Table GOMPONENEGSSCHDUON asta tales 20 ETOJOCt EXDIORCI VWIAdOWoisnssi add a cable cdas 21 PLOPernios WINCIOW zetas buno iaa tati iee 21 EN OR LISEWINOW A a 22 OUT UT VV ING West tt idad ad 23 DEDUAWINAOW arto A 23 A spedtietct atasteleim Untirecet sate ctl a ttiakteta R 25 MS A NN A a aS 25 FTOMPETYDOS carnada 25 MA ele TTT 25 Gall Related les ieie 28 Menu28 UE al TT 29 Rae g S AO O E O cena ta 31 PVG COMO TTT 31 WY AUS THT 33 Disconnect TTT TTT 34 Control Structures COMPONENTS sin db 34 So gfe ice husband 34 QZT el ASSIM data ad 34 NcreMent VanaDlSun errada ts arias 35 DeEcrement Yala 36 Loop 36 f XIE ROPING ATION aaa dao id 36 Advanced Components ia 37 A TTTTTTTTT 37 Database ACCESS tdi is 38 S T Kale ri cas 40 External Code EXCUSA A AS 41 le Manade men tantes indi 43 SOCKS C leM einai a O 44 WODINtEraCO Messere EEA ee AEEA ea 45 Wep Services Interracial 46 User Detined Components iaa lalala 47 Default Component OPTIONS see e ee eee e e 48 Menu4
8. 7 False IsVabd0 phon 8 False lsVabdOphonS False LV ak phon Pe False IsVabdOpton_St False InvabdDigtProm Collection SubsequentPron Collection TimeoutPrompts Collection InitialPrompts The list of prompts to play the fest time the menu is execut 3 Main Flow A Error Handler Flow Disconnect Handler Flow Error List Output Debug Ready Screenshot 5 Adding components Once you have created the callflow you can drag and drop components from the toolbox to the designer In this example we ll add a Menu component 1 From the toolbox on the left hand side select the component Menu 2 Now drag it onto one of the options of the call flow Drag it onto Drag and drop component here You will see Menu component written when you have dragged it on to the correct location 3 Now give the component an appropriate name In this case well name it MainMenu 4 By default each call flow starts with 2 options We re going to add a third option Right click with your mouse anywhere in the designer window and select Add Option 3 Note When the Menu component is added to the designer it will have its properties set to the template you have in Tools gt Options gt Component Templates gt Menu You may change the Menu component properties from the Properties windows or its configuration form The configuration form can be opened by double clicking the component or in the context menu
9. Decrement Vanable Variables Collection 2 Ext Calton Misc 1 Increment Y anable 5 Loop Aa Variable Assignment User Defined Components E Amex dE Master dE PesfoemPayment LE QueryPaymerts 8 RequestCreditCardNumber The nana of Gs fle PR View lt From_101_To_999 Meru 999 0 0 333 Enor List Output Debug Ready Page 54 30X 3CX Phone System for Windows www 3ex com 4 Variables updated during the last step are shown in red color Initially all variables are showed in red color because that Is the first assigned value Debug A ani 101 K callid From TU To 999 Menu 299 02 i dnis 999 uE project s i 5 The available debug command buttons are enabled automatically in the main menu and the main toolbar after the execution of each step 6 Pressing the Step Into Button the callflow execution continues to the next component This menu command is available when the currently executing component is a User Defined Component or a component with child branches For example when you are executing a menu component Start Page Main a Option 1 4 OO I A Z Man Flaw da Error Handler Flow te Disconnect Handler Flow Screenshot 39 Step into command 7 Pressing the Step Over Button lll will cause the callflow execution to continue to the next component at the same level as the current component This menu command is available when the currently executi
10. Est Calfiow gt Advanced fA Cyptogaphy I Database Access lt S E Mail Sender j E YN Extena Code Execution 2 Fie Management KIO de Oonan 0 BELE Add tae EE ee Option Services Interaction Name Name Please specity the name of the component It has to be unique in the entre flow Z Mar Hoa p Enor Handler Flow Disconnect Handler Flow Screenshot 41 Adding a menu component Page 58 3CX 3CX Phone System for Windows WwWwW 3Cx com 6 Now we will modify the name of the added menu component Select the menuComponent1 component and from the Properties windows modify the name property with mainMenu E 3CX Voice Application Designer Beta CreditCard EE Prompt Playback P Record C Transter C Disconnect Call i Control Structures Q Conditional AB Variable Assignment 31 Increment Variable i Decrement Variable 5 Loop R Ext Cade Advanced 2 U Cryptography IRI Database Access E E Mail Sender External Code Execution EA File Management 3 Socket Chent P Web Interaction Fa Web Services Interaction i Uses Defined Components 3 Mam Flow e Enor Handies Flow Disconnect Harder Flow i Timeout or Invalid Option 4 Drag and drop components here E E CeditCard ES Calflows y Main flow AllowBargeln MaxRetryCount Timeout E Options leValidOption_O IsValidOption_1 IsValidOption_2 Is aldOption_3 IsVahdOption_4
11. Flow Le Error Handler Flow Disconnect Handler Flow 6 We want to loop through the retrieved payments so we will add a Loop component From the Control Structures Components section drag the Loop component and drop it after the databaseQuery component From the Properties window change the name of the recently added component to loopPayments and the Condition pressing the La button On the Expression Editor enter the following information Expression Editor Javascript Expression Variable VAD Expression VAD Expression Function LESS_T HAN Expression callflow CurrentRecord at Expression GET_TABLE_ROW_COUNTi callflo HGH 77 Screenshot 47 Creating an expression 7 To configure the second Expression press on the Expression Editor button and choose the corresponding values Expression Editor O Javascript Expression O Variable S VAD Expression VAD Expression Function BET TABLE POW COUNT 4 Expression databaseQuery QuerResult il S Page 65 30X 3CX Phone System for Windows www 3cx com The following figure shows the resulting flow at this point Main QueryPayments Stark Page x Z hain Flow S Error Handler Flow t Disconnect Handler Flow 8 Now we are going to configure the Loop component content We want to play a wav file for each retrieved payment From the Call Related Components section drag the Prompt Playback component and drop it into the
12. HttpRequestType A i POST The time to wait while trying to connect to the Web Server before Timeout returning the Server Timeout condition in seconds Zero means to wait forever A list of parameters used when performing the request Each parameter can be a constant value a variable or an expression The name of each parameter is the name of the field that will be sent to the web server query string or form data Table 20 Web Interaction component Input Properties Parameters Page 45 3CX 3CX Phone System for Windows Web Interaction configuration URI Timeout es HTTP Request Parameters Screenshot 34 Web interaction configuration Www 3cx com HTTP Request Parameter names are constant string values and do not require quotes HTTP Request Parameter values can be set using an expression When the web interaction ends execution continues on the following component The web interaction component exposes the following output properties for further query Web Services Interaction HttpStatusCode Contains the HTTP status code returned by the web server The number 200 OK means that the request was processed successfully Content When HttpStatusCode 200 this property contains the response from the web server as a String This component allows executing simple xml Web services It performs a web request using the POST method to the specified URI and WebServiceName for example http www example
13. IsValidDption_ 5 IsValidOpton_6 a Name Please specty the name of the component It has to be unique in the entire flow Screenshot 42 Modifying the name 7 We need a main menu with 3 options 1 Visa 2 Master 3 Amex so we are going to add a new option To perform this operation right click on the mainMenu component and execute the Add Option 3 menu command from the context menu E 3CX Voice Application Designer Beta CreditCard File Edit View Build Debug Tools Help ib K N Call Related 3i User Input dh Prompt Playback P Record Transfer lo Disconnect Call Control Structures Conditional Ae8 Variable Assignment 31 Increment Variable 3 1 Decrement Variable 5 Loop 2 Exit Callflow Advanced al Cryptography Fy Database Access E Mail Sender S External Code Execution 7 File Management A Socket Client Web Interaction Web Services Interaction User Defined Components 3 Main Flow Option 1 i Drag and drop components here mainMenu A 123 Option 2 H Drag and drop components here EN Error Handler Flow Disconnect Handler Flow CA configure Add Option 0 mh Add Option 4 Add Option 5 Drag and drop l components here Add Option 6 l Add Option 7 Add Option 8 Add Option 9 Add Option Add Option E 2 CreditCard a p Callflows 7 Main flow INGOY BME Name mainMenu AllowBargeln True
14. Loop ce tiarmferT Operator 2 Exit Callow S s Advanced fa Cryptography Database Accett lt gt E E Mail Sender E Estemal Code Execution o E P File Management faz 14113 94 Socket Cient ET 9 Web Interaction Fa Web Services Interaction E Project Name Credit ard PbxConfiguratiorP 5485 PbexDeploymertLii http locathost 5484 V48 PoxDownloadDeb hitp localhost 5484 V4 PbuGetDebugticN http localhost 5484 V PbxSewer localhost Variables Collection Name The name of the project 4 Now we are going to add a message to be played at the end of the Main callflow From the Call Related Components section drag the Prompt Payback Component to the Main callflow and drop it at the end of the callflow From the Properties window modify the component name to goodBye The following figure shows the resulting callflow PerloimP ayment comp QuerPayments comp RequestCiedtCardNumber comy Conditional ae a gt R Master AB Variable Assignment s Timeout or Invalid Option LE Master comp 21 Increment Variable lgt Hy y 8 Visa comp 1 Decrement Variable Loop C parier oDperator 2 Eut Callow j D fa Cryptography ar Databace Access El E Mail Sender Extemal Code Execution METAS Z 5 2 P File Management ezia 53 By Socket Chert G S Web Interaction Descnpton Web Services Interaction Enabled True User Defined Components El Prompt Playback dE Amex j m a AlowBargeln True L Mas
15. Loop component Name it playPayment Configure the Prompts by pressing the E button and entering the following information Prompt Collection Editor Members PaymentPrompt properties H PayroertPrornpt F SS E Audio File Prompt AE Payment war ka E Prompt Mame PaymentPrompt sai gt emos 9 Now from the Control Structures Components section drag the Variable Assignment component and drop it after the playPayment component From the Properties window change the recently added component name to Page 66 30X 3CX Phone System for Windows www 3cx com incrementRecordNumber On the Expression Editor enter the following information Expression Editor O Javascript Expression O Variable 2 VAD Expression VAD Expression L Tg G E A We could use an Increment Variable component to do this but this is just to show how to create a more complex expression 10 Configure the Variable Name by clicking on the LS button and choosing the following value from the Variable Selector Variable Selector a Pa callflow Cs CurrentRecord We have completed the configuration of the QueryPayments component Designing PerformPayment 1 From the Project Explorer window double click on the PerformPayment component in order to open it 2 We want the user to enter the payment amount so we need to ask for it using a User Input component 2 1 From the Call Related Components section dra
16. Property Description Beep If true a tone is emitted just prior to recording The list of prompts to play before recording available prompt types Prompte are described in Prompt Types MaxTime The maximum duration to record in seconds FinalSilence The interval of silence that indicates end of speech in seconds TerminateByDtmf If true any DTMF key press will stop the recording SaveToFile If true the recorded audio will be saved to the file specified by Page 31 30X 3CX Phone System for Windows www 3cx com Property Description FileName The value can be an expression The name of the file where the recording must be saved Only valid when SaveToFile evaluates to true The value can be an expression Table 8 Record component Input Properties FileName These input properties can be set using the configuration form activated from the context menu at the designer or the link in the properties window Record configuration Emit beep just prior to recording Terminate by DO TMF as eae Po EA Screenshot 23 Record configuration The Save to file and File Name input properties can be set using an expression In order to create an expression for those properties press the Expression Editor Button on the right side of the text box Be aware that in order to enter constant values you need to add quotes For example write Some Text instead of Some Text When the recording ends execution contin
17. SQL Statement insert into PAYMENTS DESCRIPTION AM DUTT CREDIT CARD NUMBER values Telephony payment 11 404 CreditCard umber callflowt CreditCardNumber 3 3 Now we are going to add the message to be played if the payment is successfully saved to the database From the Call Related Components Page 68 30X 3CX Phone System for Windows www 3cx com section drag the Prompt Playback component drop it into the Valid Input branch and configure the name and the Prompts Sigl File Management SubsequentPromo Collection 24 Socket Chere hd Web Interaction TmeoutPrompts Collection Web Services Interactio B Timeout Uzer D fined Frnaigthmeot 2 43 Te Diga meot z teDagiTimecu 3 3 Master E User Input 7 PertomPaymeri Name inputAmount 3 QueryPayment AlowBargeln True 8 RequestCredkCardumber Retna it Name Please specily the name of the component It haz be in the entire Bow ManFlow jp EmorHander Flow Disconnect Handler Flow Ready 4 If the user does not input a valid amount we just play a prompt and disconnect the call 4 1 From the Call Related Components section drag the Prompt Playback component and drop it into the Invalid Input branch and name it sorry 4 2 From the Call Related Components drag the Disconnect Call component and drop it into the Invalid Input branch The following figure shows the resulting flow for the PerformPayme
18. UserlnputResult InvalidDigits the user entered an invalid digit or less than MinDigits in the last attempt UserlnputResult ValidDigits the user entered valid digits between MinDigits and MaxDigits optionally terminating the input with the StopDigit e Buffer the digits entered by the user including the StopDigit if it was entered by the user Prompt Playback This component allows playing a list of prompts Each prompt of the list can be of the types described in Prompt Types This component has the following input properties Property Description AllowBargeln True to allow the prompts to be barged into False otherwise Prompts The list of prompts to play when the component is executed Table 7 Prompt Playback component Input Properties When the prompt playback ends execution continues to the following component The prompt playback component does not expose any output properties after its execution Record This component records audio from the caller Before recording the list of prompts specified is played to the end user If the Beep property is set a beep is played to the user after the prompts and before starting recording The recording continues until Max Time is reached a silence is detected with FinalSilence length or the end user presses a DI MF key when the TerminateByDtmf property is set The recorded audio can be automatically saved to a file This component has the following input properties
19. Windows www 3cx com Variable Selector a Pa Gallo c A V aiz 4 The buffer will be stored into the CreditCardNumber public output property 5 If the user does not enter a valid credit card number we will play a prompt message and disconnect the call 5 1 From the Call Related Components section drag the Prompt Playback component drop it into the Invalid Input branch and name it sorry 5 2 From the Call Related Components drag the Disconnect Call component and drop it into the Invalid Input branch The following figure shows the resulting flow for the RequestCreditCardNumber component J Recoid KL Tander Lo Disconnect Cal Control Structures Pe tormPaymert comp 31 Decrement Variable 5 Loop 2 Ent Calllove Advanced ia Ceyptocraphy E Databare Acces E E Mail Sender S Extemal Code Execution i 41 a xj 2 Fie Management Enl Fp Socket Cent 5 File P Web Interaction Nome RequestCreditCardN umbe Web Services Interaction Vatiebles Collection User Defined Components B Misc w Annex 48 Master 8 PeitormPaymert 8 QueryPaymern RequettCrectCaidhumn Name The name of the file Mein Flow S Emor Handler Flow Disconnect Handler Flow Ready We have configured the RequestCreditCardNumber component Page 71 30X 3CX Phone System for Windows www 3cx com Error Handler for the Visa Component As an example we are going to configure the Error Handler Fl
20. Workspace In this chapter we describe the workspace of the 3CX Voice Application Designer The designer has a complete set of editing functions including multilevel undo and redo commands for cutting copying pasting and deleting components commands for enabling disabling expanding and collapsing components and zoom level and navigation tools It also allows printing flows previewing the output before printing The VAD IDE consists the main designer work space in the centre of the dialog and a set of docking panels When a Project is created or opened a new tabbed document is shown containing the Start Page The Start Page contains common tasks to be performed on a Project like opening files creating callflows or components or building or deploying the Project Another tabbed document is shown each time you create a call flow The Designer At the centre of the 3CX VAD is the actual designer which is shown when you open or create a project or component The designer consists of one or more tabs with Call flows A Call flow is a sequence of built in or user defined components You can drag components from the toolbox and drop them into the designer in the Page 15 30X 3CX Phone System for Windows www 3cx com desired position Once a component has been placed into the designer the user can change its properties using the Properties Window or the configuration form There is also a Start page which lists common tasks Naviga
21. com ExampleWebServiceName using the provided parameters This component has the following input properties Property Description URI The URI where the web service is located WebServiceName The name of the method to invoke The time to wait while trying to connect to the Web Service before Timeout returning the Server Timeout condition in seconds Zero means to wait forever The list of parameters to send when invoking the web method Each parameter can be a constant value a variable or an expression The Parameters name of each parameter is the name of the field that will be sent to the web service as form data Table 21 Web Services Interaction component Input Properties Page 46 30X 3CX Phone System for Windows www 3cx com Those input properties can be set using the configuration form activated from the context menu at the designer or the link in the properties window Web Services Interaction configuration URI Timeout oca Web Service Parameters Screenshot 35 Web Services Interaction configuration Web Service Parameter names are constant string values and do not require quotes Web Service Parameter values can be set using an expression When the web services interaction ends execution continues on the following component The web services interaction component exposes the following output properties for further query e Result contains the root element content extracted from the XML returned by th
22. different MinTryCount The list of prompts to play when the user does not enter any digit The same MinTryCount logic applies After playing the timeout prompt the main prompt will be played too initial or subsequent prompt TimeoutPrompts The list of prompts to play when the user enters invalid digits The same MinTryCount logic applies After playing the invalid digits prompt the main prompt will be played too initial or subsequent prompt Table 6 User Input component Input Properties InvalidDigitsPrompts User Input configuration Allow Barge In Max Retry Count First Digit Timeout secs Inter Digit Timeout secs 3 5 3 2 Final Digit Timeout secs Grammar Specify Grammar using the 30x Phone System grammar format Specify Grammar manually Min Digits 10 Max Digits 20 Stop Digit DigitPound Valid Digits Digit 0 Digit 6 Digit 1 Digit 7 Digit 2 Digit 8 Digit 3 Digit 9 Digit 4 C Digit Digit 5 Digit Screenshot 22 User input configuration Page 30 30X 3CX Phone System for Windows www 3cx com When the user input ends execution continues on one of its branches Valid Input or Invalid Input The user input component exposes the following output properties for further query e Result one of the following values UserlnputResult Timeout the user didnt enter any digit in the last attempt
23. more of the components The output could not be generated The user must correct the errors first e Warnings this is something that could be wrong but the output can be generated The user should pay attention to this message and verify if he must perform some corrective action e Messages this is information that may be considered by the user but it is not an error and the output can be generated Every message includes information related to the component to review including the file location Double clicking or pressing lt Enter gt on a message the file referred by itis automatically opened The VAD offers the possibility to filter the list of messages by pressing the button of the desired message type Page 22 30X 3CX Phone System for Windows www 3cx com Output Window Output az Budd process started for project TrediCard in debug mode 2 Deleting previous files and folders from the output folder Compiling file Main flow C Temp GAD CreditCard C aiflows M ain flows Audio file T Temp GAD_T est_Components CreditCard Audio Goodbye wav spactied in component goodB ve was not found Audio file C Temp GAD_Test_Components CreditCard Audio MainMenu way specified in component manMenu was not found Compiling file Amex comp C T emp GAD CrectCard Components Amex Amex comp udo file T Temp GAD_Test_Components CreditCard Audio SonyNotReady wav specified in component sorryNotReady was not found
24. of any type and returns a Boolean indicating if the first is less than the second Receives two parameters of any type and returns a Boolean indicating if the first is less than or equal to the second Concatenates every string parameter and returns the resulting string Can have from 2 to 20 parameters Receives two parameters The first is a string to cut The second is the number of characters to cut Returns a string that is the first N characters of the original string Receives three parameters The first is a string to cut The second is the start position where the cut must start using a zero based index The third is the number of characters to cut Returns a string that is the specified substring of the original string Receives two parameters The first is a string to cut The second is the number of characters to cut Returns a string that is the last N characters of the original string Receives a single string parameter and returns another string that is the original string with upper case Receives a single string parameter and returns another string that is the original string with lower case Receives no parameters and returns the current date and time Receives a single string parameter and returns its length as a number Sums every numeric parameter and returns the result Can have from 2 to 20 parameters Returns the negative number of the single numeric parameter received Multiplies every numeric parameter a
25. or the link in the properties window External Code Execution configuration External Code Type JavaScript Library File Object Type Parameters Screenshot 31 External Code Execution configuration The Library File is selected from a drop down list The list contains every library file or JavaScript document in the Libraries folder of the project Parameter names are constant string values and do not require quotes Parameter values can be set using an expression In order to create an expression for a parameter press the ellipsis button on the last column of the grid Be aware that in order to enter constant values you need to add quotes For example write Some Text instead of Some Text Page 42 30X 3CX Phone System for Windows www 3cx com When the external code execution ends execution continues on the following component The external code execution component exposes the following output properties for further query e ReturnValue contains the value returned by the function or method called File Management This component allows reading or writing text files The reading operation is performed line by line It is possible to specify the index of the first line to be read starting at zero and the amount of lines to be read It also can be set that all the lines are read until reaching the end of the file The writing operation allows opening the file in three modes Append Create and Open
26. performed comparing the hash values When the DES algorithm is used the key must be an 8 characters String On the other hand for the TripleDES algorithm the key must be a 16 or 24 characters String The result of the encryption and the MD5 hash calculation is a bytes array The VAD needs to encode the bytes array in order to store them as a String There are two possible encoding formats Hexadecimal and Base64 The hexadecimal format consists of the representation of each byte as two characters that represent the byte value in hexadecimal from 00 to FF The Base64 format is used to encode the bytes according to that world wide known format http en wikipedia org wiki Base64 The text to be processed can be a constant value or taken from a variable or an expression that returns a String This component has the following input properties Property Description Algorithm The algorithm to use It could be DES TripleDES or HashMD5 The encoding format to use in order to transform the encrypted stream into text When encrypting data this is how the result is pawn codified When decrypting data this is how the input text arrives It could be Hexadecimal or Base64 Aion The action to perform Only valid when Algorithm is DES or TripleDES It could be Encrypt or Decrypt Key The secret key to be used for the symmetric algorithm Only valid when Algorithm is DES or TripleDES It must have a length of 8 Page 37 30X 3CX Phone S
27. the Visa folder and choose New Component Name it Visa comp e Right click on the Common folder and choose New Component Create the following components PerformPayment comp QueryPayments comp and RequestCreditCardNumber comp 2 Now we are going to add the components to the main menu options of the Main callflow e From the User Defined Components Section choose the Visa component that corresponds to the first menu option and drag it into the Option_1 Then from the Properties Window select the User Component recently added and change the component name with Visa e Repeat this to insert Master and Amex components into Option _2 and Option_3 respectively Remember to modify their names from the Properties Window 3 Now we are going to configure the Timeout or Invalid option branch From the Call Related Components section drag the Transfer Component and drop it into the Timeout or Invalid option branch From the Properties window select Transfer Page 60 30X 3CX Phone System for Windows www 3cx com name and type transferToOperator The following figure shows the resulting callflow F Record LL Transtes B Common PestoimPaymert como C Disconnect Cal Queso Fapmenti comp gt Control Structwes RequesiCiediCardNumber comp gt Conditiona gt ps T TT i Moses a Vadablo Ansignevert f Timeout or Invalid Option 12 Master comp Visa 21 Incsement Variable e 4B Visa comp Decrement Vanable i 5
28. 3cx com Start Page Main Amex QueryPayments X E Option_1 h 2 Option_2 i Timeout_or_Invalid_Option i d B 1 lt 1 E El It po 1 H l i H H lt l HE x x S SL 1 i i HE E Z Main Flow 9 Error Handler Flow Disconnect Handler Flow The Error Handler Flow if an error occurs in a callflow this error handler flow ends the execution A user defined component is always executed from a callflow or another user defined component containing it So when an error occurs while executing a callflow the error handler of the callflow is executed and then the call is finalized But when an error occurs while executing a user defined component the error handler of the user defined component is executed and then the error handler of its parent is executed and so on until executing the error handler of the callflow that received the call It behaves like a stack unwind executing every error handler upwards until one handles the error Then the main flow of the parent is executed For example a call arrives starts executing Callflow1 which calls Componenti which calls Componente If an error occurs there the error handler of Component2 isexecuted for example not handling the error then the error handler of Componenti is executed for example handling the error here and finally execution continues on the main flow of Callflow1 because the error was handled on achildren
29. 8 FROMM Fe U 0 AG T 48 Stes O neni ese RET re naan ee PIT Te Meal Erneg MEM ee OEE ne ey en ne een ee 48 o TTT 49 EL al la 81 cases eat ar ne aise tans hs EO ure area aren aceite 49 KT OOM ADIN cardio oi ei 50 Database eT 50 EMail Sendol TTT 51 External ee Le He 51 FEN MV an 51 OCI CE NST ad 51 Web Interacion ta 52 Web Services InteractiON occocccconccoonoconnononconocnnnoconnnnonnnnnnnnnononnnnnnnnnnnnnnnnnnnnnnns 52 A SS NCTC RT nO E Onan eg a 53 A tinea pout aceistaiaas TTT 53 BUNGING ii Debug MO a 53 calil w debugging casita ali 53 Sample APplICalON TTT 57 INTO da 57 Creating and configuring the Callflow cococconocoonccoonononnonocnononononnnnnononnnnonnnos 57 Creation of the Project and the Main Callflow occonocconoconncnonnononnonornanonon 57 Configuring the Main CallflOW ocooconocconccooncconnonocnonononnnconnnconnnnoncnnonnnnoronnnnnns 60 Configuring User Components variables ee e e eee e e ee 62 Designing User COmpOne is HHT 63 Designing QueryPayments Component cceceesececeeeeeeeeeeeeeaeeeeeeeeaeeeseeeeaeaeeeeass 63 Designing h S ZTS S U lanes 67 Designing RequestCreditCardNumber component cccceceeeececeeeeeeeeeeeeeeeeeseeees 70 Error Handler for the Visa COMPONENL cccccecececeecececeeeeeeeeceeeeaeeeseceeeeesesseeeeesenes 72 30X 3CX Phone System for Windows www 3cx com Introduction What is 3CX Voice Applicati
30. Input component Indicates if the transfer must be done using the attended mode a second call is made and the VoiceXML interpreter remains in the TransferMode middle of both legs or blind mode the connection is disconnected fromthe VoiceXML interpreter The bridge mode is useful for example when you need to control the duration of the call The time to wait while trying to connect the call before returning the Timeout no answer condition in seconds Only valid for Bridge transfer mode Blind transfer mode disconnects immediately The time that the call is allowed to last in seconds or 0 if no limit is imposed Only valid for Bridge transfer mode Table 9 Transfer component Input Properties MaxCallTime Those input properties can be set using the configuration form activated from the context menu at the designer or the link in the properties window Transfer configuration ES Transfer Mode Ia Sei Screenshot 24 Transfer component configuration The Destination input property can be set using an expression In order to create an expression for that property press the Expression Editor Button on the right side of the text box Be aware that in order to enter constant values you need to add quotes For example write Some Text instead of Some Text The Destination input property can be set choosing an existing extension from 3CX Phone System When the transfer ends execution continues on the follow
31. Screenshot 17 The Output window The output window shows the actions performed by the compiler during the build process For example the VAD informs when the build process begins the build mode Debug or Release when a file compilation begins etc Debug Window 101 Fram_101_T0_9939_Mer_989_H0 0 a DatabaseServer localhost a DatabaseName CreditCard Screenshot 18 The Debug window The debug window shows variable values while a callflow is being debugged Variables changed during the execution of the last step are shown in redcolor while unchanged variables are shown in black color Page 23 30X 3CX Phone System for Windows www 3cx com Components Introduction Components are the basic building blocks of a call flow and perform basic actions such as playing of a prompt recording a call asking for user input and so on There are two types of components one with branches such as the Menu component or without like the Disconnect Call component The Properties window shows input properties for the selected component Some components have variables which are exposed after execution as output properties The public properties of user defined components can be used as input and output A lf a red sign appears at the right corner of a component the component has invalid property values Click on it to get an explanation Prompt Types Many VAD components use prompts in order to perform the desired ope
32. bject right click and select the Add Branch menu command 3 Now we are going to configure the components for this branch First from the Properties window modify the Error Type for the Error Handler Branch to error databaseaccess Then from the Components section drag and drop the Transfer Component into this branch 4 Now select the Transfer component and from the Properties window modify the name to transferToOperator Then change the destination with the proper operator number Page 72 3CX ik Uses Input GE Promot Playback J Record KL Transter amp Disconnect Cal Control Structures Increment Vanable 2 Ext Callos Advanced i Cyptogiaphy IQ Dalabate Access E EMail Sender D Extemal Code Execution 7 File Management Ry Socket Client P Web Interaction Web Services interaction User Defined Components Amex dE Master LE PertomPayment 8 QueryPaymerts dE RequesiCiediCardNumbee TS Visa Ready 3CX Phone System for Windows IT Man Flow Ena haaa Pow Disconnect Hande Flow www 3cx com 3 oa B Comporent Amex dE Amex comp Common PerfommPayment comp QueryPaymerts comp RequesiCiediC a dNumber com E Moste LE Master comp amp Visa 3 Vise comp lt gt i oF x RT lt laste E File Name Visa Variable Collection El Misc Name The name of the fis 5 If any database access error occurs in the Visa component or any of
33. by the parent callflow or component and can be used to set parameters and customize the component behavior Private variables are only visible internally at the user defined component A Variables can be also read only or read write The list of available functions to use in a VAD Expression is as follows Function Description Performs a logical AND between every parameter returning AND a Boolean value as a result Can have from 2 to 20 parameters Performs a logical OR between every parameter returning a OR Boolean value as a resul Can have from 2 to 20 parameters Receives a single Boolean parameter and returns another BS Boolean that is the negation of the provided parameter Page 26 3CX 3CX Phone System for Windows Function EQUAL NOT EQUAL GREAT_THAN GREAT_THAN_OR_EQUAL LESS_THAN LESS_THAN_OR_EQUAL CONCATENATE LEFT MID RIGHT UPPER LOWER NOW LEN SUM NEGATIVE MULTIPLY DIVIDE ABS GET_TABLE_ROW_COUNT Www 3cx com Description Receives two parameters of any type and returns a Boolean indicating if they are equal Receives two parameters of any type and returns a Boolean indicating if they are not equal Receives two parameters of any type and returns a Boolean indicating if the first is greater than the second Receives two parameters of any type and returns a Boolean indicating if the first is greater than or equal to the second Receives two parameters
34. can create custom components with custom functionality Document conventions The following conventions have been established to improve reading comprehension Bold It is used to highlight key words or concepts Bold It is used to identify the names of the product It is used to establish application code file names classes and or DB tables L lt is used to remark a paragraph that contains additional Courier Type information that should be considered n a Not applicable Page 2 30X 3CX Phone System for Windows www 3cx com Installing 3CX Voice Application Designer System Requirements The 3CX Voice Application Designer requires the following e Windows XP Pro Vista 2003 server or 2008 server e NET Framework version 2 0 or higher e 512 Megabyte Memory or higher Pentium 4 processor or up e 3CX Phone System build v8 0 9357 or up Run set up The following steps describe how to install the 3CX Voice Application Designer in your computer e Run set up by double clicking on the set up file Click Next to start installation e Select the installation location and choose to install the application for the current user or every user in the computer 3CX Voice Application Designer will need a minimum of approximately 15 MB of free hard disk space You will need to reserve additional space to store projects Click Next to continue e Click Next to confirm the installation Setup will now copy all fil
35. component Page 17 30X 3CX Phone System for Windows www 3cx com Start Page Main Amex QueryPayments Y X i nt ah Z Main Flow EN Error Handler Flow Disconnect Handler Flow The Disconnect Handler Flow if the call gets disconnected in a callflow when the disconnect handler flow ends its execution the whole execution ends On the other hand if the call gets disconnected on a user defined component document when the disconnect handler flow ends its execution execution continues on the parent document disconnect handler flow The behaviour is similar as used for error handling In this case the call is disconnected For example a call arrives starts executing Callflow1 which calls Componenti which calls Component2 If the connection is disconnected there the disconnect handler of Component2 is executed then the disconnect handler of Componenti is executed and finally the disconnect handler of Callflow1 is executed The main flow is not executed again for this call Start Page Main Amex QueryPayments X a Aa a Disconnect Handler for Main y Z Main Flow Sa Error Handler Flow Disconnect Handler Flow Page 18 30X 3CX Phone System for Windows The following table clarifies these concepts Event description Error handled on error handler flow Error not handled on the error handler flow Connection disconnected Callflow document Whole execution ends after executing the local error han
36. d Settings ngshMy Docume General baat Rust 5485 SOO Templates Default PB Configuration Port 5485 Menu Default PEs Deployment URI htt localhost 5494 6 D Deploy aspx Prompt Playback l cad Default PB Download Debug Files URI http localhost 5464 V40 DownloadDebug Transfer Default PES Get Debug File Names URI http localhost 5484 40 GetD ebuglntoFil User Input Cryptography o Database Access EMail Sender External Code Execution File Management Socket Client oo Web Interaction Web Services Interaction Screenshot 2 Options Projects General Page 4 3CX 3CX Phone System for Windows www 3cx com After you have installed 3CX VAD you need to specify the location of 3CX Phone system 1 Go to Tools gt Options from the main menu Here you can configure general application parameters not related to a specific Project 2 Configure Project Default Folder this is the default folder used when a user opens or creates a Project Default PBX Server this is the IP address or FQDN of the server where the 3CX Phone System is installed This information will be automatically set in each Project when it is created Default PBX Configuration Port this is the port number of the server where the 3CX Phone System is listening for configuration requests This information will be automatically set in each Project when it is created Default PBX Deployment URI this is the URI where the project m
37. displayed when you right click on it Page 8 30X 3CX Phone System for Windows www 3cx com 5 To change the menu prompt edit the InitialPrompts property from the Properties window The Prompt Collection Editor will be shown There you may add an AudioFilePrompt and select an audio file from the drop down list This list shows the names of the files you have in the audio folder of the project You need to record the prompt and copy the file to that folder in order to get it listed here Audio files can be wav or mp3 format Prompt Collection Editor Members MainkienuPrompt properties T MainktenuPrompt Z Audio File Prompt ES ManMenuPrompti way Mame MainkHenuPrompt sai now 7 6 You may want to add prompt messages to play when the user enters an invalid option or does not input anything You can do thatby changing the InvalidDigitsPrompts and TimeoutPrompts properties for the Menu component Page 9 30X 3CX Phone System for Windows www 3cx com Hat DE ar RENTO TY 22 im ee i o x Start page MainFlow E a Call Related Ey Menu ii User Input E Prompt Playback P Record CZ Discormect Call Control Structures Condtional Act Vanable Assignmert t Increment Variable 1 Decrement Variable 45 Loop 2 Exit Callfiow Advanced ia Ciyptography Gp Database Access E E Mal Sender External Code Execution amp File Management FP Socket Chert PP Web Inte
38. dler flow Whole execution ends after executing the local error handler flow Whole execution ends after executing the local disconnect handler flow Table 2 Error and disconnect handling behavior The Docking panels Www 3cx com User defined component document Execution continues on the parent document main flow after executing the local error handler flow Execution continues on the parent document error handler flow after executing the local error handler flow Execution continues on the parent document disconnect handler flow after executing the local disconnect handler flow The docking panels contain important functions that allow you to set properties and more for your project Components r lt Call Related B User Input dk Prompt Playback F Record E Transfer fo Disconnect Call Control Structures Conditional AaB Variable Assignment HI Increment Variable H Decrement arable Loop OF Exit Callflow lt Advanced ral i Cryptography liar Database Access E E Mail Sender External Code Execution Ed File Management E Socket Client P Web Interaction Web Services Interaction User Defined Components 3 Amex 3 Masher 3 PerformPayment 1 Quen Payments 13 RequestCreditCardhlumber 3 Visa Screenshot 13 The components toolbox Page 19 Www 3cx com 30X 3CX Phone System for Windows Components Toolbox The toolbox contains a set of built in components Each
39. e web service If the return value is a complex XML this property will contain the complex XML except the removed root element In simple xml web services the answer is usually a plane value into the root element of the response this component is designed to be used when executing simple xml web services User Defined Components User defined components are automatically added to the toolbox They can be used to group common functionality reduce diagram complexity and as a localized error or disconnect handler Public properties exported by these components are automatically shown in the Properties window The user can assign an expression to those properties in order to customize the component behaviour Be aware that in order to enter constant values you need to add quotes For example write Some Text instead of Some Text The component can internally update properties values so they can be used as component output too Page 47 3CX 3CX Phone System for Windows www 3cx com Default Component options You can change the default options of the various components from the Tools gt Options menu The configured values will be used when dragging a component from the toolbox and dropping it into the designer Projects Allow Barge In General Build Timeout secs Recent Projects Component Templates Menu Max Retry Count Valid Options Prompt Playback Record Transfer User Input Cryptography Databa
40. e concepts used in this section are explained in detail in the following chapters Creating the project Deploy 9 Database A E E Mail Sende m 2 37 Extemal Code Execution E Mise F a Name SimpleE xample P Wed Interaction PbxConfigurationP 5485 Web Services Interactior PhD eploymenti n http localhost 5484 VA G PbxDownloadDebt http Aocalhost 5484 VA T Phial ebudFila http localhost 5484 VA PoxServer localhost Variables Collection Screenshot 3 Creating a project The first step to create the project To do this 1 Click File gt New gt Project 2 Enter a project name and location and click Save 3 The project will be created with default properties If you need to change these select the project in the Project Explorer The Properties window below it will show you its properties and let you change them Page 6 30X 3CX Phone System for Windows www 3cx com The application will create a folder to store audio files for the project and another folder to store library files for the project It will also create a folder to generate the output of the building process in debug and release modes The project will be created according to the default properties for a project You can change this from Tools gt Options gt Projects gt General Creating a callflow 4 es P V R Pr k J x D uy z DO x StartPage Main zX Project Explorer aq xj E SimpleExample L Main lov g
41. ease mode when the project is built in release mode the generated output does not generate debug information files The execution of a generated application in release mode is more performing and is suggested for production environments In order to build the project execute the menu command Build gt Build All This option builds the project in both configurations debug and release The output window will show compilation progress and the Error List window will show any error warning or important message that you might need to see Deploying the project to 3CX Phone System Once you successfully built the project in some configuration debug or release you need to deploy it The project is deployed using the server configured in project properties To deploy execute the menu command Build gt Deploy The deployment dialog will appear allowing you to select the desired configuration Then press the Deploy button Uploading c 2 Uploading file MamnF lows ven L Cancel Screenshot 10 Deploying your voice application After the deployment has been completed you will see the callflow registered in 3CX Phone System as a Digital Receptionist You can use the 3CX management interface to choose when to activate this callflow for example when an inbound call arrives from the PSTN Page 13 30X 3CX Phone System for Windows www 3cx com Executing your voice application When deploying a project each callflow i
42. ents User Defined Components These are components created by the user that are automatically added to the toolbox Table 3 Component description For further information about all the components of the VAD please refer to Chapter Components Page 20 30X 3CX Phone System for Windows www 3cx com Project Explorer Window This docking bar allows you to easily explore the whole Project Each Project is composed by callflows and user defined components which can be grouped into folders The entry point of a call is always a callflow Arce S terco Components E Lomm or PertormPayment comp 3 QuerPaymente comp Folders 4 35 RequestCreditCardNumber comp C Master 43 Master comp Visa 43 Vise comp Screenshot 14 The project explorer The Project Explorer allows performing the following actions e Save the Project or file e Rename the Project folder or file e Close the Project or file e Create a new folder callflow or component e Add an existing callflow or component e Remove an existing folder callflow or component e Build and deploy the Project Each of those actions can be performed by selecting the option in the context menu or using shortcut keys Files and folders can be moved to other locations within the Project using drag and drop l the VAD cannot find a file or folder referenced by the Project it is showed in red font with a hint indicating that the file or folder is missing Properties Wind
43. es to the destination folder To complete the install click Close e lf you are installing the VAD on a remote computer i e not in the computer where 3CX Phone System is installed you will need to edit the 3CX Phone System configuration file to allow remote access to the configuration To do this follow the instructions in the next section Allowing remote access to the configuration After you have installed 3CX VAD in a remote computer you need to allow remote access to the configuration of 3CX Phone System 1 In the computer where 3CX Phone System is installed open the file 3CXPhoneSystem ini usually located in C Program Files 3CX PhoneSystem Bin 2 Find the setting confNIC and change its value to 0 0 0 0 confNIC 0 0 0 0 3 Restart the service 3cx configuration Service Page 3 30X 3CX Phone System for Windows www 3cx com Activating 3CX Voice Application Designer If you have purchased 3CX Voice Application Designer then you can activate your license by going to the Tools gt Activate License License Activation License Kep Customer Details Cancel Enter your license key Company Contact Name E mail Telephone and Country and click on Activate to activate your license This information will be sent to our license key server and your license key and installation will be activated Configuring Phone System location Options gt Projects Projects Default Folder C Documents an
44. g the User Input component and drop it into the flow Page 67 30X 3CX Phone System for Windows www 3cx com di Paner Playback J Recod KL Troneter C Disconnect Call Control Structues Conditional Act V arie Assigriment Et Increment Venable Decamert Variable 5 Loop Ext Cattiow Advanced Ciyptography E Database Access E E Met Sender Z Extemal Code Execution 7 Fdo Management Bp Socket Char P Wed Interaction Web Services Interaction User Defined Components dE Amex PertormPayment comp QuegPaymerts come RequestCiediC a dNumber come 3 Master E Timeout S PestormPagrnent naba 2 2 bici FursiDighT mecul 5 dE RequesiCiediCadNumber sea ies ME View Name inputAmount AllonBargeln True Maie 3 el Please specily the name of the component It has lo be ungue in the erie flow Z Main Flow Ena Harder Flow Disconnect Harder Flow Bm LS Output Debug Ready 3 If the user inputs a valid amount we want to save the information to the database and play a prompt message to the user 3 1 For the Valid Input branch from the Advanced Components section drag the Database Access component and drop it into this branch Select the recently added component and from the Properties window press Configure 3 2 Input the following information Database Access configuration Database Type Server Database DataSource User Name Password Statement Type Timeout secs
45. gure it properly The following figure describes the Callflow diagram that we will create Figure 1 Example Callflow diagram Creating and configuring the Callflow Creation of the Project and the Main Callflow 1 File gt New Project Select the folder where you want to create the Project and enter the name Credit Card Page 57 30X 3CX Phone System for Windows www 3cx com 2 Press Save in order to create the Project 3 We are now going to create a new Folder within the Project where all the Callflows will be stored From the Project Explorer right click on the name of the Project CreditCard Choose New Folder and name it Callflows y E Promect Explorer S L xj Q Dedirsd y Map llaw Build amp Deploy WE Debug Buld Bad aisa Bukj Budd All Deploy Name The name ol the folder Ready Screenshot 40 Creating a new folder for the call flows 4 Now we are going to move the automatically created Main callflow into the recently created folder To do this drag it and drop it into that folder 5 We need to add the main menu to the callflow Double click on the callflow file From the Call Related Components section click and drag the Menu component and drop it at the beginning of the Main Callflow a E CedtCard g Calllowes Py Manilow dy Prompt Playback J Record CC Trarste e Disconnect Call d Timeout or invald Option Drag and diop components here
46. has the following input properties Property Description An expression that must be evaluated to true in order to execute the contained componenis Table 13 Loop component Input Properties Condition When the loop ends execution continues on the following component The loop component does not expose any output property after its execution Exit Application This component allows exiting the current callflow also disconnecting the call It has no special input properties and does not expose any output property after its execution Page 36 30X 3CX Phone System for Windows www 3cx com Advanced Components Advanced C Cryptography ligt Database Access El E Mail Sender c External Code Execution Ed File Management Eh Socket Client Web Interactor EN Web Services Interaction Screenshot 27 Advanced components Cryptography This component allows executing cryptographic algorithms The supported algorithms are DES and TripleDES for both encrypting and decrypting and the MD5 algorithm that performs hash calculation DES and TripleDES algorithms allow encrypting text using a known key Then they perform the decryption using the same key The hash calculation is a one way algorithm and the original value cannot be obtained again The hash calculation is used to validate passwords The stored information is the hash that was calculated for the original text that was entered by the user and the validation is
47. her 4 times and when the invalid input count or timeout count reaches 5 the user input component will finish its execution Page 29 30X 3CX Phone System for Windows www 3cx com Property Description The time to wait for the first digit before playing the specified timeout FirstDigit Timeout l prompt in seconds The time to wait for subsequent digits before playing the specified InterDigitTimeout Oe ee ae ic lle ia alae invalid digits prompt in seconds The time to wait for digits after MinDigits has been reached before FinalDigit Timeout l l g returning the entered data in seconds MinDigits The minimum quantity of digits that must be entered by the user Max Digits The maximum quantity of digits that can be entered by the user Specify the digit that the user must press in order to finalize the data StopDigit aaa uad P entry Specify what happens when the user presses N It could be a valid or IsValidDigit_N A aaia l an invalid digit InitialPrompts The list of prompts to play the first time the user input is executed The list of prompts to play subsequent times The SubsequentPrompts list contains the MinTryCount property and the list of prompts to play when the try count is greater than or equal to SubsequentPrompts MinTryCount For example setting MinTryCount 3 means to use InitialPrompts the first and the second time and use this prompts after that You may specify more subsequent prompts each one starting at a
48. ill be played too initial or subsequent prompt Table 5 Menu component Input Properties InvalidDigitPrompts Those input properties can be set using the configuration form activated from the context menu at the designer or the link in the properties window Menu configuration Allow Barge In Timeout secs May Retry Count Valid Options Screenshot 21 Menu configuration When the menu ends execution continues on one of its branches a valid option branch or the timeout or invalid option branch The menu component exposes the following output properties for further query e Result the result of menu execution It could be one of the following constant values MenuResult Timeout MenuResult InvalidOption or MenuResult ValidOption User Input This component collects information from the end user in the form of digits It handles the retry logic when the user enters an invalid digit fewer digits than expected or does not enter anything at all Its execution finalizes when a valid input is entered by the user or all the retries have been used up This component has the following input properties Property Description AllowBargeln True to allow the prompts to be barged into False otherwise Number of retries allowed for timeout or invalid digits input Each one has its own retry counter For example setting this property to 5 may MaxRetryCount allow the user to enter invalid digits 4 times stay in silence anot
49. ing component The transfer component exposes the following output properties for further query Page 33 30X 3CX Phone System for Windows www 3cx com e Duration when the transfer mode is bridge execution of the transfer component ends when the call is disconnected and this property has the duration of the call e ErrorDescription if the call can not be completed this property contains a description of the reason destination busy no answer etc Disconnect Call This component disconnects the current call It has no special input properties and does not expose any output property after its execution Control Structures Components Control Structures amp Conditional AeB V anabie Assignment 31 Increment arable HI Decrement arable 5 Loop Om Exit Callflow Screenshot 25 Control Structure Components Conditional This component allows performing an action when a condition is met The execution path is selected between many branches This component has no special input properties and does not expose any output property after its execution In order to add a branch the user must execute the Add Branch command in the Properties window or the context menu Each branch has a Condition input property That property is an expression that must be evaluated to true in order to execute the branch Branches are evaluated from left to right so the user can change the order with the Move left and Move righ
50. ing this property to 5 may allow MaxRetryCount the user to enter an invalid option 4 times stay in silence another 4 times and when the invalid input count or timeout count reaches 5 the menu component will finish its execution The time to wait for user input before playing the specified timeout Timeout prompt in seconds Specify what happens when the user presses N It could be a valid or IsValidOption_N an invalid option Valid options appear as branches in the designer InitialPrompts The list of prompts to play the first time the menu is executed The list of prompts to play subsequent times The SubsequentPrompts list contains the MinTryCount property and the list of prompts to play when the try count is greater than or equal to SubsequentPrompts MinTryCount For example setting MinTryCount 3 means to use InitialPrompts the first and the second time and use this prompts after that You may specify more subsequent prompts each one starting at a different MinTryCount The list of prompts to play when the user does not enter any digit TimeoutPrompts p The same MinTryCount logic applies After playing the timeout Page 28 30X 3CX Phone System for Windows www 3cx com Property Description prompt the main prompt will be played too initial or subsequent prompt The list of prompts to play when the user enters an invalid digit The same MinTryCount logic applies After playing the invalid digit prompt the main prompt w
51. ion is disconnected from the VoiceXML interpreter Timeout secs the time to wait while trying to connect the call before returning the no answer condition in seconds Only valid for attended transfer mode Max Call Time secs the time that the call is allowed to last in seconds or zero If no limit is imposed Only valid for attended transfer mode Automatically load extensions from 3CX Phone System when configuration starts Set to true to automatically load extensions information from the 3CX Phone System when the configuration form is opened User Input Options E Projects Allow Barge In General Build Max Bety Coumt 5 o SEE First Digit Timeout secs R ae Component Templates Menu Inter Digit Timeout secs Prompt Playback Record Transfer Min Digits Final Digit Timeout secs Cryptography Mas Digits ae E DigiPound A EMail Sender e SURI E External Code Execution Valid Digits File Management TZ Digit 0 Digit 7 Socket Client Digit 1 Digit 8 Web Interaction Digit 2 Digit 3 Web Services Interaction Digit 3 C Digit Digit 4 C Digit Digit 5 Digit E Screenshot 37 Options Component Templates User Input Allow Barge In set it to True to allow the prompts to be barged into Max Retry Count the number of retries allowed s First Digit Timeout secs the time to wait for the first digit before playing a timeout prompt in seconds or zero to use the default value In
52. itor Table 10 Variable Assignment component Input Properties Those input properties can be set using the configuration form activated from the context menu at the designer or the link in the properties window Variable Assignment configuration Variable Name Ma Screenshot 26 Variable Assignment configuration form The Variable Name input property can be set using the Variable Selector form In order to select a variable using the Variable Selector form press the Browse Button on the right side of the text box The Expression input property must be set using an expression In order to create an expression for that property press the Expression Editor Button on the right side of the text box Be aware that in order to enter constant values you need to add quotes For example write Some Text instead of Some Text When the variable assignment ends execution continues on the following component The variable assignment component does not expose any output property after its execution Increment Variable This component allows incrementing an existing numeric variable integer float or currency The selected variable must be read write in order to be incremented This component has the following input properties Property Description The name of the variable to increment It must be an existing numeric variable integer float or currency defined at Project scope callflow scope or a public proper
53. its children components PerformPayment or QueryPayments the call will be transferred to the operator We have configured the Error Handler for the Visa component Page 73
54. l AS Vanable Assignment 11 Increment Variable 131 Decrement Variable Loop oF x 2 Exit Calfiow 14 Advanced E SA Cryptography i i aad on 2 io Database Access l l f 1 SA 1 rca gt S E Mal Sender CC transterTosalas i StopDigt DigitPound Extemal Code Execution i l j i L i El General 2 Fie Management E f ji i Description Y Socket Client 5 rro True P Web Interaction aior Web Services Interaction E Prompts InihaPrompts Collection InvabdDigtPromy Collection SubsequentPion Collection TimeoutPrompls Collection E Timeout FinaDigtTimeou 2 FrstDigitTemeout 5 InterDigitTimeoul 3 E User Input Name askForDestinati AllowBargeln True MaxRetyCount 3 User Defined Componerts v Corfiquee InterDigit Timeout The time to wat for subsequent digits before playing the spectied invabd digts prompt in seconds Set it to zaro to use Z Main Flow S Eror Handler Flow Disconnect Handler Flow platform defauk v Error List Output Debug Ready 10 For option 3 we are going to make things a little more interesting We will ask for a destination number and then transfer to that number To ask for the destination number we will use a User Input component Drag and drop it under the Option 3 branch Change the component name and configure the message prompt to use Specify that valid digits are numbers from 0 to 9 and other digits are invalid star and pound Also set Mi
55. ll Related Oy Menu dh User Input DE Promot Playback ff Record TT f Disconnect Call AB Variable Assignment 31 Inctemers Variable 31 Decrement Variable e gw 3 EN i p Option 3 5 Loop l l EP Ext Caltlow l i MIN 4 E ee i i 9 mi ai w 2 Cryptogiaphy El General E Database Access Desctipbon By Socket Client manana me gt Web Interaction Web Services Interaction User Defined Components f tne z E Mail Sende l K I trensterToHelp Des a i 4 El Transfer Extemai Code Execution l i i f i Name makeOutboundC all File Management i i LL makeQutboundCail i Destination askForDestination TransteiMode Bridge MainFlow Calfiow execution path MaxCallTime The time that the cal is allowed to last m seconds amp 0 if no im s imposed Only vabd for Bridge transfer mode Z Man Flow Z Eror Handler Flow Disconnect Handler Flow Error List Output Debug Ready Screenshot 9 The voice application Page 12 30X 3CX Phone System for Windows www 3ex com Building the project The callflow is ready Now we need to build it to a VXML script that can be used by 3CX Phone System The project can be built in two modes e Debug mode when the project is built in debug mode the generated output contains code that writes debug information files when a call is being processed These files can be retrieved later by this application to show the callflow behaviour graphically e Rel
56. ment component Input Properties ReadToEnd Those input properties can be set using the configuration form activated from the context menu at the designer or the link in the properties window The configuration form for the File Management component is showed in the following figure Page 43 30X 3CX Phone System for Windows www 3cx com File Management configuration Action O Read S Write Append final CR LE Screenshot 32 File Management configuration 3 6 3 6 The First line to read Lines to read Read to end of file and Content to write input properties can be set using an expression When the file management ends execution continues on the following component The file management component exposes the following output properties for further query e EOF Reached indicates it the end of the file has been reached when Action is Read e Result contains the text that has been read from the file when Action is Read Socket Client This component allows sending and receiving data using TCP or UDP protocols The destination server and port are specified with the information to be sent If the property WaitForResponse is set it waits for a response from the server otherwise it closes the socket immediately after the information is sent This component has the following input properties Property Description ConnectionType The type of the connection to establish TCP or UDP Hos
57. nDigits and MaxDigits to a reasonable value for example between 3 and 5 When the user enters a valid input we need to transfer the call to the specified destination Otherwise we ll transfer the call to the operator Transfer configuration E Destination askForDestination Butter Ww Transfer Mode Timeout ses Max Call Time secs Transfer Audio File Screenshot 7 Transfer configuration 11 Drag and drop a transfer component onto the valid option area Now double click on the transfer component The transfer configuration dialog will appear Page 11 30X 3CX Phone System for Windows www 3cx com 12 Now click on the Expression editor button which is the fx button next to the destination field The Expression editor will appear Expression Editor O Javascript Expression Variable O VAD Expression Varable selection ae ES askPorD estination 9 EE TY Result e M ain enu IG Result a TA MenuResult ty InvalidO ption Es Timeout e Validi ption as Recordhesult gt Completed y Nothinghecorded Ey StopBysilence Screenshot 8 The expression editor 13 To make an outbound call to the selected destination select the Buffer property of Set the Transfer Mode to Bridge You can limit the call duration to 300 seconds if you want S 3CX Voice oppi cation Designer Beta SimpleExample zer Start Page MainFlow piata oF x SimpleExample 7 MainFlow flow Ca
58. nd returns the result Can have from 2 to 20 parameters Receives two numeric parameters and returns first secono Returns the absolute positive number of the single numeric parameter received Returns the number of rows of the table received The table is the result of a database query Page 27 30X 3CX Phone System for Windows www 3cx com Function Description Receives three parameters The first is the variable containing the table the result of a database query The second is the row identifier using a zero based index The third is the column identifier using a zero based index Returns the value of the cell from the specified table at the specified row and column Table 4 Expression Editor Available functions GET_TABLE CELL VALUE Call Related Components Call Related iy Menu Jili User Input Prompt Playback a Record CL Transter fe Disconnect Call Screenshot 20 The Call Related Components Menu This component configures a single digit menu It handles the retry logic when the user enters an invalid option or does not enter anything Its execution finalizes when a valid option is selected or if all retries have been performed This component has the following input properties Property Description AllowBargeln True to allow the prompts to be barged into False otherwise Number of retry offers for invalid input or timeout Each one has its own retry counter For example sett
59. nfigure the following variables Variable Collection Editor Members CreditCardNumber properties ary E Variable Name CreditCardNumber Accessibility Readw rite Initial alue Remove Page 62 30X 3CX Phone System for Windows www 3cx com and Variable Collection Editor Members CurrentRecord properties CreditCardNumber A AJ 1 CurrentRecord 4 E Variable IN ame CurrentRecord Accessibility Readwrite Initial alue 0 3 It s time for the PerformPayment component Follow the instructions on the previous step and configure the following variable Variable Collection Editor Members CreditCardN umber properties IN CreditCardNumber 4 A E Variable Name CreditCardNumber Accessibility Readw rite Initia alue Remove Designing User Components In the following steps we are going to design each user component Designing QueryPayments Component 1 From the Project Explorer window double click on the QueryPayments component in order to open it 2 From the Advanced Components section drag the Database Access component into the main flow Select the added component and from the Properties window click Configure 3 Input the following information Page 63 30X 3CX Phone System for Windows www 3cx com ES Database Access configuration Database Type Server project DatabaseServer Database project D atabaseN ame gt DataSource
60. ng component is not the last one in the designer E 8 Pressing the Step Out Button He the callflow execution continues in the next component in the parent component level For example pressing the Step Out Button when the currently executing component is a menu branch the execution Page 55 30X 3CX Phone System for Windows www 3ex com continues at the component located after the parent menu component The Step Out Button is enabled until the last executed component is reached 9 Pressing the Stop Debugging Button the debugging process is stopped 10 If any error occurs the callflow execution continues in the Error Handler Flow ra el 3 E i T ae 0 ee AE 21 62 A Start Page Main Visa RequestCreditCardNumber r X DAAD AAA A E RA E ErrorHandlerFlow Execution path when an error ocurrs Main Flow Su Error Handler Flow Disconnect Handler Flow 11 If the call is disconnected the callflow execution continues in the Disconnect Handler Flow Page 56 30X 3CX Phone System for Windows www 3cx com Sample Application Introduction In this chapter we are going to create a voice application and go through all the steps involved in making the application As an example we are going to create a simple Credit Card system allowing querying and performing payments We will show how to reuse components to reduce complexity We will also show how error handling works and how to confi
61. nput properties Property Description The database server name or IP address Only valid when Server DatabaseType is SqlServer The database to use when connecting to the Server Only valid when Database DatabaseType is SqlServer The data source to use when connecting to the database Only valid DataSource when DatabaseType is Oracle or ODBC UserName The username to use when connecting to the database Password The password to use when connecting to the database SqlStatement The SQL statement to execute including placeholders for variable Page 38 30X 3CX Phone System for Windows www 3cx com Property Description parameters DatabaseType The type of the database It could be SqlServer Oracle or ODBC The type of the statement Use Query to execute an SQL statement that returns rows Use NonQuery to execute an SQL statement that StatementType doesn t return rows for example INSERT DELETE UPDATE etc Use Scalar to execute an SQL statement that returns a single value for example SUM COUNT etc The wait time before terminating the attempt to execute an SQL Tineo statement and generating an error A value of 0 indicates no limit and shouldbe avoided because an attempt to execute an SQL statement could wait indefinitely Parameters The list of parameters to use with the SQL statement Table 15 Database Access component Input Properties Those input properties can be set using the configuration form activated fr
62. nt component Main QueryPayments RequestCreditCardNumber PerformPayment X AA iAH We have configured the PerformPayment component Page 69 3CX 3CX Phone System for Windows WwWW 3Cx cOom Designing RequestCreditCardNumber component 1 From the Project Explorer window double click on the RequestCreditCardNumber component in order to open it 2 We need to ask the credit card number to the end user so we need to use a User Input component 2 1 From the Call Related Components section drag the User Input component and drop it into the flow 3 If the user enters a valid credit card number we just want to store it to a public output property so our parent will be able to retrieve it 3 1 For the Valid Input branch from the Control Structures Components section drag the Variable Assignment component and drop it into this branch From the Properties window change its name to storeCreditCardNumber Configure the Expression by clicking on the E button an setting the following information Expression Editor O Javascript Expression S Variable O VAD Expression Wanable selection y StopBySilence Sp StopDiqit ag requestCreditlard G Buffer fq Result qe FERIA K as L C2 dnis E v Userlnputhesult Es InvalidDigits Timeout Sp ValdDigits 3 2 For the Variable Name press the Lu button and choose the following variable Page 70 30X 3CX Phone System for
63. o use When used to execute code in a COM ActiveX component or NET library the VAD creates an instance of the specified object and invokes the specified method on that instance using the list of parameters provided This component has the following input properties Page 41 30X 3CX Phone System for Windows www 3cx com Property Description The type of the external code to execute JavaScript COM or DotNetLibrary The path to the file or library to execute Only valid when ExternalCodeType is JavaScript or DotNetLibrary The type of the object to create Only valid when ExternalCodeType is DotNetLibrary or COM When working on a NET library this is the class name including the namespace When working on a COM component this is the ProglD ExternalCodeType FilePath ObjectType The name of the method or plain function to execute When ExternalCodeType is DotNetLibrary or COM an object of type ObjectType will be created and the method will be executed on that object instance MethodName A list of parameters used when invoking the function or method Each parameter can be a constant value a variable or an expression The name of each parameter is informative and is not used to validate against the function or method to call Table 17 External Code Execution component Input Properties Parameters Those input properties can be set using the configuration form activated from the context menu at the designer
64. om the context menu at the designer or the link in the properties window Database Access configuration Database Type Server proyect Databases ever Database project Database ame DataSource User Hame project Database ser ame SIS 5 Sis Password project D atabasePassyword Statement Type Query Timeout secs 3 SOL Statement select DESCRIPTION AMOUNT from PAYMENTS where CREDIT CARD NUMBER i 0 Pal Parameters N arme Value CreditCard umber o callflow CreditCardN umber Screenshot 29 Database Access configuration The Server Database DataSource User Name and Password input properties can be set using an expression The SQL Statement input property can contain variable parts In order to insert a parameter value into the SQL statement press the button on the right side of the text box and select the desired parameter Parameters can also be set using an expression In order to create an expression for a parameter press the ellipsis button on the last column of the grid Page 39 30X 3CX Phone System for Windows www 3cx com When the database access ends execution continues on the following component The database access component exposes the following output properties for further query which contain the processing result according to the type of the selected statement e QueryResult a table containing every row returned from the databa
65. on Designer Call Related A E Dedi ad i A Menu 6 anne 5 4 Nan Bow S User Input E Components de Prompt Playback 3 E Amex f Recoid 42 Amex comp C l Tranter gf Common Q C PertamP ayment comp Disconnect Cal QueeyPaymerts comp Control Structures RequestCreditC ardNumbet com Conditional jes AA P H rr E Maie Aol Variable Assignment Option 1 n Timeout ce Invalid Option Ll Mas p 1 C a 4 Z Visa 11 Increment Variable ES Visa comp 1 1 Dectemert Variable gt x Loop lec transfer oDperator 2 Ext Callow 4 gt Advanced i Cyptography E o 4 x GD Database Access SA B E Mai Sender oH St 7 Exteinal Code Execution E Callfiow F Fle Management ActivabonExtensiot 851 AcivsionExtensio 851 BY Socket Chent PhxCalfiowNane Main he Web Interachon Wed Services Interaction Name Man Hon Collection Screenshot 1 The voice application designer The 3CX Voice Application Designer is a visual design tool that allows you to easily create voice applications Voice applications are programs that interact with the user via the phone and then perform certain logic For example you could create a voice application that asks for a caller to input a customer number which is then verified against a database Based on customer number a call can be routed to a certain queue Becausethe 3CX Voice Application Designeris entirely visual little telephony or programming knowledge is
66. or ODBC Server the database server name or IP address Only valid when Database Type is SQL Server Database the name of the database to use when connecting to the database server Only valid when Database Type is SQL Server Datasource the datasource to use when connecting to the database server Only valid when Database Type is Oracle or ODBC UserName the user name to use when connecting to the database Password the password to use when connecting to the database Page 50 30X 3CX Phone System for Windows www 3cx com Statement Type the type of the statement Query NonQuery or Scalar Timeout secs the wait time before terminating the attempt to execute an SQL statement and generating an error Zero means to wait forever E Mail Sender SMTP Server the SMTP server name or IP address UserName the user name to use when connecting to the SMTP server Password the password to use when connecting to the SMTP server From the e mail address to use in the from field of the message To the e mail address to use in the to field of the message It can be a comma separated list CC the e mail address to use in the cc field of the message It can be a comma separated list BCC the e mail address to use in the bce field of the message It can be a comma separated list Subject the subject of the e mail message Body the body of the e mail message Priority the
67. ow The Properties window shows information of the currently selected object If the component contains actions they are shown too so that they can be quickly executed For example the Conditional component contains an Add Branch action which allows adding child conditional branches easily Page 21 30X 3CX Phone System for Windows www 3cx com LU K ESEA E Callflow Actvatione stensior 891 ActvationExtensiar 851 FbsCallftlow ame NM ain E File Mame Hain flow Varables Collection El Misc Hame The name of the file Screenshot 15 The properties window Error List Window Error List A 9 warnings 4 0 Messages Number Type Description File 11 Error Loop building block loopBuildingBlock1 has ane New _Main_2_Callflow Lx 12 Error Loop building block loopBuildingBlock1 has ane Main_2_Callflow flow 14 Error FilePath is empty at external code execution buildin UDBB2_2 udbb O 15 Error URI is empty at web interaction building block eb UDBB2_2 udbb O 8 Error Prompt Playback building block promptPlaybackB UDBB1 udbb O 9 Error FilePath is empty at external code execution buildin UDBB2 udbb v Error List Output Build failed Screenshot 16 The Error list window The error list window is used to display messages during the build process Those messages can be of three types e Errors the Project could not be built because of errors in the configuration of one or
68. ow for the Visa component 1 From the Project Explorer window open the Visa component by double clicking on it Then select the Error Handler Flow from the tabs located at the bottom of the designer b led m C hx PIES I D dy SSUES os M M 0 i 2 9 let la b gt PX StatPage Main PerformPayment RequestCreditCordiumber Va tal iii A CallRelated A E Credilard E radio 7 Man flow i gt de User Inp BW Comporerts Y Prompt Playback Uy Amen J Record 43 Amex comp Cl randa E Common PerlormPayment comp a Disconnect Call Control Structures Condiional AB Variable Assignment i t Increment Variable QueyP ayments como Heda dedi slabe comp lt E Master 43 Master como Visa Vite 3 Visa comp gt Decrement Variable y Loop y Ext Calliow Advanced S Copptograptw lt q Database Access S E Mail Sender Extemal Code Execubon P File Management Bp Socket Cher a a P web Interaction Description Web Services Interaction Enabled T User Defined Components Ba eK LB Master 2 PettormPayment 43 GueryPayments T RequestCrediCaidNumber Visa Add Branch Description Please specily the description ol the aroi f Man Flow Z Eror Hande Flow Disconnect Handler Flow Error List Output Debug Ready 2 We will configure the error handler for database access errors transferring the call to an operator in the event of such an error 2 1 On the Error Handler o
69. ow will be executed PbxCallflowName it is the name that will be used to register this callflow in 3CX Phone System You will see this callflow in the 3CX management interface listed as a Digital Receptionist with this name Page 7 30X 3CX Phone System for Windows www 3cx com To show the call flow double click on the callflow in the Project Explorer Adding components to the callflow BA 3CX Voice Application Designer Beta SimpleExample Ele Edt View Buld Debug Tools Help S Ke S 4 poa 4 af i x Start Page Call Related fo Menu if User Input Y Prompt Playback J Record CL Transfer C Disconnect Call Control Structures Condtional AB Vanable Assignment 21 Increment Variable I Decrement Variable w ra sY Md W ji li MainFlow tu i QO 7 x Bar A 3 SimpleE xample 2 MainFlow flow Option 1 l k Option 3 f Timeout ot Invalid Option Drag and diop i Drag and drop Drag and drop Loop components here i components her components here Exit Callfiow Advanced 25191 Cryptography N a S paa enu A R Database Access o e E Mail Sender ruin Extemal Code Execution El Options 2 Fie Management Socket Client Web Interaction Web Services Interaction User Defined Componerts IVabdOpten_0 False IVabdOption_1 True lVabdOpton_2 True l0 abdOpton_3 True IVabdOpton_4 False is VabdOpbon_5 False IabdOpbon_6 False isVabd0phon
70. priority of the e mail message External Code Execution e External Code Type the type of the external code to execute JavaScript DotNetLibrary or COM File Management Open Mode the mode in which the file must be opened Use Append to append data at the end of the file when Action is Write Use Create to open a new file or truncate an existing one Use Open to open an existing file Action the action to perform Read or Write Socket Client Connection Type the type of the connection to establish TCP or UDP Server Host the server host name or IP address Port the port number where the server is listening for incoming connections Wait for response from server indicates if the component needs to wait for a response from the server after sending the data Page 51 30X 3CX Phone System for Windows www 3ex com Web Interaction e HTTP Request Type the type of the HTTP request GET or POST Timeout secs The time to wait while trying to connect to the Web Server before returning the Server Timeout condition in seconds Zero means to wait forever Web Services Interaction Timeout secs The time to wait while trying to connect to the Web Service before returning the Server Timeout condition in seconds Zero means to wait forever Page 52 30X 3CX Phone System for Windows www 3cx com Debugging Introduction The VAD allows debugging of callflows following the exec
71. raction Web Servez Interachon User Defined Components 2 SimpleE xample 7 MainElow flow 1 Timeout ot Invalid Option 1 l t l la i i T i e tansterToSales l tE nia Kaahe ec transterT oO perator o Description Enabled True E Transfer Name transferT oSales Destination 120 MaxCallT me 0 Timeout 20 Transteruado TransteiMode Blind Name Please specity the name of the component It has to be unique in the entre How Z Main Flow Eror Handler Flow Disconnect Handler Flow Error List Output Debug Ready Screenshot 6 Configuring menu option actions 7 Now we configured the simple menu and we need to add the components that will be executed when any of the options is activated Let s assume we want to transfer to the Sales department if the user presses 1 To do this drag and drop a Transfer component from the Toolbox to the designer under the Option 1 branch 8 Change the name of the transfer component 9 Double click on the component and select the sales extension as the destination Repeat this procedure for option 2 transfer to Help Desk and timeout or invalid option transfer to the operator Page 10 30X 3CX Phone System for Windows www 3cx com A 3CX Voice Application Designer Beta SimpleExample Call Related S 6 S Karo 5 MainFlow flow E Prompt Playback Fa Record CC Transfer C Disconnect Call Control Structures Condtiona
72. ration When a component has a prompt collection each prompt can be of the following types e Audio file The prompt is stored in a wav or mp3 file e Recorded Audio The prompt is stored as a RecordComponent Audiold variable containing audio recorded from the end user The Expression Editor Many input properties can be set using an expression In this case the input field will contain a IG icon on the right Click that button to open the expression editor Page 25 30X 3CX Phone System for Windows www 3ex com Expression Editor O Javascript Expression S Variable O VAD Expression Variable selection Se callflows om TestName El e MenuResult Es Invalidi ption Es Timeout Validi ption gr e project a DatabaseName DatabasePassword DatabaseServer D atabaseU ser ame Testlycleld Testld Screenshot 19 The expression editor An expression can be a Javascript Expression a variable or a Voice Application Designer Expression Variables can be defined at many levels e Project level variables defined at this level can be used across the Project by any callflow or user defined component They are global variables that can be used for example to share data between callflows and user defined components e Callflow level these variables are visible within the callflow but cannot be seen by any child component e User defined component level these variables can be public or private Public variables are visible
73. required How does it work Using the 3CX Voice Application Designer you visually create your application Each application consists of a number of building blocks called components For example Menu Prompt playback User input are a few of the most common components Each component has particular configuration options When you have put together your voice application it is as a project This project is then uploaded to 3CX Phone System Using a digital receptionist or a DID number you can then link to your voice application In that way callers can be directed to your application either directly or via a menu From within Page 1 30X 3CX Phone System for Windows www 3cx com voice applications you can link back to call queues extensions digital receptionists and so on Terminology The 3CX Voice Application Designer or VAD uses a number of terms e Project your actual application composed of callflows and components e Callflow a particular interaction with a caller i e a group of actions formed by a group of components For example asking for a users customer number e Components the basic building blocks of a call flow such as play a menu get user input and so on The main difference between callflows and components is that callflows can be the starting point of a call while components cannot Components are always a part of a callflow or a more complex component e Custom Component You
74. s registered in 3CX Phone System with an extension number The extension number is configured in the ActivationExtension or ActivationExtensionDebug property for the callflow Be sure not to use an extension number that already exists In 3CX Phone System Voice Application Designer callflows are treated as Digital Receptionists You can choose when a callflow is activated in the same way you decide that a Digital Receptionist is activated for example when an inbound call arrives from a PSTN line or when a user presses a digit on another Digital Receptionist After deployment you will see each callflow listed under the Digital Receptionist section gt 3CX Phone System Management Console Windows Internet Explorer http localhost management MainForm wag File Edit View Favorites Tools Help w dpi e 30 Phone System Management Console 2 add Digital Receptionist Edit Digital Receptionist Delete Digital Receptionist E h 30X Phone System Name Ports Trunks Status Support_CF_SimpleTest Support_CF_Callfiow 1 Support_CF_Callfiow2 Support_CF_DbTest Support_CF_EMallSender Support_CF_FileTest Y Extension Status d Server Activity Log Mb Services status Extensions tS PSTN devices b VOIP Providers Inbound Rules 4 Bridges 7 OutBound Rules NS Digital Receptionist Support_CF_GeneralTest Support_CF_SocketTest 3CX VAD Califiow Ring Groups 4 Call Queues X Settings S Links i 69 Help
75. sage Table 16 E Mail Sender component Input Properties Those input properties can be set using the configuration form activated from the context menu at the designer or the link in the properties window Page 40 30X 3CX Phone System for Windows www 3cx com EMail Sender configuration SMTP Server localhost User N ame Password From THhoexample corn To obhntdezample corm EE BCL Subject Test subject PPP Body This te the information you need callllowt Thelnformation Pricrity Normal Attachments O Phe o OO Screenshot 30 Email configuration The SMTP Server User Name Password From To CC BCC Subject and Body input properties can be set using an expression The name of the attachment to send is a constant string value does not require quotes Attachment files can be determined using an expression In order to select the expression for the attachment file in the server press the ellipsis button on the last column of the grid When the e mail sender ends execution continues on the following component The e mail sender component does not expose any output property after its execution External Code Execution This component allows executing code located in a JavaScript file a COM component or a NET library When used to execute code in a JavaScript file the user must specify the name of the function to call and the list of parameters t
76. se The expression editor functions GET TABLE ROW COUNT and GET TABLE CELL VALUE allow scanning the whole table The first function returns the amount of records in the table so it can be stepped through with the Loop component The second function allows obtaining the cell value specifying the row and column numbers Indexes start at zero e NonQueryResult an integer value containing the number of rows affected e ScalarResult a string value containing the value returned from the database E Mail Sender This component allows sending of e mail messages This component allows using authenticated connections with user name and password specifying the sender and different addresses types To CC or BCC determining the subject and mail body and attaching files This component has the following input properties Property Description UserName The username to use when connecting to the SMTP Server Password The password to use when connecting to the SMTP Server Server The SMTP Server name or IP address From The e mail address to use in the Trom field of the message To The e mail address to use in the to field of the message CC The e mail address to use in the cc field of the message BCC The e mail address to use in the bcc field of the message Subject The subject of the e mail message Body The body of the e mail message Priority The priority of the e mail message Attachments The list of attachments to send with the e mail mes
77. se Access EMail Sender External Code Execution E Option 0 Option 1 Option 2 C Option 3 C Option 4 C Option 5 E Option 6 C Option 7 C Option 8 File Management Socket Client Web Interaction Web Services Interaction C Option 9 C Option C Option H Screenshot 36 Component options Menu Allow Barge In Set it to True to allow the prompts to be barged into Set it to False otherwise Timeout secs The time to wait for user input before playing a timeout prompt in seconds Max Retry Count the quantity of retry offers for invalid input or timeout Valid Options the list of valid options that are automatically added to the menu component when created Prompt Playback Allow Barge In set it to True to allow the prompts to be barged into Record Emit beep just prior to recording it indicates if a beep sound is played before recording Maximum Time secs the maximum duration to record in seconds Final Silence secs the interval of silence that indicates end of speech in seconds Terminate by DTMF if true any DTMF key will stop the recording Save to file if true the recorded audio will be saved to file Page 48 30X 3CX Phone System for Windows www 3cx com Transfer Transfer mode Indicates if the transfer must be done using attended mode a second call is made and the VoiceXML interpreter remains in the middle of both legs or blind mode the connect
78. t commands Only one branch can be executed and it will be the first which has a Condition that evaluates to true The Condition at the last branch is optional If it is set it must be met in order to execute the branch If it is not set the branch executes if all previous branches didn t If the last branch has a Condition it is possible that no branch gets executed at all if every Condition evaluates to false Variable Assignment This component allows assigning a new value to an existing variable The selected variable must be read write in order to be assigned This component has the following input properties Page 34 30X 3CX Phone System for Windows www 3cx com Property Description The name of the variable It must be an existing variable defined at Project scope callflow scope or a public property of a component The Variable Selector Form allows selecting a variable between all the available ones VariableName The value to assign to the variable The Expression Editor Form allows composing complex expressions more easily The user can choose to use a Javascript Expression a variable or a VAD Expression where each parameter is a new expression and can be edited using a new Expression Editor instance Variables are selected from a list that shows every available variable in the current scope read only and read write variables For more details about all the Expression available functions see The Expression Ed
79. t The server host name or IP address Port The port number where the server is listening for incoming connections Data The data to send to the server WaitForResponse True to wait for a response after sending the data False otherwise Table 19 Socket Client component Input Properties Those input properties can be set using the configuration form activated from the context menu at the designer or the link in the properties window Page 44 30X 3CX Phone System for Windows www 3cx com Socket Client configuration Connection Type is Server Host readHostHame 0_Parameterwalue Port read cpPort O_Parameteryalue Data to send ABCDE Wait for response from server Screenshot 33 Socket Client configuration The Server Host Port and Data to send input properties can be set using an expression When the socket client ends execution continues on the following component The socket client component exposes the following output properties for further query e Response contains the server response if the WaitForResponse property was set Web Interaction This component simulates a Web browser requesting a web page to a server It allows using the GET or POST methods by encoding the specified parameters as it corresponds This component has the following input properties Property Description URI The URI where the request must be sent The type of the HTTP Request Available values are GET and
80. ter Digit Timeout secs the time to wait for subsequent digits before playing an invalid digits prompt in seconds or zero to use the default value s Final Digit Timeout secs the time to wait for digits after MinDigits has been reached before returning the entered data in seconds or zero to use the default value Page 49 3CX 3CX Phone System for Windows www 3cx com Min Digits the minimum number of digits that must be entered by the user Max Digits the maximum number of digits that can be entered by the user Stop Digit specify the digit that the user must press in order to finalize the data entry Valid Digits indicate which digits will be considered as valid when they are entered by the user Cryptography Algorithm the algorithm to use DES TripleDES or MD5 hash Format encoding format for encrypted or hash bytes Key the key to use with DES and TripleDES algorithms Database Access Options E Component Templates E Projects Database Type SglServer K General Build Server Recent Projects Database Menu DataSource Prompt Playback Record User ame Dn Password O o User Input Cryptography Statement Type latabaze Access EMail Sender Timeout secs External Code Execution File Management Socket Client Web Interaction Web Services Interaction Screenshot 38 Options Component Templates Database Access Database Type the type of the database SQL Server Oracle
81. ter Prompts Collection PesformPaymert QuenyPayments T RequestCredtCondNumber dE Visa Name Please specily the name ol the component t has to be ureque in the entire Hove Main Flow dy Error Handler Flow Disconnect Handler Flow Screenshot 45 The main call flow Page 61 30X 3CX Phone System for Windows www 3cx com The Main callflow is ready Now we need to design the created User Components A Remember that you may move callflow and component files by dragging and dropping them in the new location in the Project Explorer Configuring User Components variables Now we are going to configure the user component s variables 1 We will begin with RequestCreditCardNumber component This component will ask for a credit card number and will be used by Visa Master and Amex components lt needs to return the credit card number entered by the end user so we need a public variable to store it Variable Collection Editor Members CreditCardNumber properties 1 CreditCardNumber ES A E Variable IN ame CreditCardNumber Accessibility Readw rite DELETE H Screenshot 46 Variables Click on the Variables button from the Properties window Click the Add button Configure it as shown 2 Now we are going to configure the QueryPayments component This component will query a database in order to get a list of payments The CurrentRecord variable will allow us to loop through that list C o
82. the next steps 1 From the main window toolbar press the Start Debugging Button E l Page 53 30X 3CX Phone System for Windows www 3cx com select Debug Information File Available Debug Information Files Tests Manual ManualhecordT est 2009 06 30 13 20 45 2 The debug information file will be displayed with the date and time the call was started and the callflow executed Select the desired debug information file and click OK 3 The VAD loads the file information and starts debugging the callflow highlighting the first executed component with a yellow background and showing the initial variable values in the Debug Window M 3CX Voice Application Designer CreditCard G l _ Advanced L 2 Dedit ard a MTG Ed Callow a Cryptography L Mar low ligt Database Access ha G Components S E Mal Sender y Amex Extemal Code Execution 48 Amex comp 7 Fle Management ad net p erformP ayre Bp Socket Client limar Web Interaction RequesiCied Web Services Interaction gt gt B Master Call Related l j j Timecet_ot_Invalid_Option LE Haier cone z j 4 4 E Visa o Disconnect Cal i j i i s sun B d Menu l 7 i i S de Prompt Playback i CL transterT oO perator i oF x P Peci EE mE UL Transtes A E 2 ty User Input k Calitlow aj Control Structures ActvatonE ste 851 Cor bonal Name Main flow i
83. ting within the designer The designer contains buttons below the vertical scroll bar on the right side of the designer which allow customizing the view Button Description HA MER Fits the designer to the screen size Allows activating or deactivating the Print Preview mode for the current Wi designer E Allows changing the zoom level for the current designer Allows to change the pointing device in order to navigate through the designer in the following ways E Zoom in the Zoom In magnifying glass cursor let the user zoom in by clicking the current designer Zoom out the Zoom Out magnifying glass cursor let the user zoom out E by clicking the current designer E Navigation tool the Navigation Tool hand cursor let the user grab and shift the view of a flow in the current designer E Default the Default arrow cursor let the user switch from the other cursors back to the default arrow cursor Table 1 Navigation tools within the designer Types of call flows There are three kinds of flows The Main Flow The execution path in normal conditions The call will visit each component in the main flow as long as no error occurs When an error occurs execution continues goes to the error handler flow When the call gets disconnected execution continues on the disconnect handler flow of the document Call related components can not be used in the disconnect handler flow Page 16 30X 3CX Phone System for Windows www
84. ty of a component The Variable Selector Form allows selecting a variable between all the available ones Table 11 Increment Variable component Input Properties VariableName Page 35 30X 3CX Phone System for Windows www 3cx com When the increment variable ends execution continues on the following component The increment variable component does not expose any output property after its execution Decrement Variable This component allows decrementing an existing numeric variable integer float or currency The selected variable must be read write in order to be decremented This component has the following input properties Property Description The name of the variable to decrement It must be an existing numeric variable integer float or currency defined at Project scope callflow scope or a public property of a component The Variable Selector Form allows selecting a variable between all the available ones Table 12 Decrement Variable component Input Properties VariableName When the decrement variable ends execution continues on the following component The decrement variable component does not expose any output property after its execution Loop This component allows executing a group of components while a condition is met The components contained into the Loop component are executed from O to N times If the condition is not met the first time those components are not executed at all This component
85. ues to the next branch Audio Recorded or Nothing Recorded The record component exposes the following output properties for further query e Result the recording result RecordResult NothingRecorded no audio recorded RecordResult StopDigit recording was stopped by a DI MF key press RecordResult StopBySilence recording was stopped by a final silence RecordResult Completed recording was stopped by reaching the maximum audio length e Duration the duration of the recorded audio in seconds e Size the size of the recorded audio in bytes e StopDigit the DIMF digit pressed by the user when Result RecordResult StopDigit e Audiold a variable containing the audio which can be used to play it back to the user Page 32 30X 3CX Phone System for Windows www 3cx com Transfer This component allows transferring the call The transfer can be done in two modes Attended and Blind When the bridge mode is used a second call is made to the specified destination and 3CX Phone System remains in the middle of both legs When the blind mode is used the call is automatically disconnected from 3CX Phone System and transferred to the specified destination This component has the following input properties Property Description The destination number where the call must be transferred The value Destination can be an expression so you may for example transfer the call toa number entered by the user in a User
86. user defined component is also added automatically to the toolbox Component Call Related Components Disconnect Call Menu Prompt Playback Record Transfer User Input Control Structures Components Conditional Decrement Variable Exit Callflow Increment Variable Loop Variable Assignment Advanced Components Cryptography Database Access E Mail Sender External Code Execution File Management Socket Client Web Interaction Web Services Interaction Description Disconnects the call Offers a menu with one digit options Plays back a prompt Records audio from the caller Transfers the call Collects information from the caller It allows performing actions when a condition is met It allows decrementing numeric variables It finalizes callflow execution immediately It allows incrementing numeric variables It allows looping until a condition is met It allows assigning variables Encrypts decrypts data using DES or TripleDES algorithms and compute MD5 hash Executes SQL statements on SQL Server Oracle and ODBC databases Sending emails Executes external code located in libraries or JavaScript source code Allows reading and writing data from file Allows establishing of TCP and UDP connections sending data through the connection and optionally wait for a response from the remote endpoint Allows performing of Web requests Allows executing of simple Web Services User Defined Compon
87. ust be deployed in 3CX Phone System The value of this property should be updated in order to point to your 3CX Phone System installation This information will be automatically set to every Project when it is created Default PBX Download Debug Files URI this is the URI to download debug information files from 3CX Phone System The value of this property should be updated in order to point to your 3CX Phone System installation This information will be automatically set to every Project when it is created Default PBX Get Debug File Names URI this is the URI to get the list of available debug information files from 3CX Phone System The value of this property should be updated in order to point to your 3CX Phone System installation This information will be automatically set to every Project when it is created Page 5 30X 3CX Phone System for Windows www 3cx com Getting started Creating a simple callflow Introduction In this chapter we ll explain how to create a simple callflow and deploy it to 3CX Phone System The idea of this chapter is to give an overview of how to work with the VAD After you are able to build a simple application you can then familiarize yourself with the more advanced components and build more complex applications In this chapter we will build a callflow which will offer a simple menu For Sales press 1 for Help Desk press 2 to make an outbound call press 3 or hold on and an operator will assist you Th
88. ution path graphically and watching variable values changes step by step When a call activates a callflow built in debug mode a debug information file is generated containing variable values and the execution path That file can be opened later by the VAD in order to debug the callflow Building in Debug mode In order to debug a callflow you must build the project in debug mode After getting a successful debug build you must deploy the debug configuration to 3CX Phone System Now every call processed by the project s callflows will generate a debug information file which can be imported latter by the VAD in order to graphically show you the execution path and variable values In this chapter we will use the CreditCard sample application as an example We will make a call and import the debug information file into the VAD in order to debug the callflow To build the Project in Debug mode 1 Open the Project 2 From the main window of the 3CX Voice Application Designer choose the command Build gt Debug Build 3 Once you got a successful debug build you can execute the main window menu command Build gt Deploy Deploy Project Configuration 4 The Deploy Project dialog will appear Select Debug Build Then click Deploy We are ready to make the call and start debugging the callflow Callflow debugging To debug a call you need to call the voice application so that it will be executed in debug mode Then follow
89. ystem for Windows www 3cx com Property Description characters for DES and 16 or 24 characters for TripleDES Text The text to encrypt decrypt or compute hash Table 14 Cryptography component Input Properties Those input properties can be set using the configuration form activated from the context menu at the designer or the link in the properties window Cryptography configuration Algorithm AA Action Encrypt w o i Screenshot 28 Cryptography configuration The Text input property can be set using an expression When the cryptography algorithm ends flow execution continues on the following component The cryptography component exposes the following output properties for further query e Result stores the processing result encoded according to the specified encryption algorithm or the MD5 hash calculation Database Access This component allows performing operations on SqlServer Oracle or any other database with ODBC drivers It allows executing three different kinds of statements Query NonQuery and Scalar The Query statements return a list of records as result For example SELECT FROM TABLE The NonQuery statements perform an insert or modification and return the amount of affected records For example INSERT VALUES VALUE1 INTO TABLE The Scalar statements perform data search but return a unique value For example SELECT COUNT FROM TABLE This component has the following i
Download Pdf Manuals
Related Search
Related Contents
StarTech.com Mini DisplayPort to HDMI 4K Audio / Video Converter – mDP 1.2 to HDMI Active Adapter for Mac Book Pro / Mac Book Air – 4K @ 30 Hz - White User Manual PICADORA DE CARNE Manual del Usuario Bedienungsanleitung D & GB 取扱説明書 AQUA-LIFT H40X/H56X HoMe TannIng Samsung CE2914N manual de utilizador Copyright © All rights reserved.
Failed to retrieve file