Permalink
Browse files

set default hangup url to answer url, add comments to default config …

…file
  • Loading branch information...
tamiel committed May 19, 2011
1 parent 98b8566 commit 207e91886bc65a8ef95155e204ec3d7c65be31ad
Showing with 27 additions and 5 deletions.
  1. +24 −5 src/config/default.conf
  2. +3 −0 src/plivo/rest/freeswitch/outbound_server.py
View
@@ -1,15 +1,25 @@
[rest_server]
-DEBUG = true
+# Secret Key for plivo rest server
SECRET_KEY = \xae$\xce:k\x06\x9d\n5o\xb3\\xdb\xa7p1\xd1(\xb5\xad\xb0\xe9\xfe
+
+# Allowed client ips to connect to plivo rest server
ALLOWED_IPS = 127.0.0.1
+
+# Listening address for plivo rest server
HTTP_ADDRESS = 127.0.0.1:8088
+
+# Auth ID and Auth Token for plivo rest server
AUTH_ID = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
AUTH_TOKEN = YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
-# to set different user/group when running in daemon mode :
+# To set different user/group
+# when running plivo rest server in daemon mode
#REST_SERVER_USER = root
#REST_SERVER_GROUP = root
+# Log settings for plivo rest server
+# log debug or not in plivo rest server
+DEBUG = true
# log to stdout :
#LOG_TYPE = stdout
# log to file :
@@ -22,17 +32,26 @@ LOG_FILE = @PREFIX@/tmp/plivo-rest.log
[freeswitch]
-DEBUG = true
+# Address and password for connecting to eventsocket
FS_INBOUND_ADDRESS = 127.0.0.1:8021
FS_PASSWORD = ClueCon
+
+# Listening address for plivo outbound server
FS_OUTBOUND_ADDRESS = 127.0.0.1:8084
+
+# Incoming calls will always use those urls to post answer/hangup events
+# By default, hangup url is same as answer url
DEFAULT_ANSWER_URL = http://127.0.0.1:5000/answered/
-DEFAULT_HANGUP_URL = http://127.0.0.1:5000/hangup/
+#DEFAULT_HANGUP_URL = http://127.0.0.1:5000/hangup/
-# to set different user/group when running in daemon mode :
+# To set different user/group
+# when running plivo outbound server in daemon mode
#FS_OUTBOUND_USER = root
#FS_OUTBOUND_GROUP = root
+# Log settings for plivo outbound server
+# log debug or not in plivo outbound server
+DEBUG = true
# log to stdout :
#LOG_TYPE = stdout
# log to file :
@@ -52,6 +52,9 @@ def __init__(self, configfile, daemon=False,
'rest_server', 'AUTH_TOKEN')
self.default_hangup_url = helpers.get_conf_value(self._config,
'freeswitch', 'DEFAULT_HANGUP_URL')
+ # default hangup_url is answer_url
+ if not self.default_hangup_url:
+ self.default_hangup_url = self.default_answer_url
# This is where we define the connection with the
# Plivo XML grammar Processor
OutboundServer.__init__(self, (fs_host, fs_port),

0 comments on commit 207e918

Please sign in to comment.