aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/share/python/asterisk/test-client.py
diff options
context:
space:
mode:
authorSean Dague2008-04-15 14:24:15 +0000
committerSean Dague2008-04-15 14:24:15 +0000
commit6f8ff326307ae1522e2f3163596b0bf1cdd2157f (patch)
tree4517fcd0560e9cf05ad170c0032fc9a60e7a01e4 /share/python/asterisk/test-client.py
parentFrom: dirk husemann <hud@zurich.ibm.com> (diff)
downloadopensim-SC_OLD-6f8ff326307ae1522e2f3163596b0bf1cdd2157f.zip
opensim-SC_OLD-6f8ff326307ae1522e2f3163596b0bf1cdd2157f.tar.gz
opensim-SC_OLD-6f8ff326307ae1522e2f3163596b0bf1cdd2157f.tar.bz2
opensim-SC_OLD-6f8ff326307ae1522e2f3163596b0bf1cdd2157f.tar.xz
From: Dr Scofield <hud@zurich.ibm.com>
ansgar and i have been working on an asterisk voice module that will allow us to couple opensim with an asterisk VoIP gateway. the patch below consists of * AsteriskVoiceModule region module: alternative to the plain-vanilla VoiceModule, will make XmlRpc calls out to an asterisk-opensim frontend * asterisk-opensim.py frontend, living in share/python/asterisk, takes XmlRpc calls from the AsteriskVoiceModule * account_update: to update/create a new SIP account (on ProvisionVoiceAccountRequest) * region_update: to update/create a new "region" conference call (on ParcelVoiceInfo) * a asterisk-opensim test client, living in share/python/asterisk, to exercise astersik-opensim.py this still does not give us voice in OpenSim, but it's another step on this path...
Diffstat (limited to '')
-rw-r--r--share/python/asterisk/test-client.py28
1 files changed, 28 insertions, 0 deletions
diff --git a/share/python/asterisk/test-client.py b/share/python/asterisk/test-client.py
new file mode 100644
index 0000000..d1872cd
--- /dev/null
+++ b/share/python/asterisk/test-client.py
@@ -0,0 +1,28 @@
1#!/usr/bin/python
2# -*- encoding: utf-8 -*-
3
4import xmlrpclib
5
6# XML-RPC URL (http_listener_port)
7asteriskServerURL = 'http://127.0.0.1:53263'
8
9# instantiate server object
10asteriskServer = xmlrpclib.Server(asteriskServerURL)
11
12try:
13 # invoke admin_alert: requires password and message
14 res = asteriskServer.region_update({
15 'admin_password': 'c00lstuff',
16 'region' : '941ae087-a7da-43b4-900b-9fe48387ae57@secondlife.zurich.ibm.com'
17 })
18 print res
19
20 res = asteriskServer.account_update({
21 'admin_password': 'c00lstuff',
22 'username' : '0780d90b-1939-4152-a283-8d1261fb1b68@secondlife.zurich.ibm.com',
23 'password' : '$1$dd02c7c2232759874e1c205587017bed'
24 })
25 print res
26except Exception, e:
27 print e
28