====== Voximal Asterisk integration ====== ===== The Asterisk Module ===== The Voximal installs the app_voximal Asterisk application module that uses the process voximald to execute the VoiceXML pages. For more information on applications, just type "core show applications" at the Asterisk CLI prompt. To show details of how you use that particular application in this file (the Asterisk Dial plan). Type: *CLI> core show applications For example, the voximal application: *CLI> core show application voximal ===== The Asterisk Application ===== Application that launch a VoiceXML session in the asterisk channel and when complete, return control. ==== Syntax ==== Voximal([URL|Name|Number]) The URL can by set with different ways : No parameter, the application will use the VoiceXML accounts (match called number with accounts numbers) : Voximal() Pass the URL as the appplication parameter. Example : Voximal(file://tmp/test.vxml) Pass the account name or the account number. Example: Voximal(test) Pass the “@” to allocate a VoiceXML channel and pass the execution to this dialplan extension. Example : Voximal(@600) Set the VOXIMAL_URL variable before executing the Voximal application. Don't pass any parameter, and use the configuration accounts section. If account number match with the called number, its URL(s) and parameters will be use. The following describes how to execute a VoiceXML session. ==== Configuration files ==== Two configuration files are used : * VoiceXML interpreter configuration file (to overwrite default settings) : [[installation_guide:openvxi:start|/etc/voximald.conf]] * Asterisk Application/module configuration file : [[installation_guide:configuration_file_voximal:start|/etc/asterisk/voximal.conf]] ==== Configuration example ==== Example: ; VoiceXML Configuration ; [general] wav_codec=gsm videosilence=;silence audiosilence=;silence debug=4 video=yes [license] max=100 key=… [account1] name=Test1 url=http://localhost/vxml/index.php max=1 [account2] name=Test2 url=http://localhost/vxml/demo/index.vxml max=3 dialformat=SIP/%s@ovh-out 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 /etc/asterisk/extension.conf asterisk: [default] exten => 981001001,1,Voximal(Test1) exten => 981001002,1,Voximal(Test2) exten => 981001003,1,Voximal(Test3) 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/voximal processes. Use the command “voximal show accounts” to dump your accounts. CLI*> diaplan reload CLI*> voximal reload CLI*> voximal show accounts Example: Add extensions to the Asterisk dial plan /etc/asterisk/extensions.conf, if you want to set the URL in the dialplan: exten => 888,1,Answer exten => 888,n,Wait(3) exten => 888,n,Voximal(file:///root/example.vxml) exten => 888,n,Hangup You can create and edit the file /root/example.vxml with the GNU text editor, VI, for example. This example will work if you have text-to-speech configured. If not, use a pre-recorded wav or gsm file to replace the “Hello world!” text by an