Bogdan Andrei Iancu
- 2 May 2017 -
Keynotes
OpenSIPS 2.3
Bogdan Iancu - OpenSIPS Project
Welcome
2
Bogdan Iancu - OpenSIPS Project 3
Bogdan Iancu - OpenSIPS Project 4
Bogdan Iancu - OpenSIPS Project 5
Bogdan Iancu - OpenSIPS Project
OpenSIPS 2.3 - when ?
● Beta release - 16th of March
● Stable Release – 26th April 2017
● General Availability – 2nd of May 2017
6
Bogdan Iancu - OpenSIPS Project
Keyword “Integration”
● VoIP platforms/systems are more than SIP Engines/OpenSIPS
● OpenSIPS must have the ability to integrate and work
together in all possible means with other projects,
protocols, systems or concepts.
7
Bogdan Iancu - OpenSIPS Project
Benefits of the “Integration”
● Ability to build complex systems
○ More possibilities means more value
○ Brings in third-party value
● Reduces the user effort
○ As required knowledge
○ As required work
8
Bogdan Iancu - OpenSIPS Project
The Success of the “Integration”
● A collaboration with the teams of the partner projects in
terms of ideas, brainstorming, solutions and of course,
work.
● A collaboration that resulted in solutions and benefits
for all the involved communities.
9
SIPCapturing/HOMER Integration
Bogdan Iancu - OpenSIPS Project
Integrated capturing
● non-SIP tracing - tracing more than SIP
● data correlation - see the being picture
11
Bogdan Iancu - OpenSIPS Project
Integrated capturing
12
OpenSIPS
Server
HOMER 6
Correlation between:
● SIP
● LOGS
● REST queries
● MI commands
● Transport layer (TLS, WS, WSS)
Capturing via HEP
Bogdan Iancu - OpenSIPS Project
Global view
13
FreeSWITCH integration
Bogdan Iancu - OpenSIPS Project
Mid-registrar
● An OpenSIPS frontend can offload and help FreeSWITCH with
REGISTER traffic processing.
● OpenSIPS can prolong the registration sessions or can
aggregate all the registration for the same
AOR/subscriber.
15
Bogdan Iancu - OpenSIPS Project
Mid-registrar 1
16
OpenSIPS
Front-end
FreeSWITCH
SIP UAC
SIP UAC
SIP UAC
FreeSWITCH
FreeSWITCH
60 seconds registration
rate ->
60 registers / hour
3600 seconds registration
rate ->
1 register / hour
Bogdan Iancu - OpenSIPS Project
Mid-registrar 2
17
OpenSIPS
Front-end
SIP UAC
SIP UAC
SIP UAC
3 devices per AOR ->
3 registers / AOR
1 contact per AOR
1 register / AOR
FreeSWITCH
FreeSWITCH
FreeSWITCH
Bogdan Iancu - OpenSIPS Project
FreeSWITCH driven LB
● get load feedback from FreeSWITCH via ESL
● do an accurate load-balancing over a FreeSWITCH cluster
● Adjust the load distributions to correct external
influence
18
Bogdan Iancu - OpenSIPS Project
FreeSWITCH driven balancing
19
OpenSIPS
Load Balancer
FreeSWITCH
FreeSWITCH
Load ??
Load info via HeartBeat (ESL)
CGRates Integration
Bogdan Iancu - OpenSIPS Project
CGRates
● SIP without billing is like a dinner without a good wine
● CGRateS is an open-source rating engine used for
○ carrier-grade, multi-tenant, real-time billing
○ Post and pre paid
21
Bogdan Iancu - OpenSIPS Project
CGRates Integration
● Call authorization
● Accounting and charging
● CDR generation
22
Bogdan Iancu - OpenSIPS Project
CGRates billing
23
OpenSIPS
Server CGRates
SIP UAC
SIP UAC
SIP
JSONRPC
# do accounting for this call
cgrate_acc("cdr", "$fU", "$rU");
SIP-I Integration
Bogdan Iancu - OpenSIPS Project
SS7
25
SS7 GW
Carrier
SIP UAC
SS7 SIP
$$$$$$$$$
● SS7 interconnections are costly and difficult to set
Bogdan Iancu - OpenSIPS Project
SIP-I
SIP-I is very powerful as:
● it is SIP based, so simple to deal with (comparing to
SS7, of course )
● it exposes SS7 specific data via the ISUP payload
26
Bogdan Iancu - OpenSIPS Project
SIP-I is not SIP
27
SIP Server
Carrier
SIP UAC
SIP-I SIP-I
Bogdan Iancu - OpenSIPS Project
SIP-I gatewaying
28
OpenSIPS
Server
Carrier
SIP UAC
SIP-I SIP
Simple script usage:
● add_isup_part(“ANM”)
● strip_body_part(“application/isup”)
● $isup_param(Called Party Number | Address signal)
Event Based Routing
Bogdan Iancu - OpenSIPS Project
Event Based Routing
Addressed problems:
● communicate and exchange data with the processing of a
different SIP message
● synchronize or wait for actions related to the
processing of a different SIP message
30
Bogdan Iancu - OpenSIPS Project
EBR concepts
● Implements a Subscriber - Notify model
● Events - triggered by actions / data processing during
runtime; events carry custom data.
● Subscriber - any IPS msg processing may subscribe for
events (with filtering)
31
Bogdan Iancu - OpenSIPS Project
Event async waiting
32
Time
SIP packet arrivals
Thread
1
Thread
2
SIP msg A
SIP msg B
wait(event X) resume()
event X
Bogdan Iancu - OpenSIPS Project
Event notification
33
Time
SIP packet arrivals
Thread
1
Thread
2
SIP msg A
SIP msg B
trigger(eventX,handler)
eventX
handler
Bogdan Iancu - OpenSIPS Project
EBR scenarios
● Push notification
● Call pickup
● DTMF call driving
34
Bogdan Iancu - OpenSIPS Project
Push Notification scenario
● we want to deliver the call right away to already
registered UACs, without any waiting due the PN logic.
● we want to do parallel forking (simultaneous ringing) to
newly registered UACs, as soon as it registers (as a
result of PN)
● we want to keep the call on, even if the registered UACs
declines it (maybe due to DND) and give a chance to the
PN to trigger the mobile device registration.
35
Bogdan Iancu - OpenSIPS Project
Push Notification
Route[do_pn]{
t_newtran();
t_wait_for_new_branches();
$avp(filter) = "aor="+$rU+"@"+$rd;
notify_on_event("E_UL_CONTACT_INSERT","$avp(filter)","fork_call");
launch ( exec("/my/pn_triggering_script.sh") );
if (lookup("location"))
t_relay();
}
route[use_new_contact] {
t_inject_branches("event");
}
36
And More….
Bogdan Iancu - OpenSIPS Project
RabbitMQ enhancements
● Direct trigger of RMQ messages from script
● Custom data can be pushed into RMQ messages
● Custom formatting (attributes/headers) of RMQ messages
● Fine tuning of the AMQP protocol options
38
Bogdan Iancu - OpenSIPS Project
XML wise variables
● provides parsing and manipulation of XML documents
● Very useful for Presence related data manipulation
$xml(body) = $rb(application/dialog-info+xml);
$var(identity) = $xml(body/dialog-info/dialog/remote/identity.val);
39
Bogdan Iancu - OpenSIPS Project
Extended Async Support
“Launch()” script statement
● Spinoff some processing without waiting for it to finish
● Continue the script execution (no resuming)
...
launch( avp_db_query("insert into .....") );
xlog("insert started, continuing...n);
...
40
Bogdan Iancu - OpenSIPS Project
More Reliable Accounting
A more reliable way to populate ACC data
● $acc_extra[]
● $acc_leg[] (instead of old complicated AVP)
modparam("acc", "leg_fields", "log: caller; callee")
...
acc_new_leg();
$acc_leg(callee) = $ru;
...
41
● Bogdan Iancu
○ OpenSIPS Project: www.opensips.org
○ Email: bogdan@opensips.org
Enjoy OpenSIPS 2.3

OPensips keynote presentation by bogdan Iancu

  • 1.
    Bogdan Andrei Iancu -2 May 2017 - Keynotes OpenSIPS 2.3
  • 2.
    Bogdan Iancu -OpenSIPS Project Welcome 2
  • 3.
    Bogdan Iancu -OpenSIPS Project 3
  • 4.
    Bogdan Iancu -OpenSIPS Project 4
  • 5.
    Bogdan Iancu -OpenSIPS Project 5
  • 6.
    Bogdan Iancu -OpenSIPS Project OpenSIPS 2.3 - when ? ● Beta release - 16th of March ● Stable Release – 26th April 2017 ● General Availability – 2nd of May 2017 6
  • 7.
    Bogdan Iancu -OpenSIPS Project Keyword “Integration” ● VoIP platforms/systems are more than SIP Engines/OpenSIPS ● OpenSIPS must have the ability to integrate and work together in all possible means with other projects, protocols, systems or concepts. 7
  • 8.
    Bogdan Iancu -OpenSIPS Project Benefits of the “Integration” ● Ability to build complex systems ○ More possibilities means more value ○ Brings in third-party value ● Reduces the user effort ○ As required knowledge ○ As required work 8
  • 9.
    Bogdan Iancu -OpenSIPS Project The Success of the “Integration” ● A collaboration with the teams of the partner projects in terms of ideas, brainstorming, solutions and of course, work. ● A collaboration that resulted in solutions and benefits for all the involved communities. 9
  • 10.
  • 11.
    Bogdan Iancu -OpenSIPS Project Integrated capturing ● non-SIP tracing - tracing more than SIP ● data correlation - see the being picture 11
  • 12.
    Bogdan Iancu -OpenSIPS Project Integrated capturing 12 OpenSIPS Server HOMER 6 Correlation between: ● SIP ● LOGS ● REST queries ● MI commands ● Transport layer (TLS, WS, WSS) Capturing via HEP
  • 13.
    Bogdan Iancu -OpenSIPS Project Global view 13
  • 14.
  • 15.
    Bogdan Iancu -OpenSIPS Project Mid-registrar ● An OpenSIPS frontend can offload and help FreeSWITCH with REGISTER traffic processing. ● OpenSIPS can prolong the registration sessions or can aggregate all the registration for the same AOR/subscriber. 15
  • 16.
    Bogdan Iancu -OpenSIPS Project Mid-registrar 1 16 OpenSIPS Front-end FreeSWITCH SIP UAC SIP UAC SIP UAC FreeSWITCH FreeSWITCH 60 seconds registration rate -> 60 registers / hour 3600 seconds registration rate -> 1 register / hour
  • 17.
    Bogdan Iancu -OpenSIPS Project Mid-registrar 2 17 OpenSIPS Front-end SIP UAC SIP UAC SIP UAC 3 devices per AOR -> 3 registers / AOR 1 contact per AOR 1 register / AOR FreeSWITCH FreeSWITCH FreeSWITCH
  • 18.
    Bogdan Iancu -OpenSIPS Project FreeSWITCH driven LB ● get load feedback from FreeSWITCH via ESL ● do an accurate load-balancing over a FreeSWITCH cluster ● Adjust the load distributions to correct external influence 18
  • 19.
    Bogdan Iancu -OpenSIPS Project FreeSWITCH driven balancing 19 OpenSIPS Load Balancer FreeSWITCH FreeSWITCH Load ?? Load info via HeartBeat (ESL)
  • 20.
  • 21.
    Bogdan Iancu -OpenSIPS Project CGRates ● SIP without billing is like a dinner without a good wine ● CGRateS is an open-source rating engine used for ○ carrier-grade, multi-tenant, real-time billing ○ Post and pre paid 21
  • 22.
    Bogdan Iancu -OpenSIPS Project CGRates Integration ● Call authorization ● Accounting and charging ● CDR generation 22
  • 23.
    Bogdan Iancu -OpenSIPS Project CGRates billing 23 OpenSIPS Server CGRates SIP UAC SIP UAC SIP JSONRPC # do accounting for this call cgrate_acc("cdr", "$fU", "$rU");
  • 24.
  • 25.
    Bogdan Iancu -OpenSIPS Project SS7 25 SS7 GW Carrier SIP UAC SS7 SIP $$$$$$$$$ ● SS7 interconnections are costly and difficult to set
  • 26.
    Bogdan Iancu -OpenSIPS Project SIP-I SIP-I is very powerful as: ● it is SIP based, so simple to deal with (comparing to SS7, of course ) ● it exposes SS7 specific data via the ISUP payload 26
  • 27.
    Bogdan Iancu -OpenSIPS Project SIP-I is not SIP 27 SIP Server Carrier SIP UAC SIP-I SIP-I
  • 28.
    Bogdan Iancu -OpenSIPS Project SIP-I gatewaying 28 OpenSIPS Server Carrier SIP UAC SIP-I SIP Simple script usage: ● add_isup_part(“ANM”) ● strip_body_part(“application/isup”) ● $isup_param(Called Party Number | Address signal)
  • 29.
  • 30.
    Bogdan Iancu -OpenSIPS Project Event Based Routing Addressed problems: ● communicate and exchange data with the processing of a different SIP message ● synchronize or wait for actions related to the processing of a different SIP message 30
  • 31.
    Bogdan Iancu -OpenSIPS Project EBR concepts ● Implements a Subscriber - Notify model ● Events - triggered by actions / data processing during runtime; events carry custom data. ● Subscriber - any IPS msg processing may subscribe for events (with filtering) 31
  • 32.
    Bogdan Iancu -OpenSIPS Project Event async waiting 32 Time SIP packet arrivals Thread 1 Thread 2 SIP msg A SIP msg B wait(event X) resume() event X
  • 33.
    Bogdan Iancu -OpenSIPS Project Event notification 33 Time SIP packet arrivals Thread 1 Thread 2 SIP msg A SIP msg B trigger(eventX,handler) eventX handler
  • 34.
    Bogdan Iancu -OpenSIPS Project EBR scenarios ● Push notification ● Call pickup ● DTMF call driving 34
  • 35.
    Bogdan Iancu -OpenSIPS Project Push Notification scenario ● we want to deliver the call right away to already registered UACs, without any waiting due the PN logic. ● we want to do parallel forking (simultaneous ringing) to newly registered UACs, as soon as it registers (as a result of PN) ● we want to keep the call on, even if the registered UACs declines it (maybe due to DND) and give a chance to the PN to trigger the mobile device registration. 35
  • 36.
    Bogdan Iancu -OpenSIPS Project Push Notification Route[do_pn]{ t_newtran(); t_wait_for_new_branches(); $avp(filter) = "aor="+$rU+"@"+$rd; notify_on_event("E_UL_CONTACT_INSERT","$avp(filter)","fork_call"); launch ( exec("/my/pn_triggering_script.sh") ); if (lookup("location")) t_relay(); } route[use_new_contact] { t_inject_branches("event"); } 36
  • 37.
  • 38.
    Bogdan Iancu -OpenSIPS Project RabbitMQ enhancements ● Direct trigger of RMQ messages from script ● Custom data can be pushed into RMQ messages ● Custom formatting (attributes/headers) of RMQ messages ● Fine tuning of the AMQP protocol options 38
  • 39.
    Bogdan Iancu -OpenSIPS Project XML wise variables ● provides parsing and manipulation of XML documents ● Very useful for Presence related data manipulation $xml(body) = $rb(application/dialog-info+xml); $var(identity) = $xml(body/dialog-info/dialog/remote/identity.val); 39
  • 40.
    Bogdan Iancu -OpenSIPS Project Extended Async Support “Launch()” script statement ● Spinoff some processing without waiting for it to finish ● Continue the script execution (no resuming) ... launch( avp_db_query("insert into .....") ); xlog("insert started, continuing...n); ... 40
  • 41.
    Bogdan Iancu -OpenSIPS Project More Reliable Accounting A more reliable way to populate ACC data ● $acc_extra[] ● $acc_leg[] (instead of old complicated AVP) modparam("acc", "leg_fields", "log: caller; callee") ... acc_new_leg(); $acc_leg(callee) = $ru; ... 41
  • 42.
    ● Bogdan Iancu ○OpenSIPS Project: www.opensips.org ○ Email: bogdan@opensips.org Enjoy OpenSIPS 2.3