banner



How To Check Registered Function Asterisk

8. Astertest - asterisk stress testing tool ( Back to Tutorials Folio )

Astertest is a Windows application that tin can test the CPU load of your Asterisk PBX server. In society to apply information technology you lot must have advanced noesis in VoIP. To complete the exam you must have an Asterisk PBX server that originates the calls and ane more Asterisk server which to be tested. Y'all tin download the application from http://astertest.com/downloads/. You lot volition need near of the things in that location. Let us start doing the things one by ane.

i.Select the servers

You must take clear idea which machine will be used as Origination server and which one every bit Exam server.

two.Sound Files

The audio files are stored in /usr/src/asterisk/sounds/. Copy astertest-rtp.gsm from http://astertest.com/downloads/ to the Origination server. On the Test server you lot have to re-create all the sound file formats you lot wish to test. For alaw you need some *.alaw audio file for example - ast-test-al.al. You tin use your ain files with different name, but make sure when you configure the extensions.conf on the Exam server to use the correct audio file proper noun with the Playback command, ast-examination-gsm.gsm for gsm tests, ast-test-ul.ul for ulaw, ast-examination-ilbc.ilbc etc. Now when y'all accept the sound files for the exam y'all have to implement some new modules in asterisk that will give y'all the information for the actual CPU load while testing.

three.New Asterisk Modules

The modules below must exist installed on both Asterisk servers:

app_securax_cpuinfo.c
app_securax_serverload.c
securax_utils.c
securax_utils.h


Copy these files in /usr/src/asterisk/asterisk/apps/ on both Origination server and Exam server.

4. Changing the awarding�south Makefile

Now Asterisk has to exist told that these modules really exits and they take to exist loaded. For this purpose you have to change the Makefile in /usr/src/asterisk/asterisk/apps/. Open the Makefile that you take downloaded and copy the bolded lines to their corresponding places in the original Makefile.

So you have to add together these two modules in the commencement in �APPS� - app_securax_serverload.so and app_securax_cpuinfo.so � here is how this role of your Makefile has to wait after yous change it.

Further on you have to add the following module definitions (this is used when you compile Asterisk).

securax_utils.o: app_securax_utils.c

$(CC) -pipe $(CFLAGS) -c -o app_securax_utils.o app_securax_utils.c

app_securax_cpuinfo.o: app_securax_cpuinfo.c

$(CC) -pipe -I/usr/local/pgsql/include $(CFLAGS) -c -o app_securax_cpuinfo.oapp_securax_cpuinfo.c

app_securax_cpuinfo.so: app_securax_cpuinfo.o

$(CC) -pipe $(CFLAGS) -c -o securax_utils.o securax_utils.c
$(CC) $(SOLINK) -o $@ $< securax_utils.o

app_securax_serverload.o: app_securax_serverload.c

$(CC) -piping -I/usr/local/pgsql/include $(CFLAGS) -c �o app_securax_serverload.o app_securax_serverload.c

app_securax_serverload.so: app_securax_serverload.o

$(CC) -piping $(CFLAGS) -c -o securax_utils.o securax_utils.c
$(CC) $(SOLINK) -o $@ $< securax_utils.o


Here is how this part of the Makefile should look after you change information technology:

You have to change this Makefile in both Origination and Test server. In order these changes in the Makefile to take event y'all have to recompile the Asterisk on both of the servers.

5.Re-compiling Asterisk

Go to the Asterisk source - /usr/src/asterisk/asterisk and recompile information technology.

cd /usr/src/asterisk/asterisk
make
make install


At present your Asterisk servers have the modules implemented. We have now to add just some more things in the managers.conf and securax_serverload.conf files (/etc/asterisk)

6.Configuring securax_serverload.conf

This file also has to be downloaded to /etc/asterisk/. You lot tin can likewise create file with same name in the mentioned directory and write in the data needed. Here is how you can do information technology:

cd /etc/asterisk
vi securax_serverload.conf
[full general]
push_level=i


This file has to exist once again on both � Origination and Test servers.

7.Configuring managers.conf

In this file which is placed in /etc/asterisk yous have to create a user on the Origination server and 1 on the Test server, so you lot should have users on both servers in managers.conf. When you lot start the awarding and before get-go a test you will exist prompted to provide username and password for each server (Origination and Test). This is username and countersign for the relevant user in /etc/asterisk/managers.conf. Beneath you can run across my configuration.

In a higher place the [full general] account is disabled by default i.e. enabled = no. So kickoff you take to modify this to yeah. Then yous have to create an account.

[test]

this is the username

cloak-and-dagger=examination

the countersign is gear up to test

read=system,call,log,verbose,command,agent,user
write=system,call,log,verbose,command,amanuensis,user

this is say-so level for the user for the diverse classes


You need to add some users and extensions to servers at present.

8.Configuring iax.conf

Astertest uses some certain users for the examination. Here is what you lot accept to add to Asterisk Test servers, no specified users are needed for the Origination server. Here are the users you take to add together to /etc/asterisk/iax.conf on the server you lot are going to test.

Here is the complete list of all users you can have. For every audio codec format you want to test you must take divide user.

[testg723]
type=friend
host=dynamic
context=astertest
disallow=all
allow=g723

[testgsm]
type=friend
host=dynamic
context=astertest
disallow=all
allow=gsm

[testulaw]
type=friend
host=dynamic
context=astertest
disallow=all
allow=ulaw

[testalaw]
type=friend
host=dynamic
context=astertest
disallow=all
allow=alaw

[testg726]
type=friend
host=dynamic
context=astertest
disallow=all
permit=g726

[testadpcm]
type=friend
host=dynamic
context=astertest
disallow=all
allow=adpcm

[testslin]
type=friend
host=dynamic
context=astertest
disallow=all
allow=slin

[testlpc10]
type=friend
host=dynamic
context=astertest
disallow=all
allow=lpc10

[testg729]
blazon=friend
host=dynamic
context=astertest
disallow=all
allow=g729

[testspeex]
type=friend
host=dynamic
context=astertest
disallow=all
allow=speex

[testilbc]
type=friend
host=dynamic
context=astertest
disallow=all
allow=ilbc

nine. Configuring extensions.conf

Astertest also needs some certain extensions on both the Origination and the Exam server. This file is in /etc/asterisk/.

Origination Server

This context and extensions have to be added in amongst your extensions.

Exam Server

The following context has to be added in extensions.conf of your Test server.

At present you take all the things you demand to kickoff the test. Restart Asterisk on both of the servers and and so enter the command line (CLI). To brand sure that the new modules are working � bank check if they are loaded. Type in CLI evidence modules and if app_securax_serverload.then and app_securax_cpuinfo has a corresponding 1 that means they are loaded. Another mode to bank check this is to type testify modules similar app_securax � this will once more show you the modules with that proper noun. Every module volition have value 0 if information technology is not loaded and 1 if it is loaded. So if everything seems correct nosotros may kickoff the test itself, and if y'all accept some problems check whether you lot followed precisely the steps higher up.

Equally you lot come across above yous demand to accept separate extensions for the unlike users, and then equally in my file not all possible extensions are used, here is the full list of extensions for all the users.

exten => test02g723,i,Respond();
exten => test02g723,2,Playback(ast-test-g723);
exten => test02g723,three,Hangup();

exten => test02gsm,1,Reply();
exten => test02gsm,two,Playback(ast-test-gsm);
exten => test02gsm,3,Hangup();

exten => test02ulaw,1,Answer();
exten => test02ulaw,2,Playback(ast-test-ul);
exten => test02ulaw,three,Hangup();

exten => test02alaw,one,Respond();
exten => test02alaw,2,Playback(ast-test-alaw);
exten => test02alaw,3,Hangup();

exten => test02g726,one,Respond();
exten => test02g726,2,Playback(ast-test-g726);
exten => test02g726,iii,Hangup();

exten => test02adpcm,i,Reply();
exten => test02adpcm,2,Playback(ast-test-adpcm);
exten => test02adpcm,3,Hangup();

exten => test02slin,one,Respond();
exten => test02slin,2,Playback(ast-test-siln);
exten => test02siln,three,Hangup();

exten => test02lpc10,1,Answer();
exten => test02lpc10,2,Playback(ast-test-lpc10);
exten => test02lpc10,three,Hangup();

exten => test02g729,1,Reply();
exten => test02g729,2,Playback(ast-test-g729);
exten => test02g729,three,Hangup();

exten => test02speex,one,Respond();
exten => test02speex,two,Playback(ast-examination-speex);
exten => test02speex,3,Hangup();

exten => test02ilbc,ane,Answer();
exten => test02ilbc,two,Playback(ast-test-ilbc);
exten => test02ilbc,iii,Hangup();

10. Starting Astertest

i.Run the application - astertest.exe


Here yous can get-go new examination, make once more an existing test or edit an existing test. Choose �Start a new test� and click Next.

2.Choose type and proper name for the test


Blazon the proper name you desire to give to the examination in the �Proper name� field at the height and choose type (respond, playback or meetme) for the examination. When washed click �Next�.

three.Provide data for the servers


In the �Origination server� part type the IP address for the Origination server, leave the port equally by default � 5038. Then type the username and password that you created in managers.conf on the respective Asterisk server.

In the �Test server� part type again the IP of the Asterisk server that you are going to test and the username and password for the user you created in managers.conf on the relevant server. When done click next to go on.

4.Concluding adjustments for the examination


On the top check the corporeality of calls you desire to do while testing � test till overload of the tested server or test certain amount of calls. I will run the test for a hundred calls.

Speed � is the speed of origination for the calls. Normal is approximately 1 call in a 2nd.

Protocol � is the protocol type that asterisk will use. Equally we registered our users in iax.conf we have to employ IAX2 protocol for the test.

In Transcoding you have to cull codec for the origination server and for the tested server. At that place will be no transcoding if you choose the same codecs for original and resulting codec.

At the bottom bank check �Ship RTP� � this way the media file will be transport. If you practise not bank check it you will take simply answer in the exam, without real vocalism pressure over the server.

When washed click �Finish� to start the test.

v.Testing


This is the test ready to be started, just click �Start� to run the examination.

At the upper function you can meet information for the origination server � calls at the moment (on the small graph on the left), CPU load (the graph on the right, showing Idle load, system load, user load), and below more than information for the calls made and channels used at the moment.

At the bottom office y'all come across the same information for the examination server.

While the examination is executed you lot can magnify the CPU load graph. You can do this by clicking left mouse button and move left to right. Hither is a magnified graph.

When you once again click the left mouse button and motion the mouse from right to left at the same fourth dimension and the graph will be minimized to its normal size.

When the examination is washed � the calls attain the certain amount yous wanted or the server is overloaded the test is done. Then the calls are unloaded. Hither y'all encounter a progress bar while all the calls are hanging upward.

Then you tin can encounter the graph from the test.

You at present have the examination and when you run again Astertest, y'all can redo the test without doing the settings again (step i to 4), or you lot tin can as well change a little bit the test � for example increase or decrease the amount of calls, alter the codec, etc.

User Comments

Add together Comment


How To Check Registered Function Asterisk,

Source: http://mirror.unpad.ac.id/orari/library/library-sw-hw/linux-1/sip/asterisk/asterisk/docs/Astertest%20-%20asterisk%20stress%20testing%20tool.htm

Posted by: garnerclat1943.blogspot.com

0 Response to "How To Check Registered Function Asterisk"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel