summaryrefslogtreecommitdiffstats
path: root/For Weekly Test/30-07-2011/AccClass.py
diff options
context:
space:
mode:
Diffstat (limited to 'For Weekly Test/30-07-2011/AccClass.py')
-rw-r--r--For Weekly Test/30-07-2011/AccClass.py40
1 files changed, 0 insertions, 40 deletions
diff --git a/For Weekly Test/30-07-2011/AccClass.py b/For Weekly Test/30-07-2011/AccClass.py
deleted file mode 100644
index 9a3425d..0000000
--- a/For Weekly Test/30-07-2011/AccClass.py
+++ /dev/null
@@ -1,40 +0,0 @@
-import CallClass
-import pjsua as pj
-
-class Account(pj.AccountCallback):
-
- def __init__(self, account=None):
- pj.AccountCallback.__init__(self, account)
-# self.server = server
- self.current_call = None
- self.call_cb = None
- self.statuss = None
- self.status = None
-
- def on_incoming_call(self, call):
- global statuss
- self.current_call = call
- self.call_cb = CallClass.Calling(self.current_call)
- self.current_call.set_callback(self.call_cb)
-
- #sleep(0.5)
- print "1"
- call.answer(200)
- self.statuss = 200
- #gger.logEvent("Answer call")
- #sleep(0.5)
-
- if self.current_call <> None:
- #logger.logEvent("Hangup call")
- print "2"
- call.hangup()
- #logger.logEvent('CALL OK')
- return 200
-
- def result(self):
- if self.statuss == 200:
- self.status == 'CALL OK'
- else:
- self.status == 'CALL NOT OK'
-
-