On this page |
|
\uD83D\uDCCB What’s about
This group provides the capabilities to connect the IVR application with a remote DB Schema to perform queries and operations.
◾ Database
Description
This box lets you perform a query to a DB schema. You must define a DB connection according to the instructions (please refer to the V3 ODBC section)
...
Label: here you can type e a brief description
Database: select the DB you want to connect to
Query: here you can perform a DB query (SQL statement)
Variable: here you can choose a variable from a pick-up list where you want to store the query results.
...
Please, consider the variable
...
to be a matrix where the columns are mapped to the fields you put in the SELECT clause of your SQL statement, and the rows are the records returned by the query. The first row is addressed with the 0 index and the next ones are addressed with 1, 2, etc, etc
Panel | |
---|---|
|
...
| |
Examples: the variable name is RESULT and the query is "SELECT order_num FROM orders" the query result will be saved into a matrix as follows: RESULT[0][order_num] RESULT[1][order_num] RESULT[2][order_num] RESULT[3][order_num] RESULT[n][order_num] |
Built-in variables
We provide the following Asterisk channels variables named
variable name + _ROWS_COUNT:shows the number of affected rows (only for SELECT statements).
Example: RESULT_ROWS_COUNT
Exit Arrows
This box provides just one arrow out to the next step
◾ SendMail
...
This box lets you send an email to a specified email address(es). Before using this block, please configure the email accounts under the Email channel or the SMTP section.
...
Label: here you can type a brief description
Account: select an email account you have configured under the Email channel or in the SMTP section.
To: Recipient email address. You can put multiple email addresses separated by a comma.
CC: Recipient in copy. You can put multiple email addresses separated by a comma.
Subject: Subject of the email.
Text: Body of the email. You can use channel variables to customize your text.
Exit Arrows
This box provides just one arrow out to the next step
Info |
---|
If you notice IVR hangs on Cally Square projects with a Send Mail block, you need to go in Cally Square projects with SendMail, place a new Send Mail block, copy parameters from old Send Mail block and place it instead of it. Disable “Wait for email to be sent” for avoiding the IVR to wait for STMP server response, which won’t return on STMP relay services |
◾SendSMS
Description
This box lets you send a text message (SMS) to one recipient
...
Account: select
...
an SMS account from the list you have configured.
To: recipient of the SMS
Info |
---|
The recipient number must be:
|
Text: body of the SMS (you can use channel variables to customize your text)
Exit Arrows
This box provides just one arrow out to the next step
◾ SestekNDA
Status | ||||
---|---|---|---|---|
|
...
This box allows you to build a voice bot using the Sestek NDA* Integration.
Panel | |
---|---|
|
...
|
...
|
...
Info |
---|
Remember: This software is managed by others. Check if it works properly. |
Label: here you can type a brief description
NDAUth URL: NDA Authentication URL (provided by Sestek NDA)
Username: Authentication name (provided by Sestek NDA)
Password: Authentication password (provided by Sestek NDA)
NDASSISTANT URL: NDA Assistent URL (provided by Sestek NDA)
Text: the text you want to send (required)
The SestekNDA block saves the results in the following variables:
SESTEK_NDA_SPEECH: Text to be pronounced to the user.
SESTEK_NDA_ACTION
SESTEK_NDA_ACTIONDATA
Exit Arrows
This box provides just one arrow out to the next step
...
...
Remember: this software is managed by others. Check if it works properly.
RestAPI | Description This box allows you to use Restful API to GET, POST, PUT, DELETE data from external applications or sources (for example: ticketing systems, CRM, order systems, and so on). The result of the API request (Body) can also be stored in a Variable.
Parameters
Custom script guidelines You can valorize custom variables to use in you request using a nodejs script located on your server. You can insert the absolute path to the script inside the Computed Variables Script Path input. Remember to follow these important rules:
module.exports = function({options_object}){ // custom code const variables = { code output as object }; // it must be an object, not an array return variables } The script also receives the options you inserted in the restAPI block, including URL and method, so you can use them in the script if needed. e.g. const { URL } = require('url'); module.exports = function(options){ const request = options; const method = request.method; const uri = request.uri; const myURL = new URL(uri); const host = myURL.host; const hostname = myURL.hostname; const href = myURL.href; const pathname = myURL.pathname; // etc... // additional custom code const variables = { code output as object }; return variables } Variables and custom (script) variables To include asterisk variables in your URL, you must include them in curly brackets. e.g. https://myurl.com?phone={CALLERID(num)} The same apply if you want to include them in the body of your request, or in your headers ( pay attention to the quotes ""). e.g. { "phone":"{CALLERID(num)}" } To include custom (script) variables, you must include them in double dollar $$ symbols. e.g. Your script returns an object like this: { key1: "value1", key2: "value2" } To use them in your URL you can write: https://myurl.com?myvar1=$$key1$$&myvar2=$$key2$$ and it will be completed like this: https://myurl.com?myvar1=value1&myvar2=value2 The same apply if you want to include them in the body of your request, or in your headers ( pay attention to the quotes ""). So, if your body/header object is written like this: { "myvar1":"$$key1$$", "myvar2":"$$key2$$" } it will be completed like this: { "myvar1":"value1", "myvar2":"value2" } NOTE: All special chars in the returned strings from the script are escaped ( e.g. the slash / character is translated to ', so if you want to avoid that you need to in clude an & symbol before the variable name: e.g. { "myvar1":"$$&key1$$", "myvar2":"$$&key2$$" } Built-in variables We provide the following Asterisk channels variables named
Example: RESULT_STATUS_CODE Exit Arrows This box provides just one arrow out to the next step |
Related topics
Filter by label (Content by label) | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|