Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
installation_guide:asterisk:start [2016/09/09 13:39] – [Configuration files] borja | installation_guide:asterisk:start [2017/06/27 20:40] (current) – [Asterisk Global Variables] borja | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Asterisk integration ====== | + | ====== |
===== The Asterisk Module ===== | ===== The Asterisk Module ===== | ||
Line 44: | Line 44: | ||
==== Configuration files ==== | ==== Configuration files ==== | ||
+ | Two configuration files are used : | ||
- | * Asterisk Application/ | ||
* VoiceXML interpreter configuration file (to overwrite default settings) | * VoiceXML interpreter configuration file (to overwrite default settings) | ||
- | ==== Variables | + | * Asterisk Application/ |
+ | |||
+ | |||
+ | ==== | ||
+ | |||
+ | Example: | ||
+ | |||
+ | < | ||
+ | ; VoiceXML Configuration | ||
+ | ; | ||
+ | [general] | ||
+ | wav_codec=gsm | ||
+ | videosilence=; | ||
+ | audiosilence=; | ||
+ | debug=4 | ||
+ | video=yes | ||
+ | |||
+ | [license] | ||
+ | max=100 | ||
+ | key=… | ||
+ | |||
+ | [account1] | ||
+ | name=Test1 | ||
+ | url=http:// | ||
+ | max=1 | ||
+ | |||
+ | [account2] | ||
+ | name=Test2 | ||
+ | url=http:// | ||
+ | max=3 | ||
+ | dialformat=SIP/ | ||
+ | </ | ||
+ | |||
+ | To assign an extension to a VXML account just follow this example, where we are assigning the previous account to three extensions number in your / | ||
+ | |||
+ | < | ||
+ | [default] | ||
+ | |||
+ | exten => 981001001, | ||
+ | exten => 981001002, | ||
+ | exten => 981001003, | ||
+ | </ | ||
+ | |||
+ | NOTE: | ||
+ | When you update your voximal.conf file, remember to refresh configuration making a command “voximal reload” in your CLI*> prompt. If you have added SIP, PRI or new extensions you must launch “sip reload”, “extensions reload”, “dialplan reload” or reload asterisk/ | ||
+ | |||
+ | < | ||
+ | CLI*> diaplan reload | ||
+ | CLI*> voximal reload | ||
+ | CLI*> voximal show accounts | ||
+ | </ | ||
+ | |||
+ | Example: | ||
+ | |||
+ | Add extensions to the Asterisk dial plan / | ||
+ | |||
+ | < | ||
+ | exten => 888, | ||
+ | exten => 888, | ||
+ | exten => 888, | ||
+ | exten => 888, | ||
+ | </ | ||
+ | |||
+ | You can create and edit the file / | ||
+ | |||
+ | This example will work if you have text-to-speech configured. | ||
+ | |||
+ | < | ||
+ | <?xml version=" | ||
+ | <vxml version = " | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | Save the file in the same directory as the VoiceXML script (relative reference in this example). | ||
+ | Reload the extensions configuration with: | ||
+ | |||
+ | < | ||
+ | *CLI> extensions reload | ||
+ | </ | ||
+ | |||
+ | Call the service by calling: | ||
+ | |||
+ | < | ||
+ | SIP: | ||
+ | </ | ||
+ | |||
+ | |||
+ | ==== Voximal variables | ||
Variables to set before or filled after the Vxml() execution : | Variables to set before or filled after the Vxml() execution : | ||
Line 93: | Line 183: | ||
* VOXIMAL_ERROR=INTERPRETER ; Session refused, critical error with the VoiceXML browser connection. | * VOXIMAL_ERROR=INTERPRETER ; Session refused, critical error with the VoiceXML browser connection. | ||
- | ===== Examples ===== | + | ==== Asterisk global variables |
+ | |||
+ | You can set and get variable at any moment from the VoiceXML syntax using the < | ||
+ | |||
+ | ** GET ** | ||
- | Example use with an URL parameter: | ||
< | < | ||
- | [incoming] | + | < |
- | exten => s,1,Answer | + | <block> |
- | exten => s,n,Wait(3) | + | < |
- | exten => s, | + | End of Transfer test <value expr=" |
- | exten => s,n,Hangup | + | </ |
+ | </ | ||
</ | </ | ||
- | Example to catch the Vxml() errors : | + | ** SET ** |
< | < | ||
- | exten => _X., | + | < |
- | exten => _X., | + | </ |
- | exten => _X., | + | |
- | exten => _X.,n,Busy() | + | |
- | exten => _X., | + | |
</ | </ | ||
+ | |||
===== Asterisk Online Help ====== | ===== Asterisk Online Help ====== | ||
Online help can be accessed by typing the following command at the CLI prompt: | Online help can be accessed by typing the following command at the CLI prompt: | ||
+ | |||
+ | < | ||
*CLI> help voximal | *CLI> help voximal | ||
+ | </ | ||
===== CLI Management Commands ====== | ===== CLI Management Commands ====== | ||
Line 208: | Line 304: | ||
The following entries are the Asterisk CLI commands for the VoiceXML browser. | The following entries are the Asterisk CLI commands for the VoiceXML browser. | ||
- | ===== Example ====== | + | ===== Examples |
Add extensions to the Asterisk dial plan / | Add extensions to the Asterisk dial plan / | ||
+ | |||
+ | Example use with an URL parameter: | ||
< | < | ||
- | exten => 888, | + | [incoming] |
- | exten => 888, | + | exten => 888, |
- | exten => 888, | + | exten => 888, |
+ | exten => 888, | ||
exten => 888, | exten => 888, | ||
+ | </ | ||
+ | |||
+ | Example to catch the Vxml() errors : | ||
+ | < | ||
+ | exten => _X., | ||
+ | exten => _X., | ||
+ | exten => _X., | ||
+ | exten => _X., | ||
+ | exten => _X., | ||
</ | </ | ||
Line 249: | Line 357: | ||
</ | </ | ||
+ | ===== Load Balancer ===== | ||
+ | |||
+ | Example using the Dialplan and 4 different accounts (with differents ASR and TTS ressources). | ||
+ | |||
+ | < | ||
+ | exten => s, | ||
+ | exten => s, | ||
+ | exten => s, | ||
+ | exten => s, | ||
+ | exten => s, | ||
+ | exten => s, | ||
+ | exten => s, | ||
+ | exten => s, | ||
+ | exten => s, | ||
+ | exten => s, | ||
+ | exten => s, | ||
+ | </ | ||
===== Troubleshooting (for Support) ===== | ===== Troubleshooting (for Support) ===== |