Skip to content
A simple SpeechBridge plugin that queries a PostgreSQL database
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Sample SpeechBridge Plugin

This solution contains a complete SpeechBridge demo application that uses a plugin to retrieve information from the local PostgreSQL database by the caller's caller-id, a simple SRGS grammar for speech recognition, DTMF input, and reading it back to the caller with text-to-speech. It was built in Visual Studio 2017 and targeting .NET Standard 2.0 for use on SpeechBridge Cloud Native Edition (CNE), but the same code should run on SpeechBridge 7 (AKA "Classic") when retarged for .NET 3.5.

The solution includes:

  • The plugin DLL (SamplePlug.dll), which has a dependency on Npgsql.dll (from NuGet)
  • A SQL initialization script (tblCustomers_pgsql.sql) to create the database and insert a sample row
  • A VoiceXML application (CheckBalanceDemo.vxml.xml) with javascript to use the plugin

Setting it Up

  1. Build the DLL in Visual Studio (You can download the free community edition of 2017 here)
  2. Edit the sql file to add extensions that are relevant on your phone system
  3. Copy the script to /tmp/
  4. SSH to the host and run the script:

    SpeechBridge Classic:

cd /opt/speechbridge/bin
mono sbdbutils.exe --run-sqlscript-commands /tmp/tblCustomers_pgsql.sql

    SpeechBridge CNE Onsite

cd /usr/local/opt/incendonet/startup
cd ../services/
docker-compose \
    -f sbcore.docker-compose.yml -f sbcore-nethost-prod.docker-compose.yml \
    run --rm \
	-v /tmp:/tmp \
    -e DB_CKEY=${DB_CKEY} \
    sbdotnet \
        bash -c "
            /opt/speechbridge/bin/ < /opt/speechbridge/templates/sbdbutils.exe.config.TEMPLATE > /opt/speechbridge/config/sbdbutils.exe.config &&
            /usr/bin/mono /opt/speechbridge/bin/sbdbutils.exe --run-sqlscript-commands /tmp/tblCustomers_pgsql.sql"
  1. Copy the VoiceXML to the VoiceDocStore folder. On SpeechBridge Classic this is /opt/speechbridge/VoiceDocStore/, and on CNE Onsite this is /usr/local/opt/incendonet/volumes/opt-speechbridge/VoiceDocStore/.
  2. Copy the plugin to the plugins folder. On SpeechBridge Classic this is /opt/speechbridge/bin/, and on CNE this is /usr/local/opt/incendonet/volumes/opt-speechbridge/plugins/.
  3. Set a DID Mapping on your SpeechBridge to point to CheckBalanceDemo.vxml.xml on the Telephony page of the admin website.

That's it! We'd love to get your feedback, either here or

You can’t perform that action at this time.