コード例 #1
0
ファイル: ami2stomp.py プロジェクト: gryzz/uCall
ami_password = config.get('AMI', 'password')

print 'AMI host:', ami_host
print 'AMI username:'******'AMI password:'******'='*80

sql_dsn = config.get('SQL', 'dsn')

print 'SQL:', sql_dsn
print '='*80

stomp = Client(stomp_host)
stomp.connect(stomp_username, stomp_password)

stomp.agent_channel = 'jms.queue.msg.'

connection = connectionForURI(sql_dsn)
sqlhub.processConnection = connection

manager = asterisk.manager.Manager()

#try:
#try:
manager.connect(ami_host)
manager.login(ami_username, ami_password)
manager.destination = stomp

asteriskProtocolVersion = None
if manager.version == '1.0':
    asteriskProtocolVersion = Protocol.ASTERISK_1_0
コード例 #2
0
ami_password = config.get('AMI', 'password')

print 'AMI host:', ami_host
print 'AMI username:'******'AMI password:'******'=' * 80

sql_dsn = config.get('SQL', 'dsn')

print 'SQL:', sql_dsn
print '=' * 80

stomp = Client(stomp_host)
stomp.connect(stomp_username, stomp_password)

stomp.agent_channel = 'jms.queue.msg.'

connection = connectionForURI(sql_dsn)
sqlhub.processConnection = connection

manager = asterisk.manager.Manager()

#try:
#try:
manager.connect(ami_host)
manager.login(ami_username, ami_password)
manager.destination = stomp

asteriskProtocolVersion = None
if manager.version == '1.0':
    asteriskProtocolVersion = Protocol.ASTERISK_1_0