README.md 2.11 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
# SwitchBoard Python sample #

This is a switch board sample client.
It demonstrates the call transfer feature.

## Configuration ##

This sample comes with a conf.yaml file located in the switch_board
directory.  This config file must be modified based on your configurations.  

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.   
**serverName**: name of your X2 server.  
**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)
 
## Running the sample ##

This sample can be run in one of two ways:

39 40 41 42
1. From the current directory (SwitchBoard_Python):   
   ./SwitchBoard.sh   
2. From the current directory (SwitchBoard_Python):   
   python switch_board/main.py   
43 44 45 46 47 48 49 50 51

### Note ###

The \_\_init\_\_.py file in the x2_protobuf directory was created 
to compensate for the fact that the generated files use python2
imports.  Without this file, imports like the following:

import channel_pb2 as channel_pb2 

52
will cause an ImportError