# -*- coding: cp936 -*-
import pjsua as pj
import threading,time
import sys
def log_cb(level, str, len):
print str,
class TestAccountCallback(pj.AccountCallback):
iRegStatus = 0
def __init__(self, account=None):
pj.AccountCallback.__init__(self, account)
self.iRegStatus = 0
def on_reg_state(self):
self.iRegStatus = self.account.info().reg_status
class SipRegister(threading.Thread):
def __init__(self,lib,Domain,UserName,UserPsw):
threading.Thread.__init__(self)
self.lib = lib
self.Domain = Domain
self.UserName = UserName
self.UserPsw = UserPsw
self.Acc = None
self.Acc_cb = None
import pjsua as pj
import threading,time
import sys
def log_cb(level, str, len):
print str,
class TestAccountCallback(pj.AccountCallback):
iRegStatus = 0
def __init__(self, account=None):
pj.AccountCallback.__init__(self, account)
self.iRegStatus = 0
def on_reg_state(self):
self.iRegStatus = self.account.info().reg_status
class SipRegister(threading.Thread):
def __init__(self,lib,Domain,UserName,UserPsw):
threading.Thread.__init__(self)
self.lib = lib
self.Domain = Domain
self.UserName = UserName
self.UserPsw = UserPsw
self.Acc = None
self.Acc_cb = None