SlideShare a Scribd company logo
SEMS SBC
Stefan Sayer
CEO, FRAFOS GmbH

FOSDEM 2012, 05.02.2012
Contents

●
    SEMS project


●
    The flexible, open SBC


●
    SBC programmability




                      2
The SIP Express Media Server

●
    Media, application server from iptel.org


●
    Only 1 year younger than SER (*2002)


●
    Widely used by carriers, ITSPs, OEMs,
    Universities, hobbyists


                       3
SEMS use cases




      4
SEMS: The VAS platform

●
    C++, Python APIs
●
    DSM: State charts scripting engine




                       5
SBCs – what?

               “SBCs are SIP
                 application
                servers with
                   focus on
                security and
                  isolation”




     6
SBCs – the need

●
    Security requirements are rising
      → Policy enforcement and control at UNI/NNI
●
    Topology hiding is necessary
      → NAT and security
●
    Core call controls become big and slow
      → Routing and service management at NNI
●
    SIP implementations are buggy
      → “SIP normalization”, translation

                           7
SBCs – the special case

●
    On signaling and media plane


●
    Call stateful – high requirements for
    availability and scalability


●
    Interworking with all “SIP dialects”


                        8
The SEMS SBC

●
    Widely deployed SIP technology


●
    Broad range of media capabilities


●
    Configurable transparency


●
    Policy programmability – “SBC platform”
                       9
Signaling Features

●
    Topology hiding
●
    From, To, RURI, Contact, Call-ID manipulation
●
    Header and message filter
●
    Adding headers
●
    Reply code translation
●
    SIP authentication
●
    SIP Session Timer, Call Timer
●
    Prepaid accounting

                             10
Media features

●
    RTP anchoring / media steering
●
    Physical network separation
●
    NAT traversal, symmetric RTP (comedia
    style)
●
    Codec filter
●
    SDP normalization


                        11
Flexible profile based control

                    sbc.conf                        iptelecho.sbcprofile.conf
                     load_profiles=iptelecho         URI=sip:echo@iptel.org
                     active_profile=iptelecho        From=<anonymous@mynet.net>
                     ...                             To=<sip:echo@iptel.org>
                                                     ...


                                                 SEMS SBC
#                                                           #
U 210.13.3.122:5080 -> 210.13.3.100:5060                    U 210.13.3.100:5060 -> 213.192.59.75:5060
INVITE sip:+49123@osbc1.mynet.net SIP/2.0                   INVITE sip:echo@iptel.org SIP/2.0
From: “John” <sip:+431556221@mynet.net>;tag=12              From: <anonymous@mynet.net>;tag=3213
To: “Clara” <+49123@mynet.net>                              To: <sip:echo@iptel.org>
Call-ID: 3cde5d1a960a-dez6oz34llo4                          Call-ID: y76IIPf4UD68bb
...                                                         ...




 ●
     define SBC behaviour in profiles

                                                    12
Set RURI, From, To, Call-ID ...
                                set_fromto.sbcprofile.conf
                                 URI=$tU@sbc1.mypeer.net
                                 From=<$fU@mynet.net>                                          known
                                 To=<sip:$tU@mypeer.net>                                       SER
                                 Call-ID=$ci_leg2                                              pseudo-variables

                                 ...


                                                 SEMS SBC
#                                                            #
U 210.13.3.122:5080 -> 210.13.3.100:5060                     U 210.13.3.100:5060 -> 213.192.59.75:5060
INVITE sip:+49123@osbc1.mynet.net SIP/2.0                    INVITE sip:+49123@sbc1.mypeer.net SIP/2.0
From: “John” <sip:+431556221@mynet.net>;tag=12               From: <+431556221@mynet.net>;tag=3213
To: “Clara” <+49123@mynet.net>                               To: <sip:+49123@mypeer.net>
Call-ID: 3cde5d1a960a-dez6oz34llo4                           Call-ID: 3cde5d1a960a-dez6oz34llo4_leg2
...                                                          ...




                                                  13
Replacement patterns

●
    RURI, From, To, PAI, PPI       ($r, $f, $t, $a, $p)
●
    Call-ID   ($ci)
●
    src, dst IP address/port      ($si, $pi, $Ri, $Rp)
●
    P-App-Param hdr parameter             ($P(myparam))
●
    Header value      ($H(P-My-Header))
●
    Map any value via regexp        ($M(val=>map))




                            14
Control SBC from proxy

                                dynamic_rtprelay_sst.sbcprofile.conf
                                ...
                                enable_rtprelay=$H(P-Enable-RTPRrelay)
                                enable_session_timer=$H(P-Enable-SST)
                                ...



                                                 SEMS SBC
#                                                           #
U 210.13.3.122:5080 -> 210.13.3.100:5060                    U 210.13.3.100:5060 -> 213.192.59.75:5060
INVITE sip:+49123@osbc1.mynet.net SIP/2.0                   INVITE sip:+49123@sbc1.mypeer.net SIP/2.0
From: “John” <sip:+431556221@mynet.net>;tag=12              From: <+431556221@mynet.net>;tag=3213
To: “Clara” <+49123@mynet.net>                              To: <sip:+49123@mypeer.net>
Call-ID: 3cde5d1a960a-dez6oz34llo4                          Call-ID: 3cde5d1a960a-dez6oz34llo4_leg2
P-Enable-RTPRelay: no                                       Session-Expires: 300
P-Enable-SST: yes                                           ...
...




                                                    15
Profile selection

●
    Static
    ●
        active_profile=static_config
●
    Pseudo-var
                                       ipmap.conf
    ●
        active_profile=$rU             ^10.0..*=>internal1
                                       ^10.1..*=>internal2
●
    Mapping                            urimap.conf
                                       iptel.org=>iptel
    ●
        active_profile=$M(val=>map)    fliptel.com=>fliptel

●
    Select first matched
    ●
        active_profile=$M($si=>ipmap),
        $M($ru=>urimap),$H(P-SBCProfile),refuse
                             16
Manage SBC

●
    sems-sbc-* tools
    ●
        get and set active profile
    ●
        load and reload profiles
    ●
        load and reload mappings


●
    Track profile versions with MD5 hash


●
    Get statistics from monitoring
                            17
Processing model
UDP
                                  other
         receiver/msg parser      event sources
         threads

Session Container                                 RTP processing
                                   session        pool
                                   event
                                   queues


                    event processing

●
    Signaling: Async, one thread per call or
    thread pool
●
    Media: Sync, Thread pool

                                       18
SEMS B2BUA architecture


                  DIALOG           DIALOG


    SIP message            event            SIP message




●
    Two complete, separate instances of
    dialog handling: Locally SIP correct

                           19
E.g.: Session Timers

                  SST: refresh!
      Re-INVITE

                  SDP changed?
      200
                                   Re-INVITE
                   event:
                   session
                   changed
                                   200


●
    Use UPDATE or re-INVITE for refresh
●
    SST and timer values per leg
●
    Try to have e2e refresh
                              20
SBC programmability

●
    Pluggable Call Control modules for
    custom SBC application scenario
●
    e.g. policing with external data source
          Call control   Call control   Call control


                            SBC



                         SEMS core




                                   21
Call control SBC-API

●
    V1: connect(...), start(...), end(...)


●
    Control SBC through call profile object


●
    Pattern replacements (provisioning) in both
    input and output


●
    Modules: CDR generation, call timer, prepaid,
    parallel calls limit, REST/http, REDIS blacklist
                           22
Programmability example (1)

●
    Call Forward settings via Web App
●
    Destination queried via REST interface




                      23
Minimal Play! Web app




         24
...with CRUD module




        25
REST call control module

●
    Using libcurl for
    http request


●
    Result expected
    as JSON or TEXT
    (key=valuen)



                        26
Programmability example (2)

●
    In-memory Blacklist DB: REDIS
●
    Connection pool
●
    Configurable command
    ●
        SMEMBER blacklist $fU
    ●
        rate limiting with ZRANGE
    ●
        More complex logic in lua
    ●
        ...


                           27
Programmability example (3)

FRAFOS:
SBC with
Provisioning and
OAM GUI




                   28
FRAFOS: SBC high availability

●
    Replication of call state to hot standby


●
    Transparent fail-over




                       29
SBC performance




      30
Thank You.

http://iptel.org/sems

More Related Content

PDF
Getting started with SIP Express Media Server SIP app server and SBC - workshop
PDF
SIP Express Media Server SBC application as powerful SBC and SIP toolbox
PDF
Asterisk: the future is at REST
PPTX
Todo lo lo que necesita saber para implementar FreePBX
PDF
LinuxCon North America: SIPPing from the Open Source Well
PPTX
Asterisk: dongled !
DOCX
Asa pixfwsm multicast tips and common problems
PDF
Spoto updated new
Getting started with SIP Express Media Server SIP app server and SBC - workshop
SIP Express Media Server SBC application as powerful SBC and SIP toolbox
Asterisk: the future is at REST
Todo lo lo que necesita saber para implementar FreePBX
LinuxCon North America: SIPPing from the Open Source Well
Asterisk: dongled !
Asa pixfwsm multicast tips and common problems
Spoto updated new

What's hot (18)

PPTX
Basic ASA Configuration, NAT in ASA Firewall
PPTX
Asterisk: dongled !
PDF
The 12 tasks of Asterisk
PDF
6.5.1.2 packet tracer layer 2 security instructor
PDF
9 creating cent_os 7_mages_for_dpdk_training
PPTX
Best practices for using VPNs for easy network-to-network protection
PPTX
Number one-issue-voip-today-fraud
PPTX
No More Fraud, Astricon, Las Vegas 2014
PDF
Telephony Service Development on Asterisk Platform
PDF
Troubleshooting Firewalls (2012 San Diego)
PDF
Pf sense 2.0
PPT
Understanding and Troubleshooting ASA NAT
PDF
2.5.1.2 packet tracer configure cisco routers for syslog, ntp, and ssh oper...
PDF
3. configuring a compute node for nfv
PDF
اسلاید اول جلسه یازدهم کلاس پایتون برای هکرهای قانونی
PDF
Cisco ASA Firewall Interview Question "aka Stump-the-Chump" Question # 01
PDF
Bundling Packages and Deploying Applications with RPM
Basic ASA Configuration, NAT in ASA Firewall
Asterisk: dongled !
The 12 tasks of Asterisk
6.5.1.2 packet tracer layer 2 security instructor
9 creating cent_os 7_mages_for_dpdk_training
Best practices for using VPNs for easy network-to-network protection
Number one-issue-voip-today-fraud
No More Fraud, Astricon, Las Vegas 2014
Telephony Service Development on Asterisk Platform
Troubleshooting Firewalls (2012 San Diego)
Pf sense 2.0
Understanding and Troubleshooting ASA NAT
2.5.1.2 packet tracer configure cisco routers for syslog, ntp, and ssh oper...
3. configuring a compute node for nfv
اسلاید اول جلسه یازدهم کلاس پایتون برای هکرهای قانونی
Cisco ASA Firewall Interview Question "aka Stump-the-Chump" Question # 01
Bundling Packages and Deploying Applications with RPM
Ad

Similar to Fosdem2012 sayer-sems-sbc (20)

PDF
Designing High Performance RTC Signaling Servers
PDF
Banog meetup August 30th, network device property as code
PPTX
drupal ci cd concept cornel univercity.pptx
PDF
Configure Mikrotik Khmer.pdf
PDF
Kamailio - SIP Servers Everywhere
PDF
26.1.7 lab snort and firewall rules
PDF
OSMC 2021 | Icinga-Installer – the easy way to your Icinga
PPTX
SecZone 2011: Scrubbing SAP clean with SOAP
PDF
VoiceBootcamp Ccnp collaboration lab guide v1.0 sample
PDF
InSecure Remote Operations - NullCon 2023 by Yossi Sassi
ODP
Nagios Conference 2014 - Leland Lammert - Distributed Heirarchical Nagios
PDF
Sc manual
PDF
ZTE FL NGN ZXSS10 Induction training manual.pdf
PDF
CCNP Data Center Centralized Management Automation
PDF
Cisco 350-801 Dumps (V26.02) - Get Ready for Your 350-801 Exam Preparation
PPTX
SAP (in)security: Scrubbing SAP clean with SOAP
ODP
Rete di casa e raspberry pi - Home network and Raspberry Pi
PPTX
CI/CD and TDD in deploying kamailio
DOC
Setting ubuntu server sebagai pc router
PDF
r2con 2017 r2cLEMENCy
Designing High Performance RTC Signaling Servers
Banog meetup August 30th, network device property as code
drupal ci cd concept cornel univercity.pptx
Configure Mikrotik Khmer.pdf
Kamailio - SIP Servers Everywhere
26.1.7 lab snort and firewall rules
OSMC 2021 | Icinga-Installer – the easy way to your Icinga
SecZone 2011: Scrubbing SAP clean with SOAP
VoiceBootcamp Ccnp collaboration lab guide v1.0 sample
InSecure Remote Operations - NullCon 2023 by Yossi Sassi
Nagios Conference 2014 - Leland Lammert - Distributed Heirarchical Nagios
Sc manual
ZTE FL NGN ZXSS10 Induction training manual.pdf
CCNP Data Center Centralized Management Automation
Cisco 350-801 Dumps (V26.02) - Get Ready for Your 350-801 Exam Preparation
SAP (in)security: Scrubbing SAP clean with SOAP
Rete di casa e raspberry pi - Home network and Raspberry Pi
CI/CD and TDD in deploying kamailio
Setting ubuntu server sebagai pc router
r2con 2017 r2cLEMENCy
Ad

More from stefansayer (7)

PDF
The FRAFOS ABC SBC WebRTC gateway
PDF
WebRTC: Why and How?
PDF
FRAFOS ABC Session Border Controller
PDF
Understanding Session Border Controllers
PDF
Frafos ABC SBC - Secure peering
PDF
FRAFOS Secure Session Border Control
PDF
12 vladimir.broz-sems-sbc
The FRAFOS ABC SBC WebRTC gateway
WebRTC: Why and How?
FRAFOS ABC Session Border Controller
Understanding Session Border Controllers
Frafos ABC SBC - Secure peering
FRAFOS Secure Session Border Control
12 vladimir.broz-sems-sbc

Recently uploaded (20)

PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Heart disease approach using modified random forest and particle swarm optimi...
PPTX
Chapter 5: Probability Theory and Statistics
PDF
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
PPTX
OMC Textile Division Presentation 2021.pptx
PDF
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
PDF
Zenith AI: Advanced Artificial Intelligence
PDF
Getting Started with Data Integration: FME Form 101
PDF
A novel scalable deep ensemble learning framework for big data classification...
PDF
Enhancing emotion recognition model for a student engagement use case through...
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
A comparative study of natural language inference in Swahili using monolingua...
PDF
Hybrid model detection and classification of lung cancer
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
Group 1 Presentation -Planning and Decision Making .pptx
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Heart disease approach using modified random forest and particle swarm optimi...
Chapter 5: Probability Theory and Statistics
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
OMC Textile Division Presentation 2021.pptx
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
Accuracy of neural networks in brain wave diagnosis of schizophrenia
Zenith AI: Advanced Artificial Intelligence
Getting Started with Data Integration: FME Form 101
A novel scalable deep ensemble learning framework for big data classification...
Enhancing emotion recognition model for a student engagement use case through...
Assigned Numbers - 2025 - Bluetooth® Document
Digital-Transformation-Roadmap-for-Companies.pptx
A comparative study of natural language inference in Swahili using monolingua...
Hybrid model detection and classification of lung cancer
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Agricultural_Statistics_at_a_Glance_2022_0.pdf

Fosdem2012 sayer-sems-sbc

  • 1. SEMS SBC Stefan Sayer CEO, FRAFOS GmbH FOSDEM 2012, 05.02.2012
  • 2. Contents ● SEMS project ● The flexible, open SBC ● SBC programmability 2
  • 3. The SIP Express Media Server ● Media, application server from iptel.org ● Only 1 year younger than SER (*2002) ● Widely used by carriers, ITSPs, OEMs, Universities, hobbyists 3
  • 5. SEMS: The VAS platform ● C++, Python APIs ● DSM: State charts scripting engine 5
  • 6. SBCs – what? “SBCs are SIP application servers with focus on security and isolation” 6
  • 7. SBCs – the need ● Security requirements are rising → Policy enforcement and control at UNI/NNI ● Topology hiding is necessary → NAT and security ● Core call controls become big and slow → Routing and service management at NNI ● SIP implementations are buggy → “SIP normalization”, translation 7
  • 8. SBCs – the special case ● On signaling and media plane ● Call stateful – high requirements for availability and scalability ● Interworking with all “SIP dialects” 8
  • 9. The SEMS SBC ● Widely deployed SIP technology ● Broad range of media capabilities ● Configurable transparency ● Policy programmability – “SBC platform” 9
  • 10. Signaling Features ● Topology hiding ● From, To, RURI, Contact, Call-ID manipulation ● Header and message filter ● Adding headers ● Reply code translation ● SIP authentication ● SIP Session Timer, Call Timer ● Prepaid accounting 10
  • 11. Media features ● RTP anchoring / media steering ● Physical network separation ● NAT traversal, symmetric RTP (comedia style) ● Codec filter ● SDP normalization 11
  • 12. Flexible profile based control sbc.conf iptelecho.sbcprofile.conf load_profiles=iptelecho URI=sip:echo@iptel.org active_profile=iptelecho From=<anonymous@mynet.net> ... To=<sip:echo@iptel.org> ... SEMS SBC # # U 210.13.3.122:5080 -> 210.13.3.100:5060 U 210.13.3.100:5060 -> 213.192.59.75:5060 INVITE sip:+49123@osbc1.mynet.net SIP/2.0 INVITE sip:echo@iptel.org SIP/2.0 From: “John” <sip:+431556221@mynet.net>;tag=12 From: <anonymous@mynet.net>;tag=3213 To: “Clara” <+49123@mynet.net> To: <sip:echo@iptel.org> Call-ID: 3cde5d1a960a-dez6oz34llo4 Call-ID: y76IIPf4UD68bb ... ... ● define SBC behaviour in profiles 12
  • 13. Set RURI, From, To, Call-ID ... set_fromto.sbcprofile.conf URI=$tU@sbc1.mypeer.net From=<$fU@mynet.net> known To=<sip:$tU@mypeer.net> SER Call-ID=$ci_leg2 pseudo-variables ... SEMS SBC # # U 210.13.3.122:5080 -> 210.13.3.100:5060 U 210.13.3.100:5060 -> 213.192.59.75:5060 INVITE sip:+49123@osbc1.mynet.net SIP/2.0 INVITE sip:+49123@sbc1.mypeer.net SIP/2.0 From: “John” <sip:+431556221@mynet.net>;tag=12 From: <+431556221@mynet.net>;tag=3213 To: “Clara” <+49123@mynet.net> To: <sip:+49123@mypeer.net> Call-ID: 3cde5d1a960a-dez6oz34llo4 Call-ID: 3cde5d1a960a-dez6oz34llo4_leg2 ... ... 13
  • 14. Replacement patterns ● RURI, From, To, PAI, PPI ($r, $f, $t, $a, $p) ● Call-ID ($ci) ● src, dst IP address/port ($si, $pi, $Ri, $Rp) ● P-App-Param hdr parameter ($P(myparam)) ● Header value ($H(P-My-Header)) ● Map any value via regexp ($M(val=>map)) 14
  • 15. Control SBC from proxy dynamic_rtprelay_sst.sbcprofile.conf ... enable_rtprelay=$H(P-Enable-RTPRrelay) enable_session_timer=$H(P-Enable-SST) ... SEMS SBC # # U 210.13.3.122:5080 -> 210.13.3.100:5060 U 210.13.3.100:5060 -> 213.192.59.75:5060 INVITE sip:+49123@osbc1.mynet.net SIP/2.0 INVITE sip:+49123@sbc1.mypeer.net SIP/2.0 From: “John” <sip:+431556221@mynet.net>;tag=12 From: <+431556221@mynet.net>;tag=3213 To: “Clara” <+49123@mynet.net> To: <sip:+49123@mypeer.net> Call-ID: 3cde5d1a960a-dez6oz34llo4 Call-ID: 3cde5d1a960a-dez6oz34llo4_leg2 P-Enable-RTPRelay: no Session-Expires: 300 P-Enable-SST: yes ... ... 15
  • 16. Profile selection ● Static ● active_profile=static_config ● Pseudo-var ipmap.conf ● active_profile=$rU ^10.0..*=>internal1 ^10.1..*=>internal2 ● Mapping urimap.conf iptel.org=>iptel ● active_profile=$M(val=>map) fliptel.com=>fliptel ● Select first matched ● active_profile=$M($si=>ipmap), $M($ru=>urimap),$H(P-SBCProfile),refuse 16
  • 17. Manage SBC ● sems-sbc-* tools ● get and set active profile ● load and reload profiles ● load and reload mappings ● Track profile versions with MD5 hash ● Get statistics from monitoring 17
  • 18. Processing model UDP other receiver/msg parser event sources threads Session Container RTP processing session pool event queues event processing ● Signaling: Async, one thread per call or thread pool ● Media: Sync, Thread pool 18
  • 19. SEMS B2BUA architecture DIALOG DIALOG SIP message event SIP message ● Two complete, separate instances of dialog handling: Locally SIP correct 19
  • 20. E.g.: Session Timers SST: refresh! Re-INVITE SDP changed? 200 Re-INVITE event: session changed 200 ● Use UPDATE or re-INVITE for refresh ● SST and timer values per leg ● Try to have e2e refresh 20
  • 21. SBC programmability ● Pluggable Call Control modules for custom SBC application scenario ● e.g. policing with external data source Call control Call control Call control SBC SEMS core 21
  • 22. Call control SBC-API ● V1: connect(...), start(...), end(...) ● Control SBC through call profile object ● Pattern replacements (provisioning) in both input and output ● Modules: CDR generation, call timer, prepaid, parallel calls limit, REST/http, REDIS blacklist 22
  • 23. Programmability example (1) ● Call Forward settings via Web App ● Destination queried via REST interface 23
  • 26. REST call control module ● Using libcurl for http request ● Result expected as JSON or TEXT (key=valuen) 26
  • 27. Programmability example (2) ● In-memory Blacklist DB: REDIS ● Connection pool ● Configurable command ● SMEMBER blacklist $fU ● rate limiting with ZRANGE ● More complex logic in lua ● ... 27
  • 28. Programmability example (3) FRAFOS: SBC with Provisioning and OAM GUI 28
  • 29. FRAFOS: SBC high availability ● Replication of call state to hot standby ● Transparent fail-over 29