Programmable Testing
for Programmable Telcos
Andreas Granig <agranig@sipfront.com>
About me
Testing?
Monitoring?
● Two sides of same coin
But why?
Getting back in control!
3 Steps
● Passive Monitoring
● Active Monitoring
● Ad-Hoc Testing
Passive Monitoring
System
under
Test
tracing
tapping
Calling
Party
Calling
Party
Passive Monitoring
Solution
capture
agent
capture
agent
tapping
kamailio rtpengine
kamailio rtpengine
Active Monitoring
System
under
Test
Orchestration
Aggregation
sipp baresip
chromium
headless
kamailio rtpengine
Docker
Android
Emulator
Remote control
● baresip offers MQTT and HTTP
● sipp offers UDP
● Appium offers Selenium Webdriver
● Kamailio/rtpengine offer MQTT
Active Monitoring
SIP Test Flow
Active Monitoring
Ad-Hoc Testing
System
under
Test
sipp
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE scenario SYSTEM "sipp.dtd">
<scenario name="basic-call">
<send>
<![CDATA[
INVITE sip:bob@example.com SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
Max-Forwards: 70
From: "Alice" <sip:alice@example.com>;tag=[call_number]
To: "Bob" <sip:bob@example.com>
Call-ID: [call_id]
CSeq: [cseq] INVITE
Contact: <sip:alice@[local_ip]:[local_port]>
User-Agent: sipp
Content-Type: application/sdp
Content-Length: [len]
v=0
o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip]
s=-
t=0 0
c=IN IP[media_ip_type] [media_ip]
m=audio [media_port] RTP/AVP 8
a=rtpmap:8 PCMA/8000
]]>
</send>
<recv response="100" optional="true">
</recv>
<recv response="180">
</recv>
…
</scenario>
SIPP Scenario Generator
“This is nice, BUT…”
API Testing
curl -X POST 
“https://app.sipfront.com/api/v2/run” 
-u “$SIPFRONT_USER:$SIPFRONT_TOKEN” 
--data-urlencode “test.name=wait-for-call”
curl -X POST 
"https://api.twilio.com/2010-04-01/Accounts/$SID/Calls.json" 
-u $TWILIO_USER:$TWILIO_TOKEN 
--data-urlencode "Url=http://demo.twilio.com/docs/voice.xml" 
--data-urlencode "To=+19991000" 
--data-urlencode "From=+19992000"
API Testing
curl -X POST 
“https://app.sipfront.com/api/v2/run” 
-u “$SIPFRONT_USER:$SIPFRONT_TOKEN” 
--data-urlencode “test.name=basic-call-a-b”
THANK YOU

Programmable Testing for Programmable Telcos, Andreas Granig