Exemplo n.º 1
0
def logoff_agent_from_phone(agent_number, phone_register):
    number, context = _get_extension_from_agent(agent_number)
    user = user_helper.get_by_exten_context(number, context)
    fullname = " ".join([user['firstname'], user.get('lastname', '')])
    phone = phone_register.get_user_phone(fullname)
    phone.call('*32%s' % agent_number)
    time.sleep(3)
Exemplo n.º 2
0
def convert_user_numbers(user_numbers, context):
    users = []
    user_number_list = user_numbers.split(',')
    for user_number in user_number_list:
        user = user_helper.get_by_exten_context(user_number, context)
        if user:
            users.extend([user.id])
    return users
Exemplo n.º 3
0
def convert_user_numbers(user_numbers, context):
    users = []
    user_number_list = user_numbers.split(',')
    for user_number in user_number_list:
        user = user_helper.get_by_exten_context(user_number, context)
        if user:
            users.extend([user.id])
    return users
Exemplo n.º 4
0
def when_i_unlog_agent_group1(step, agent_number):
    line = agent_helper._get_line_from_agent(agent_number)
    user = user_helper.get_by_exten_context(line.number, line.context)
    phone = step.scenario.phone_register.get_user_phone(user.fullname)
    phone.call('*32%s' % agent_number)
    time.sleep(3)
Exemplo n.º 5
0
def given_i_logout_the_phone(step, agent_number, extension):
    line = line_helper.find_with_extension(extension)
    user = user_helper.get_by_exten_context(line.number, line.context)
    phone = step.scenario.phone_register.get_user_phone(user.fullname)
    phone.call('*32%s' % agent_number)
    time.sleep(3)
Exemplo n.º 6
0
def when_i_unlog_agent_group1(step, agent_number):
    line = agent_helper._get_line_from_agent(agent_number)
    user = user_helper.get_by_exten_context(line.number, line.context)
    phone = step.scenario.phone_register.get_user_phone(user.fullname)
    phone.call('*32%s' % agent_number)
    time.sleep(3)
Exemplo n.º 7
0
def given_i_logout_the_phone(step, agent_number, extension):
    line = line_helper.find_with_extension(extension)
    user = user_helper.get_by_exten_context(line.number, line.context)
    phone = step.scenario.phone_register.get_user_phone(user.fullname)
    phone.call('*32%s' % agent_number)
    time.sleep(3)