summaryrefslogtreecommitdiffstats
path: root/For Weekly Test/20-07-2011/Testing.py
blob: 34316eeb8fc3934c3812442c98e71413129f4e0d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import sys
import os
import time
import MySQLdb
import subprocess
import signal

import classClient
import classDb
import classPing

from time import sleep

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