How to check if a Diva CHAN_CAPI installation has been successful
Assuming you have agreed to build the Diva CHAN_CAPI during the Diva System Release Build process and you now encounter problems with your Diva Media Board / Asterisk integration, the following steps aim to provide some basic guidance to verify the installation has been successful.
Double-check installation
- Check /usr/lib/opendiva/divas/src/divas.log for any errors under START SECTION 'build chan_capi'.
- Open Diva WebGUI and go to Configuration > CHAN_CAPI configuration
- Make sure your Diva Media board is set to 'Used by CHAN_CAPI...'
- Make sure the buttons 'Download capi.conf' and 'Download modules.conf' are not deactivated.
If they are deactivated, make sure your board is set to 'Used by CHAN_CAPI...' and click the 'Create capi.conf' button.
- Open Asterisk CLI and enter 'capi info'
This should return a list of all installed CAPI controllers, flagged if used by CHAN_CAPI or not.
- Open Asterisk CLI and enter 'capi show channels'
This should return a list of the current B channel status of the CAPI controllers used by CHAN_CAPI.
Check basic call functionality
1. Ring a phone
- Open /etc/asterisk/extension.conf
- Insert
[default]
exten => _X.,1,Dial(CAPI/contr<X>/${EXTEN})
with <X> equals the CAPI controller number of your card.
- Save.
- Open Asterik console and run 'reload' to apply the new configuration
- enter 'console dial NUMBER'
If configuration has been successful, the called phone should ring.
2. Call a phone and play back a message
Note: If autoload=no in modules.conf be sure to load pbx_spool.so, otherwise call files will not work.
- Create a file outbound.call with the following content
Channel: CAPI/contrX/<NUMBER>
Application: Playback
Data: demo-congrats
with
X = the CAPI Controller via which you want to call out
replace <NUMBER> with the phone number to dial
- copy outbound.call to /var/spool/asterisk/outgoing (or the equivalent astspooldir directory defined in asterisk.conf)
- Start Asterisk
After Asterisk is started it should
* read the above call file
* Dial the number out of the CAPI controller.
* Once the call has been answered, play the sound file
* Hang up the call.
Afterwards Asterisk will remove the call file from the spooling directory.
If installation has been successful, you should here a voice message 'Congratulations, you have successfully installed and executed an Asterisk ...'.
Note: The Asterisk sound samples need to be installed, otherwise demo-congrats won't work.
3. Answer incoming call
- Open /etc/asterisk/extensions.conf
- Insert
[isdn-in]
exten => _X.,1,Answer()
exten => _X.,n,Playback(demo-congrats)
exten => _X.,n,Hangup()
- Save.
- Open Asterisk console and run 'reload' to apply the new configuration
Call your Asterisk server from your phone. If installation has been successful, you should here a voice message 'Congratulations, you have successfully installed and executed an Asterisk ...'.
Note: [isdn-in] is the default context for incoming calls used by Diva CHAN_CAPI. Can be verified in Diva WebGUI > CHAN_CAPI configuration > Context setting.
Debugging possibilities:
1. Double-check with the Diva tools (acopy2 or testfax) that the general board configuration is OK and you can successfully make and receive calls.
2. Take a Diva Diagnostic trace to verify if the call request hits the line.
3. Enable CAPI debug logging in Asterisk console
Depending on the type of problem (incoming call not answered, no audio for call, called number does not ring ) the CAPI debug output should give an overview if the call
Asterisk CLI> capi debug
Usage: capi debug
Enables dumping of CAPI packets for debugging purposes
First published: 14-Feb-2011
Open access: Product rule: ; Page rule: Auto