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...
This commit is contained in:
Sean Dague
2008-04-15 14:24:15 +00:00
parent 62d02e079e
commit 6f8ff32630
9 changed files with 651 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
#!/usr/bin/python
# -*- encoding: utf-8 -*-
import xmlrpclib
# XML-RPC URL (http_listener_port)
asteriskServerURL = 'http://127.0.0.1:53263'
# instantiate server object
asteriskServer = xmlrpclib.Server(asteriskServerURL)
try:
# invoke admin_alert: requires password and message
res = asteriskServer.region_update({
'admin_password': 'c00lstuff',
'region' : '941ae087-a7da-43b4-900b-9fe48387ae57@secondlife.zurich.ibm.com'
})
print res
res = asteriskServer.account_update({
'admin_password': 'c00lstuff',
'username' : '0780d90b-1939-4152-a283-8d1261fb1b68@secondlife.zurich.ibm.com',
'password' : '$1$dd02c7c2232759874e1c205587017bed'
})
print res
except Exception, e:
print e