Skip to content

Phils Blog and Stuff

TELECOMS. VIRTUALIZATION. IT. CODING. and more…

Menu
  • Home
  • Resources
    • Subnet Mask Cheat Sheet
    • Easy Dmarc+Email
    • MX Tool Box
    • LOAD BALANCING & SRE
  • SHOP
  • SOLUTIONS
  • SERVICES
  • Contact Me
Menu

Stress testing asterisk… with SIPP….

Posted on 13/11/201108/03/2023 by Phil

Introduction

This guide will talk about how to stress test an asterisk installation, IE generate calls with in asterisk so you can see at what point your system will start to give bad audio out to a caller.

First things first

for this you will need:
1 asterisk 1.4 or 1.6 or later installation of asterisk running on a 32bit installation of centos.

Instructions and configuration

1) download and install SIPP “yum install -y sipp”

2) edit sip.conf and enter

[sipp]
type=friend
context=sipp
host=dynamic
port=6000
user=sipp
canreinvite=no
disallow=all
allow=ulaw

3) edit extensions.conf and enter

[sipp]
exten => 2005,1,Answer
exten => 2005,2,SetMusicOnHold(default)
exten => 2005,3,WaitMusicOnHold(20)
exten => 2005,4,Hangup

4) run “service asterisk stop” to stop the current session of asterisk

5) load asterisk in debug mode “asterisk -vvvvvvvvvvvvvvvvvvgc”

6) run “sipp -sn uac -d 20000 -s 2005 IP.OF.YOUR.BOX -l 30”

the above command will send 30 concurrent calls in to asterisk and extension 2005 will answer and place them on hold for 20 seconds and play music on hold, you can then dial into the system and hold a conversation with someone while slowly increasing the number of calls to see at what point calls become in-audible.

if you are also graphing the CPU and Memory useage this is a good way to do burn in tests and see how the hardware responds to the system constantly being used for a period of 24 Hours etc…

expected output from SIPP

------------------------------ Scenario Screen -------- [1-9]: Change Screen --
  Call-rate(length)     Port   Total-time  Total-calls  Remote-host
10.0(20000 ms)/1.000s   5061       6.01 s           59  10.0.2.10:5060(UDP)

  10 new calls during 1.000 s period     14 ms scheduler resolution
  46 calls (limit 161)                   Peak was 47 calls, after 5 s
  0 Running, 46 Paused, 0 Woken up
  244 out-of-call msg (discarded)
  1 open sockets

                                 Messages  Retrans   Timeout   Unexpected-Msg
      INVITE ---------->         59        0         0
         100 <----------         57        0                   2
         180 <----------         0         0                   0
         183 <----------         0         0                   0
         200 <----------  E-RTD1 57        0                   0
         ACK ---------->         57        0
       Pause [      0ms]         57                            11
         BYE ---------->         0         0         0
         200 <----------         0         0                   0

------ [+|-|*|/]: Adjust rate ---- [q]: Soft exit ---- [p]: Pause traffic -----
Asterisk Debug
-- Executing [2005@sipp:1] Answer("SIP/sipp-085759b8", "") in new stack
-- Executing [2005@sipp:2] SetMusicOnHold("SIP/sipp-085759b8", "default") in new stack
-- Executing [2005@sipp:3] WaitMusicOnHold("SIP/sipp-085759b8", "20") in new stack
-- Started music on hold, class 'default', on channel 'SIP/sipp-085759b8'
-- Executing [2005@sipp:1] Answer("SIP/sipp-0858ff38", "") in new stack
-- Executing [2005@sipp:2] SetMusicOnHold("SIP/sipp-0858ff38", "default") in new stack
-- Executing [2005@sipp:3] WaitMusicOnHold("SIP/sipp-0858ff38", "20") in new stack
-- Started music on hold, class 'default', on channel 'SIP/sipp-0858ff38'

POSTS

  • Home Assistant. Add water meter with PHP+MQTT+YML.
  • Automating your home with Home Assistant. Initial install and config (Hyper-V).
  • The importance of setting up email security correctly.
  • Automate Debian installations with Seed, DHCP and Nginx.
  • A simple link shortener.. Fun little project…

WORD CLOUD

3CX 3CX Phone System Apache Asterisk Cacti CentOS CRM DHCP DNS Email Fail over Failover File System Firewall FreeBSD FreeNAS FXO IAX install IP IP PBX Linux M0n0wall Nottingham Open Source PBX PFSense PHP Router Server SIP snom SSH TrixBox ubuntu VLAN Voice VoIP VPN vyatta WAN Website WiFi yealink ZFS

© 2025 Phils Blog and Stuff | Powered by Superbs Personal Blog theme