README.md 2.1 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
# SwitchBoard Java Sample #

This is a switch board sample client.

## Configuration ##

The sample comes with a conf.yaml file located in the current directory   
(IVR_Java). This config file must be modified based on your configuration.   
Your certifcate must also be located in this directory.   

Here is the structure of the config file:   

**ip**: ip adress and port of your X2 server.  
**certificate**: name of your certificate file if it is located in the   
     ivr_client directory.  If it is elsewhere, then the full path to your   
     certificate file.   
**username**: username to use to connect to the X2 server.   
**password**: password to use to connect to the X2 server.   
     the username and password must be configured on the X2 server.   
**applicationName**: application name configured on the X2 server.   
**dids**: The DIDs that will be used for this application.  THose DIDs  must be   
      added to the X2 server.   
**connectUsingServername**: if set to true, the server name and port will be used   
     to establish a connection to the X2 server.  If set to false the IP address   
     and port will be used to establish a connection.  This is because if   
     attempting to connect with the IP address and it is the serverName in the   
     certificate file, then connection may fail.   
**routes**: the transfer SIP destinations.  Description of route parameters below.   
* **ip**: ip address of the transfer SIP endpoint   
* **did**: did of the transfer SIP endpoint   
* **port**: port of the transfer SIP endpoint (if applicable)   
* **description**: description of the SIP endpoing (ex: Office of Tyler Green)   

## Building the sample ##

If making changes to the sample code, the sample can be built by running the   
following command from the current directory:   

./gradlew build   

The resulting .jar file (IVR_Java-all.jar) will be placed in the current   
directory.  

## Running the sample ##

The sample can be run in one of two ways:

48 49 50 51
1. From the current directory (IVR_Java):   
   ./IVR.sh   
2. From the current directory (IVR_Java):    
   java -jar IVR_Java-all.jar   
52