import os

xmlpath = r".\CstaPool"
link = {}
agentThreads = []
busyCallers = []
talkDuration = 10
# Create thread local data
data = local()
data.parameters = util.dict_2({
    "dest_ip_orig": "10.5.42.44",
    "dest_ip_psap": "10.9.65.45",
    "dest_port": 5060,
    "transport": "tcp",
    "callId": util.randomCallID,
    "fromTag": util.randomTag,
    "source_ip": "10.2.31.5",
    #            "source_port":5080,
    "viaBranch": util.randomBranch,
    "epid": lambda x=6: "SC" + util.randStr(x),
    "bodyLength": "0",
    "expires": "1800"
})


def getxml(name):
    return os.path.join(xmlpath, name)


def ConnectSip(user_range, baseLocalPort, localIP=util.getLocalIP()):
    " Open the connections for the users "
    connection_pool = {}
Exemple #2
0
from sip.messages import message
from time import sleep
from socket import timeout
from common import util
import os

link = {}
serverThreads = []
talkDuration = 10
parameters = util.dict_2({
    "dest_ip": "10.2.28.54",
    "dest_ip_csta": "10.2.28.60",
    "dest_port": 5060,
    "transport": "tcp",
    "callId": util.randomCallID,
    "fromTag": util.randomTag,
    "source_ip": util.getLocalIP,
    #            "source_port":5080,
    "viaBranch": util.randomBranch,
    "epid": lambda x=6: "SC" + util.randStr(x),
    "bodyLength": "0",
    "expires": "360"
})


def getxml(name):
    return os.path.join(xmlpath, name)


def ConnectSip(user_range, baseLocalPort, localIP=util.getLocalIP()):
    " Open the connections for the users "
    connection_pool = {}