how to graph results of "siprtp" tool

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
antoine
Posts: 7
Joined: Mon Apr 21, 2008 7:04 am

how to graph results of "siprtp" tool

Post by antoine »

Hello,

I would like to graph the results of the tool siprtp (PJSIP library) that I actually use. It's a tool that simule voip calls and show results (jitter, latency, rtt..)

I want to graph the results with cacti but I have some problems because i have to recover the data of the siprtp command and I don't know exactly how to do that...

> Can I use a shell redirection to report results in a document and can I graph it with cacti?

> I have a sip_report.c in Pjsip, how can I recover the data for graph it?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Well, that topic sounds interesting to me. Can you please provide a link on using this stuff?
Please read first link of my sig to learn how to write scripts for cacti. I'm be willing to help you through all of this
Reinhard
antoine
Posts: 7
Joined: Mon Apr 21, 2008 7:04 am

Post by antoine »

thanks for your attention !

http://www.pjsip.org/pjsip/docs/html/pa ... amples.htm

This is the site of pjsip, I especially use siprtp.

I have already read some documents about writing scripts for cacti but for my application I don't know how to start...

One of problems is that siprtp can simule 1 or more calls and in the results there are all the calls descripting one by one. So I have try to do a shell redirection but it redirect this results one by one...

[/list]
antoine
Posts: 7
Joined: Mon Apr 21, 2008 7:04 am

Post by antoine »

Nobody have an idea?

I actually test the SIPp tool too..
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

No time yet. Still of interest
Reinhard
antoine
Posts: 7
Joined: Mon Apr 21, 2008 7:04 am

Post by antoine »

Ok no problem!

I actually work on a script to recover datas of siprtp and try to graph it...

I try to progress
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

I was able to compile the stuff, but I did not manage to get a simple example up and running. If you may post how to setup a most simple test setup, this will speed up my next answer to a great extend. Due to a short trip this weekend (aka tomorrow til sunday), it will take til next week at least
Reinhard
antoine
Posts: 7
Joined: Mon Apr 21, 2008 7:04 am

Post by antoine »

ok! I try to explain with my poor english ^^

So I think you want a little how to for siprtp...

>Download it from pjsip.org ( I use pjproject-0.5.9 on debian etch)
>Update system (on debian I use "aptitude update" , "aptitude upgrade")
> install GCC ("aptitude install gcc g++ ")

>./install pjproject
> ./configure && make dep && make clean && make

You do that on two hosts...

For running,

> You go on ..../pjproject-0.5.9/pjsip-apps/bin/samples/

> For running in client mode (caller) :

./siprtp-i686-pc-linux-gnu -i "@ of host" sip:"@ to call"

> For running in server mode (callee)

./siprtp-i686-pc-linux-gnu -i "@ of host"

>> It's the easiest way to run siprtp, you can use port options with "-p " , number of calls with "-c" ... the options are defined in "siprtp.c"

For my experiment I use an asterisk between two hosts, so my sip address is : "sip:1112@172.29.x.x" where 1112 is the adress of the host to call defined in the sip.conf and 172.29.x.x i s the address oh the asterisk host

I'm in week end to this afternoon!

Thanks and if you have others questions on siprtp I'm here!
antoine
Posts: 7
Joined: Mon Apr 21, 2008 7:04 am

Post by antoine »

Some news?

I have work on my script but it is not okay because I want for this script to 'enter' into the processus of siprtp to automate the press of 's' key....

My script is simple but I can't, when siprtp is launch, enter into by the script... oO
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Sorry, no news. I'm quite busy ATM.
But be assured, if the scripts requires input during script processing, this will denitively be a NOGO with cacti.
Reinhard
gpetme
Posts: 22
Joined: Wed Mar 28, 2007 5:48 pm

Post by gpetme »

If the graph does require input, you could use an Expect wrapper script around the siprtp script to automate it, and then spit out stats at the end. I haven't actually had to use (or automate) siprtp yet, but it's on the horizon...

Alternatively, I've got some scripts that take long to process, and I run them 4 minutes before the poller. So, for example, at 1:01 AM my script runs, outputs the data to a file around 1:04 AM, and then at 1:05 AM Cacti comes along and just has to read that stats file I generated.

Anyway, just an idea...

Greg
lvecsey
Posts: 4
Joined: Tue May 06, 2008 4:24 am

Post by lvecsey »

antoine:

Is there any reason you picked version 0.5.9 over say, 0.8.0? I tried 0.8.0 and the sample app blew up with an assertion. Stepping down to the latest version in the 0.5.x series, 0.5.10.4, at least got me to the menu where I could manually enter s, or l, etc.

If you are able to already get the status summary output manually, could you post your sample sip.conf entry from asterisk please? I would like to catch up to the point where you are. I am wondering if you are able to connect with a user name and password, or are just specifying a user without any secret. Also, are you setting up a context for this sip user that automatically dials with say:

Code: Select all


[from_siprtp_client]

exten s,1,Dial(SIP/siprtp_parent)

to get to the other siprtp instance?

For the script, a clean way to do this might be to automate the process by adding another flag to the siprtp sample application. Expect scripts as mentioned and sometimes the 'nc' command with the app sitting safely behind tcpserver might be another alternative.

--
antoine wrote:Some news?

I have work on my script but it is not okay because I want for this script to 'enter' into the processus of siprtp to automate the press of 's' key....

My script is simple but I can't, when siprtp is launch, enter into by the script... oO
antoine
Posts: 7
Joined: Mon Apr 21, 2008 7:04 am

Post by antoine »

I use 0.5.9 because at the beginnig of my tests, when I was installing siprtp, the 0.8.0 cause me problems (it's that I was thinking ) and in a how to that helps me, it was the 0.5.9 version..

http://www.panoramisk.com/104/testing-t ... uality/en/ (english version but I use the french one ^^)

My sip.conf (important part):
[pjsip-uac]
type=friend
context=perftest
host=172.29.201.7
callerid="uac" <1112>
insecure=very
qualify=yes
canreinvite=no

[pjsip-uac2]
type=friend
context=perftest
host=172.29.197.73
callerid="uac2" <1113>
insecure=very
qualify=yes
canreinvite=no

[pjsip-uas]
type=peer
allow=all
host=172.29.197.127
callerid="uas" <1114>
fromdomain=****
qualify=no
canreinvite=no
Extensions.conf

[perftest]
exten => 1112,1,Dial(SIP/pjsip-uac)
exten => 1113,1,Dial(SIP/pjsip-uac2)
exten => 1114,1,Dial(SIP/pjsip-uas)
uas is my Asterisk server and uac and uac2 are my 'clients' : My tests are between uac2 and uac who is at a distant site.


Thanks for your help.. For the script questions I haven't understand really your solutions (gpetme and Ivecsey) cause certainly of my english :(
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest