summaryrefslogtreecommitdiffstats
path: root/For Weekly Test/20-07-2011/Testing.py
diff options
context:
space:
mode:
Diffstat (limited to 'For Weekly Test/20-07-2011/Testing.py')
-rw-r--r--For Weekly Test/20-07-2011/Testing.py38
1 files changed, 31 insertions, 7 deletions
diff --git a/For Weekly Test/20-07-2011/Testing.py b/For Weekly Test/20-07-2011/Testing.py
index 78d1a47..4a8a964 100644
--- a/For Weekly Test/20-07-2011/Testing.py
+++ b/For Weekly Test/20-07-2011/Testing.py
@@ -11,10 +11,34 @@ import classPing
from time import sleep
-num= "445"
-data = "start|"+num
-first = data[0:5]
-second = data[6:]
-print first
-print second
-print data
+command="--command=python sipCall.py"
+subprocess.Popen(args=["gnome-terminal", command])
+sleep(5)
+x = classClient.Connection("localhost", "50097")
+x.connect()
+origHandler = x.receiveData(0)
+print origHandler
+
+command="--command=python localsipReceiver.py"
+subprocess.Popen(args=["gnome-terminal", command])
+sleep(5)
+y = classClient.Connection("localhost", "50107")
+y.connect()
+
+while 1:
+ destHandler = y.receiveData(0)
+ if destHandler <> "":
+ break
+
+print destHandler
+
+if destHandler == "ready":
+ y.closeConnection()
+ y.connect()
+
+ #x.sendData("start|076120397897")
+while 1:
+ destHandlers = y.receiveData(0)
+ #origHandlers = x.receiveData(0)
+
+ print destHandlers#, origHandlers