SIPp web frontend(2)

7 篇文章 0 订阅
2 篇文章 0 订阅

SIP VoIP 测试交流群: 323827101


欢迎大家转载,为保留作者成果,转载请注明出处,http://blog.csdn.net/netluoriver,有些文件在资源中也可以下载!如果你没有积分,可以联系我索要!

3.6Adding calls to a test(测试脚本增加呼叫)

To add a call, use the add a call link of the corresponding party (see in the figure above) and get to the Create new call screen.

添加一个呼叫,相应的一端使用add a call 链接 (见上图)和开始创建新呼叫

Here the command line parameters to pass to SIPp can be set up (the corresponding parameters are stated in round brackets, e.g., -timeout) or (-m), but first

这里的命令行参数可以设置SIPp(用圆括号规定相应的参数例如:(-timeout)或(-m)),首先

·choose an Executable (the version of SIPp you want to use, defined in config.ini.php. See section Config file for more details).

选择一执行文件(在config.ini.php中定义你想用的SIPp版本。查看Config file一节获得更多详细信息)

·choose a Scenario defined earlier in the Manage scenarios tab (Section Manage scenarios).

管理场景选项卡选择一个前面定义的场景

·if a client scenario is used, enter a Remote host. This is where SIPp addresses its messages to.

如果已经用了客户端场景,输入一个远程主机地址。这地址就是SIPp发送给对端的消息地址。

·check the Monitor call checkbox, if during the test execution realtime feedback of the test progress should be displayed. In that case the tester can also influence the test by pausing it, or by adjusting the packet rate (See section Run a test for more details).

检查监视呼叫复选框,如果在测试脚本时,会实时显示测试过程。在那种情况下测试者通过暂停或调整包的速率也会影响测试效果(查看运行一个测试一节获得更加详细信息)

·check the Log checkbox, if log files (-trace_err, -trace_logs, -trace_rtt, -trace_stat) should be stored in the database.

检查日志复选框,日志文件(-trace_err, -trace_logs, -trace_rtt, -trace_stat)否存到数据库中。

If the given configuration options are not enough, the Extended parameters text field can be used to pass any command line parameters to SIPp. The Extended parameters are not evaluated or modified in any way. It is up to the administrator to use a correct syntax. There may be some command line options that do not work, or even cause SIPp to hang (i.e. -bg).

如果所给的配置选项不够用,Extended parameters 文本框可以给SIPp传递任何命令行参数。 Extended parameters由管理员使用正确的语法。并不以任何方式评估或修改。也许会有一些命令选项不可用或引起SIPp挂起(例如-bg选项)

If a parameter is specified in the form and also as extended parameter, the extended parameter has the higher priority, and overwrites the other.

如果在表格中指定了一个参数,并且也作为扩展参数,那么扩展参数会有更高的优先权,写另一

Global parameters (applied to any call) can be defined in the AVP Section of the config.ini.php. These have the lowest priority.

 config.ini.phpAVP Section能定义全局参数(应用于任何呼叫)。这些有最低优先权。

3.7Modify a test / create a new test version(修改/创建一个新测试脚本)

Tests and calls can be modified at any time. If a test has already runs, a crucial modification of the test would mean that test information belonging to these runs is lost, and thus the run is not reproducible anymore. To avoid this, a new version is created automatically.

测试脚本和呼叫可能在任何时候都可以被修改。如果个测试脚本已经运行了,修改测试脚本着属于这些运行的测试信息丢失,从而运行不再重现了。为了避免这种情况,会自动创建一个新的版本。

Simply switch between the versions of a test by clicking the version numbers. A version can even be deleted by using the remove this version link, but then all its runs are lost too.

通过点击版本号可以实现两个版本的简单切换。以致可以用 remove this version链接来删除一个版本,但这样关这个版本的测试消息也会删除。

3.8Duplicate a test(复制一个测试脚本)

If a test is duplicated using the duplicate test link, the currently displayed version of the test is copied into version 1 of the duplicate. The new name of the duplicate is composed with the original name followed by the word copy. A duplicate initially has no runs.

如果duplicate test链接复制了一个测试脚本,当前显示的测试版本被拷贝到副本的版本1中原来的名称加上单词copy显示副本的名称。副本初始化不会运行

3.9System information(系统信息)

In the System information tab, the page is split in 3 areas. First a list of currently running SIPp instances is displayed. Then the available free disk space is stated. Finally there is a list with the versions of SIPp that are defined in the config.ini.php file, along with their verbose screens.

System information标签分成了3个区域。currently running SIPp instances显示在第一个。然后规定可用的磁盘空间。最后的个列表显示了在 config.ini.php文件中定义的SIPp版本号,连同他们的详细的屏幕。

3.10Kill a hanging SIPp instance(杀死一个挂起的SIPp实例)

An admin can try to kill an instance of SIPp by pressing the corresponding red X button in the list of currently running SIPp instances. Although SIPp runs that are not started through the web frontend are also in the list, they cannot be killed.

当前运行的SIPp列表通过点击红色 X      按钮来杀一个SIPp实例是从web页面运行的SIPp实例,在web页面不能杀死。

3.11Config file(配置文件)

A line in the config file with a leading ; is a comment and has no effect to the configuration.

配置文件的开头部分是一个描述会影响到配置

The configuration file is divided in three sections respectively tagged with
[EXECUTABLES], [AVP], and [CONFIG].

配置文件被分成三部分,分别用[EXECUTABLES], [AVP][CONFIG]标记

 

·In the [EXECUTABLES]-section SIPp executables and their versions can be specified. At least one executable is mandatory.

[EXECUTABLES]部分是SIPp执行文件,可以指定运行实例。其中至少有一个SIPp可执行文件。

·In the [AVP]-section global command line parameters for SIPp can be specified in form of attribute-value pairs (attribute = value). 

[AVP]部分以属性-值对的形式(属性=值)指定SIPP全局命令行参数。

I.e. most parameters of SIPp (without the leading -) will be accepted (see sipp -h for more details).

例如,接受SIPp(参数中没有-)大多数参数(用命令“sip -h”获得更多信息)

These parameters can be overwritten in each individual call by using the Extended parameters textarea in the web tool. Take care that you only use parameters that work with every version of SIPp you are using with this tool. If a attribute has no value, but is a switch, use TRUE as a value (e.g., aa = TRUE). If a value contains non-alphanumeric characters it needs to be enclosed in double-quotes (").

web通过用Extended parameters 文本每个独立的呼叫中重写这些参数。注意仅能在正在用的SIPp的版本用这个参数(也就是说版本中有命令才能用,毕竟每个SIPp的版本功能不一样,新的版本功能比较多一些嘛),除非是一个开,用TRUE作为一个值(例如,aa = TRUE)如果值包含非字母数字的字符需要用双引号(")起来

Parameters not allowed are: 参数不允许是:
i, m, nd, nr, t, p, r, timeout, pause_msg_ign, v, bind_local, inf, sd, sf, sn, stf, trace_msg, trace_shortmsg, trace_screen, trace_err, linebreak trace_timeout, trace_stat, trace_rtt, trace_logs

·In the [CONFIG]-section you will find program specific parameters, like admin password or MySQL-database connection information...

[CONFIG]部分你会程序指定参数,如管理密码或MYSQL-database连接信息……

Refer to the config file config.ini.php to get more detailed information about the specific parameters.

关于指定参数请参数配置文件中的config.ini.php获得更多详细信息。

4User guide(用户向导)

4.1Manage tests(管理测试脚本)

There is a list of available tests in the Manage tests. If there are many tests, it may be useful to sort the tests by clicking one of the column headings.

Manage tests中是测试脚本列表如果有很多测试脚本,通过点击头可以自动分类。

4.2Run a test(运行一个测试脚本)

Click on a test to get a more detailed view. There choose a version and click on the run this version link to open the test popup.

一个测试项中点击,会得到一个详细的界面。选择个版本点击run this version链接弹出测试页面。

Click on Run test now to begin testing. Both parties start to process their queues. On the left hand side of each call there is a small image showing the actual state of the call.

Run test now单击开始进行测试。双方开始处理队列。在个呼叫的左手一个小图像显示呼叫的实际状态。

4.3Key commands(关键字命令)

If monitoring is turned on, the test progress can be influenced by using key commands (this is the same as in the command line). First set the focus to the corresponding monitoring screen by clicking on it. When the border of the screen turns red, use the key commands on your keyboard.

如果打开了监控,关键字命令影响测试进展(用命令行测试也一样会影响)。首先通过点击关键字命令设置焦点到相应的监视屏幕屏幕的边界变为红色,使用你的键盘键入命令

·0-9 to switch between screens

0-9 切换屏幕

·+ , - , * , / to adjust packet rate

+ , - , * , / 调整包速率

·q to soft exit

q软退出

·p to pause/resume execution

p暂停/恢复执行

4.4Abort a call / test(停止一个呼叫/测试

Never close the test window without the test finished, because there may reside SIPp processes running on the server. If for some reason a call does not terminate by itself, there are three possibilities to finish the test anyway:

只有测试完成后才会关闭测试窗口,因在服务中可能驻留SIPp进程。如果由于原因一个呼叫没有自己挂断,完成这个测试有三种可能:

·If the call has monitoring turned on, try to end the call with the key command q (soft exit).

如果打开了监控功能,试试用软命令q键退出(退出)

·A call that hangs can be terminated by pressing the red X on its right hand side.

通过点击右侧红色 按钮结束挂起的呼叫

·The whole test can be stopped with the Abort test link at the top of the window.

点击接窗口顶部的Abort test链接来停止结束测试

4.5Runs(运行

After a test has finished, the test window is closed automatically and the created run is displayed. The exit and the std error column may contain important information (roll the mouse over the columns for more details in a tooltip box). Click the grey eye buttons to download the log files created during the test.

测试完成后,测试窗口自动关闭创建运行过程中的显示参数。列exit和std error也许包含重要的信息(悬浮框中滚动鼠标轴获得详细信息),点击灰色眼睛按钮来下载在过程中创建的日志文件。

It is possible to return to this page, or to another run, any time. Just navigate to the corresponding test in the Manage tests tab, choose the right version and click on a run at the bottom of the page.

可能会返回这个页面,或返回至另一个运行页面,Manage tests选项卡中导航到相应的测试中即可,选择一正确的版本并在页面底部点击即可运行。

5Programming guide(程序设计说明)

5.1Database (ER Diagram)(数据库(ER图表))

5.2Files(文件

·add_call.php is responsible for the add/modify call screen. Adds/modifies calls in the database.

·add_call.php屏幕中代表add/modify call 。在数据库中代表Adds/modifies 呼叫

·authentication.php: checks if admin is logged in. It is included everywhere, where admin should have special permissions.

authentication.php:选择是否admin登录。它包含了admin访问权限的任何地方。

·Call_Data.php: class Call_Data: contains call specific data (process-id, log filenames...) of a currently running call. It has methods to store log files in the database, delete the log files and determine the exit code after execution. When a call is about to be executed, an object of this class is generated and stored in a session variable.

Call_Data.php:Call_Data包含一个当前运行呼叫中调用指定的数据(process-id, log filenames...)。它把日志文件存储到数据库删除日志文件和决定执行完后退出的代码。当执行一个呼叫时,生成这个类的一个对象并保存一个会话变量

·config.ini.php: configuration file

config.ini.php:配置文件

·create_run.php: is called from run_progress.php via ajax. It creates a run in the database with the current timestamp.

create_run.php:通过ajaxrun_progress.php调用。数据库中创建一个运行的当前时间戳。

·dbHelper.php: is where the SQL happens. For each table in the database, there is a corresponding class that handles database communication.

dbHelper.php: SQL处理的地方,对数据库中的每个表来说,有一个相应的类处理数据库通信

·db.php: generates the MySQL database connection object.

db.php:生成MySQL数据连接对象

·exec_call.php: is called from run_progress.php via ajax. The basic function of this file is to build up the command line, create the XML-scenario file and the CSV-injection file in the system's temporary folder, execute the call and return its process id (pid).

exec_call.php:通过ajax从run_progress.php调用。这个文件基本功能是构造命令行,系统的临时文件夹中创建XML场景文件和CSV注入文件执行呼叫并返回它的进程id(pid).

·garbagecollector.php: removes all SIPp directories in the system's temp folder that have not been modified for a specific time (defined in config.ini.php). Further all SIPp processes older than a specific time get killed.

garbagecollector.php: (暂不会翻译)

·get_screen.php: During execution of a call this file is requested periodically via ajax. Here the actual monitor-screen is extracted from the screen file, and returned to status_screen.php (if monitoring is turned on). Further this file checks if the SIPp process is still running, and if not, it returns exit-code and standard-error tostatus_screen.php.

get_screen.php:在执行呼叫期间,通过ajax个文件会周期的向服务器进行请求。实际上是从screen文件中导出监控屏幕将结束输入至 status_screen.php(如果打开了监控功能)。进一步讲,这个文件检查SIPp进程是否仍在运行如果没有,tostatus_screen.php返回的退出代码和标准错误

·helper.php: just some useful functions.

helper.php:是一有用的功能说明

·index.php: redirect to tests.php.

index.php:定向到test.php

·info.php: represents the System information tab.

info.php:代表System information标签

·kill_process.php: is called from run_progress.php via ajax, if the user wants to kill a SIPp process.

kill_process.php: 如果用户想杀死SIPp进程,会通过ajax从run_progress.php调用此文件

·read_config.php: reads the config file in the three arrays $executables, $avp, and $config. Default values are set if necessary, and there is a function getConfig-Parameters that assembles command line parameters from the AVP section.

read_config.php:$executables, $avp, $config读取配置文件。如果有必要可以设置默认值,有一个得到配置参数(getConfig-Parameters)功能AVP部分中收命令行参数。

·run_detail.php: represents the show run page.

run_detail.php:代表show run页面

·run_progress.php: represents the run test popup. This is where all the ajax happens. Refer to the file itself for detailed information.

run_progress.php:代表run test 弹出窗。这是所有ajax运行的地方,参考此文件获得至多信息

·scenario_detail.php: represents the create/modify scenario screen. Inserts or updates scenario data in the database.

scenario_detail.php:代表create/modify scenario屏幕,在数据库中插入或场景数据。

·scenarios.php: represents the Manage scenarios tab.

scenarios.php:代表Manage scenarios 标签

·send_key.php: is called via ajax from status_screen.php when the user presses a key on the keyboard.

send_key.php:当用户在键盘中按下一个键时, status_screen.php 通过ajax调用send_key.php

·status_screen.php: is displayed in a iframe in run_progress.php during test. Here the status monitor screen of a running SIPp instance is displayed by polling it from the server frequently. Further, keyboard action is sent to send_key.php, that forwards it to the running SIPp instance.

status_screen.php:测试过程中一个内框架中显示 run_progress.php 。会从服务器频繁地轮循显示运行SIPp实例的监控屏幕状态。进一步讲,键盘的动作发send_key.php,驱动它来运行SIPp实例

·stop_sipp.php: has a function that tries to stop a running SIPp instance. It takes care that the pid belongs to a SIPp process.

stop_sipp.php:尝试停止一个运行的SIPp实例它负责pid属于一个SIP进程

·sys_get_temp_dir.php: provides functions that determine the working directory and the systems temp directory.

sys_get_temp_dir.php:提供限定工作目录和系统时时目录

·test_detail.php: represents the create/modify test screen.

test_detail.php:代表create/modify test 屏幕

·tests.php: represents the Manage tests tab.

tests.php:代表Manage tests 标签页。

·view_csv.php: is for downloading CSV files (log files etc.) that are stored in the database.

view_csv.php:下载保存在数据库中CSV文件(日志文件

·view_messages.php: is for downloading the file created by the command line option -trace_messages. The trace_messages file is not stored in the database because it may be very large, but it is left for a short time in the systems temp folder until the garbage collector removes it.

view_messages.php:下载通过命令行 -trace_messages选项创建的文件trace_messages文件不会存到数据库中,为它也许非常大,但是系统临时文件夹中一直保留,除非到达垃圾设置值才会删除。

·view_text.php: is for downloading text files (log files etc.) that are stored in the database.

view_text.php:下载存在数据库中的txt文件日志文件等)

·view_xml.php: is for downloading XML files (scenario files) that are stored in the database.

view_xml.php: 下载存在数据库中的XML文件场景文件)

·/js/ajaxConnection.js: crossbrowser function to create an ajax request object in javascript.

/js/ajaxConnection.js:javascript跨浏览器函数来创建一个ajax的请求对象

·/js/helper.js: some useful javascript functions.

/js/helper.js:些有用的javascript函数。

·/js/run.js: opens a window for a test run.

/js/run.js:测试运行打开一个窗口

·/js/tooltip.js: provides functions to display tooltip texts.

/js/tooltip.js:提供函数来显示工具提示文

·/navigation/pagehead.php: If you want to add a new tab to the navigation, do it here.

/navigation/pagehead.php:如果你想导航栏中添加一个新的标签在这里进行操作。

·/navigation/register.php: Here the navigation of the webfrontend is created.

/navigation/register.php:创建webfrontend导航栏

5.3Command flow during test process(测试过程中的命令流)

by Mario SMERITSCHNIG [code/documentation]

 Mario SMERITSCHNIG【代码/文档

 

 

 

 

网上找了一个安装文档地址是:

http://opensource.telkomspeedy.com/wiki/index.php/VoIP_Cookbook:_Installation_of_SIPp_Webfrontend

 

 

拷贝 &提取

mkdir /var/www/sipp

cp sipp_webfrontend_v1.2.tgz /var/www/sipp/

cd /var/www/sipp/

tar zxvf sipp_webfrontend_v1.2.tgz

mv /var/www/sipp/src/* /var/www/sipp/

创建数据

mysql -u root -p

password:

CREATE DATABASE SIPpDB;

USE SIPpDB;

\. /var/www/sipp/tables.sql

quit

编辑config.ini.php

vi /var/www/sipp/config.ini.php

[EXECUTABLES]

3.0 = "/usr/bin/sipp"

 

[CONFIG]

db_host = "localhost"

db_user = "root"

db_pwd = "123456"

db_name = "SIPpDB"

admin_pwd = ""

 

了更加容易访问网页,清空admin_pwd字段可以通过

http://localhost/sipp

访问SIPp Webfrontend ,用

username admin

password <no password>

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值