Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
installation_guide:asterisk:start [2016/02/05 09:15] – borja | installation_guide:asterisk:start [2017/01/25 21:45] – [Examples] borja | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Asterisk integration ====== | + | ====== |
===== The Asterisk Module ===== | ===== The Asterisk Module ===== | ||
Line 41: | Line 41: | ||
The following describes how to execute a VoiceXML session. | The following describes how to execute a VoiceXML session. | ||
+ | |||
+ | ==== Configuration files ==== | ||
+ | |||
+ | Two configuration files are used : | ||
+ | |||
+ | * VoiceXML interpreter configuration file (to overwrite default settings) | ||
+ | |||
+ | * Asterisk Application/ | ||
+ | |||
+ | |||
+ | ==== Configuration example ==== | ||
+ | |||
+ | 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: | ||
+ | </ | ||
+ | |||
==== Variables ==== | ==== Variables ==== | ||
Line 87: | 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 ===== | ||
- | Example use with an URL parameter: | ||
- | < | ||
- | [incoming] | ||
- | exten => s, | ||
- | exten => s, | ||
- | exten => s, | ||
- | exten => s,n,Hangup | ||
- | </ | ||
- | |||
- | Example to catch the Vxml() errors : | ||
- | < | ||
- | exten => _X., | ||
- | exten => _X., | ||
- | exten => _X., | ||
- | exten => _X., | ||
- | exten => _X., | ||
- | </ | ||
===== Asterisk Online Help ====== | ===== Asterisk Online Help ====== | ||
Line 202: | Line 280: | ||
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 243: | Line 333: | ||
</ | </ | ||
+ | ===== 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) ===== |