SlideShare a Scribd company logo
FreeTDM PRI Passive Call Recording


            Moises Silva <moy@sangoma.com>
            Senior Software Engineer.
            Sangoma Technologies.




                                      02 Aug-2010 / 1
Agenda
•   What is FreeTDM.

•   FreeTDM API basics.

•   PRI passive line monitoring.

•   ftmod_pritap – The FreeTDM PRI tapping module.

•   PRI tapping with FreeSWITCH.




                                                     02 Aug-2010 / 2
FreeTDM Architecture
•   libfreetdm.
      – Generic unified “C” API for PSTN I/O and signaling.
•   Modular architecture.
•   I/O modules.
      – Sangoma, DAHDI, PIKA.
•   Signaling modules.
      – isdn, libpri, ss7, pritap, openr2.
•   mod_freetdm.
      – Interface to FreeSWITCH.




                                                              02 Aug-2010 / 3
FreeTDM Architecture




                       02 Aug-2010 / 4
FreeTDM Architecture

•   FreeTDM is the new name of OpenZAP.

•   FreeTDM introduces new features and better integration with new
    Sangoma signaling stacks.

•   Sangoma is committed to support FreeTDM and use it as its own
    signaling and I/O high level API.




                                                            02 Aug-2010 / 5
FreeTDM API basics
•   Span and channel-based API

•   I/O API

     – ftdm_channel_open()

     – ftdm_channel_read/write()

     – ftdm_channel_wait()

     – ftdm_channel_command()

     – ftdm_channel_close()

     – ftdm_span_poll_event()

     – ftdm_span_next_event()
                                   02 Aug-2010 / 6
FreeTDM API basics

•   Call control API (signaling)

     – ftdm_channel_call_place()

     – ftdm_channel_call_indicate()

     – ftdm_channel_call_hold/unhold()

     – ftdm_channel_call_hangup()

•   Outgoing call events through callbacks

     – SIGEVENT_START, SIGEVENT_STOP, SIGEVENT_PROGRESS,
       SIGEVENT_UP etc.



                                                 02 Aug-2010 / 7
PRI Passive Monitoring




                         02 Aug-2010 / 8
PRI Passive Monitoring

•   Also known as tapping, call tapping, wire tapping etc.

•   Captures signaling (D-channel) and voice traffic in T1/E1 link.

•   Typical applications:

     – Call logging.

     – Call recording.

     – Lawful interception.

     – Inbound/Outbound call centers quality assurance.




                                                                02 Aug-2010 / 9
PRI Passive Monitoring




                         02 Aug-2010 / 10
PRI Passive Monitoring

•   Connections between A102 and tapping box.




                                                02 Aug-2010 / 11
PRI Passive Monitoring

•   Connections between A102 and tapping box.




                                                02 Aug-2010 / 12
PRI Passive Monitoring

•   2 Sangoma ports needed per link.

•   Tapping box (PN 633) ensures quality.

•   High impedance mode in the card.

•   Wanpipe drivers drop any tx data.

•   One port for Tx NET, other for TX CPE


                                        Span 1   Span 2




                                                 02 Aug-2010 / 13
PRI Passive Monitoring
•   Raw tapping can be achieved with wanpipemon (pcap file).

•   Raw access to D-channel messages through libsangoma.

•   Voice from NET in span 1, voice from CPE in span 2. In this mode,
    mixing is up to the user.




                                                            02 Aug-2010 / 14
FreeTDM PRI Tapping Module

•   Easier API in C for PRI tapping.

•   You configure your spans with “pritap” signaling.

•   Calls are reported through regular SIGEVENT_ messages.

•   Using I/O FreeTDM API you can access the mixed stream.

     – ftdm_channel_read(ftdmchan) returns the stream already mixed.




                                                              02 Aug-2010 / 15
FreeTDM Tapping Module




                         02 Aug-2010 / 16
FreeTDM PRI Tapping Module

•   Uses passive version of libpri for message decoding.

     – http://svn.digium.com/svn/libpri/team/moy/tap-1.4/

•   Decodes IE’s on SETUP, PROCEED, ALERTING, CONNECT,
    DISCONNECT, etc

•   Planning to move to independent decoder to drop dependency.

•   Configure FreeTDM with –with-pritap to enable ftmod_pritap.so.




                                                            02 Aug-2010 / 17
Wanpipe Configuration

•   Interface in TDM_VOICE_API mode.

•   TE_HIGHIMPEDANCE = YES

•   Sample configs available:

     – at http://wiki.sangoma.com/sangoma-tap-system




                                                       02 Aug-2010 / 18
FreeTDM Configuration

•   Regular T1/E1 configuration parameters for 2 spans (or more).


                     [span wanpipe tap1]
                     trunk_type => T1
                     b-channel => 1:1-23
                     d-channel => 1:24

                     [span wanpipe tap2]
                     trunk_type => T1
                     b-channel => 2:1-23
                     d-channel => 2:24




                                                            02 Aug-2010 / 19
FreeSWITCH PRI tapping

•   No changes at all needed in FreeSWITCH.

•   FreeTDM reports tapped calls to FreeSWITCH as regular incoming
    calls.

•   You use FreeSWITCH dial plan to do recording, logging or any
    other supported FreeSWITCH application on the tapped call.

     – <action application=“record” data=“….”>

•   Any application doing any writing won’t really do anything.




                                                             02 Aug-2010 / 20
FreeSWITCH PRI tapping




                         02 Aug-2010 / 21
FreeSWITCH PRI tapping Configuration
•   XML configuration in autoload_configs/freetdm.conf.xml

       <configuration name="freetdm.conf" description="FreeTDM Configuration">
         <pritap_spans>

         <span name="tap1”>
          <param name="peerspan" value="tap2"/>
          <param name="dialplan" value="XML"/>
          <param name="context" value="default"/>
         </span>

         <span name="tap2”>
          <param name="peerspan" value="tap1"/>
          <param name="dialplan" value="XML"/>
          <param name="context" value="default"/>
         </span>

         </pritap_spans>
       </configuration>




                                                                             02 Aug-2010 / 22
Conclusion

•   You can build now a passive call recorder/logger easily.

•   Tapped system can be any PRI switch/telco.

•   Available in API mode or using standard FreeSWITCH/FreeTDM
    integration.

•   Extensible through regular dial plan logic (XML, LUA etc).




                                                                 02 Aug-2010 / 23
References


- http://wiki.sangoma.com/sangoma-tap-system

- http://wiki.sangoma.com/wanpipe-api-freetdm

- http://wiki.sangoma.com/wanpipe-freeswitch




                                                06-Apr-10 / 24
Thank You!

          Questions and Comments?


Contact e-mail: moy@sangoma.com




                                    02 Aug-2010 / 25

More Related Content

PDF
Asterisk PRI Passive Call Recording
Moises Silva
 
PDF
C04 – Avoiding pitfalls in Profinet RT and IRT node implementation - Hans Der...
PROFIBUS and PROFINET InternationaI - PI UK
 
PPTX
ICE basic
Vu Nguyen
 
PDF
FPGA-based error generator for PROFIBUS DP - Jean-Marc Capron (Yncréa Hauts-d...
PROFIBUS and PROFINET InternationaI - PI UK
 
PPTX
Nat traversal in WebRTC context
AudioCodes
 
PDF
Introduction to PROFINET - Derek Lane of Wago
PROFIBUS and PROFINET InternationaI - PI UK
 
PDF
From NAT to NAT Traversal
Li-Wei Yao
 
PDF
Attacking GRX - GPRS Roaming eXchange
P1Security
 
Asterisk PRI Passive Call Recording
Moises Silva
 
C04 – Avoiding pitfalls in Profinet RT and IRT node implementation - Hans Der...
PROFIBUS and PROFINET InternationaI - PI UK
 
ICE basic
Vu Nguyen
 
FPGA-based error generator for PROFIBUS DP - Jean-Marc Capron (Yncréa Hauts-d...
PROFIBUS and PROFINET InternationaI - PI UK
 
Nat traversal in WebRTC context
AudioCodes
 
Introduction to PROFINET - Derek Lane of Wago
PROFIBUS and PROFINET InternationaI - PI UK
 
From NAT to NAT Traversal
Li-Wei Yao
 
Attacking GRX - GPRS Roaming eXchange
P1Security
 

What's hot (20)

PDF
Stun turn poc_pilot
Mihály Mészáros
 
PDF
PROFINET - applying the Ethernet standard to industral automation - Peter Th...
PROFIBUS and PROFINET InternationaI - PI UK
 
PDF
Demuxed 2020
SeanDuBois3
 
PDF
Philippe Langlois - LTE Pwnage - P1security
P1Security
 
PDF
W4 profinet frame analysis, peter thomas
PROFIBUS and PROFINET InternationaI - PI UK
 
PDF
InfiltrateCon 2016 - Why Nation-State Hack Telco Networks
Omer Coskun
 
PDF
PROFIBUS frame analysis - Peter Thomas of Control Specialists
PROFIBUS and PROFINET InternationaI - PI UK
 
PDF
HITB Labs: Practical Attacks Against 3G/4G Telecommunication Networks
Jim Geovedi
 
PPT
Ice
Tony Deng
 
PPT
NAT Traversal
Davide Carboni
 
PPT
MPLS SDN 2015 - SPRING interoperability testing
Stephane Litkowski
 
PPTX
Implementing MPLS Services using Openflow
APNIC
 
PPT
SurfRider/AMC™ - Modular DSP Resource Board
webhostingguy
 
PDF
ComNet NWKED Data Sheet
JMAC Supply
 
PPTX
BGP persistence
Bertrand Duvivier
 
PDF
PROFINET network qualification Peter Thomas - oct 2015
PROFIBUS and PROFINET InternationaI - PI UK
 
PDF
MIPI DevCon 2016: Accelerating UFS and MIPI UniPro Interoperability Testing
MIPI Alliance
 
PPT
14 Net Quintum
it.times.com.ua
 
PPTX
Session Initiation Protocol
Matt Bynum
 
PDF
Philippe Langlois - Hacking HLR HSS and MME core network elements
P1Security
 
Stun turn poc_pilot
Mihály Mészáros
 
PROFINET - applying the Ethernet standard to industral automation - Peter Th...
PROFIBUS and PROFINET InternationaI - PI UK
 
Demuxed 2020
SeanDuBois3
 
Philippe Langlois - LTE Pwnage - P1security
P1Security
 
W4 profinet frame analysis, peter thomas
PROFIBUS and PROFINET InternationaI - PI UK
 
InfiltrateCon 2016 - Why Nation-State Hack Telco Networks
Omer Coskun
 
PROFIBUS frame analysis - Peter Thomas of Control Specialists
PROFIBUS and PROFINET InternationaI - PI UK
 
HITB Labs: Practical Attacks Against 3G/4G Telecommunication Networks
Jim Geovedi
 
NAT Traversal
Davide Carboni
 
MPLS SDN 2015 - SPRING interoperability testing
Stephane Litkowski
 
Implementing MPLS Services using Openflow
APNIC
 
SurfRider/AMC™ - Modular DSP Resource Board
webhostingguy
 
ComNet NWKED Data Sheet
JMAC Supply
 
BGP persistence
Bertrand Duvivier
 
PROFINET network qualification Peter Thomas - oct 2015
PROFIBUS and PROFINET InternationaI - PI UK
 
MIPI DevCon 2016: Accelerating UFS and MIPI UniPro Interoperability Testing
MIPI Alliance
 
14 Net Quintum
it.times.com.ua
 
Session Initiation Protocol
Matt Bynum
 
Philippe Langlois - Hacking HLR HSS and MME core network elements
P1Security
 
Ad

Similar to FreeTDM PRI Passive Recording (20)

PPT
Freeswitch isdn
Abdinav Singh
 
PDF
VoIP@RCTS presented at CESNET IP Telephony workshop
Marco Mouta
 
PPTX
FreeSWITCH as a Kickass SBC
Moises Silva
 
PDF
Introduction to FreeSWITCH
Chien Cheng Wu
 
PDF
Media Handling in FreeSWITCH
Moises Silva
 
PPTX
Sangoma SBC Training Presentation
Empatiq İletişim Teknolojileri AŞ.
 
PPTX
Día Neocenter | FreePBX The best & most complete open source & Commercial PBX...
Neocenter SA de CV
 
PDF
Product brief - telco bridges -- tmedia media gateways
Kenneth Trueman
 
POT
SIP servers on embedded systems: Powering SoHo communications
RADVISION Ltd.
 
PPT
From MSS to TelScale - Mobicents Summit 2011
telestax
 
PDF
Rayo for XMPP Folks
Mojo Lingo
 
PDF
FreePBX Disaster Recovery
Hossein Yavari
 
PPT
Networing basics
Mohd Arif
 
PDF
GENBAND G6 datasheet
GENBANDcorporate
 
PPTX
Session Initiation Protocol - In depth analysis
chinmaypadhye1985
 
KEY
Fun with Linux Telephony
Donald Burr
 
PDF
SIP Testing with FreeSWITCH
Moises Silva
 
PPT
Introduction To SIP
Chris McAndrew
 
PDF
Understanding Session Border Controllers
stefansayer
 
PPT
How PSTN phone works?
mahipal9
 
Freeswitch isdn
Abdinav Singh
 
VoIP@RCTS presented at CESNET IP Telephony workshop
Marco Mouta
 
FreeSWITCH as a Kickass SBC
Moises Silva
 
Introduction to FreeSWITCH
Chien Cheng Wu
 
Media Handling in FreeSWITCH
Moises Silva
 
Sangoma SBC Training Presentation
Empatiq İletişim Teknolojileri AŞ.
 
Día Neocenter | FreePBX The best & most complete open source & Commercial PBX...
Neocenter SA de CV
 
Product brief - telco bridges -- tmedia media gateways
Kenneth Trueman
 
SIP servers on embedded systems: Powering SoHo communications
RADVISION Ltd.
 
From MSS to TelScale - Mobicents Summit 2011
telestax
 
Rayo for XMPP Folks
Mojo Lingo
 
FreePBX Disaster Recovery
Hossein Yavari
 
Networing basics
Mohd Arif
 
GENBAND G6 datasheet
GENBANDcorporate
 
Session Initiation Protocol - In depth analysis
chinmaypadhye1985
 
Fun with Linux Telephony
Donald Burr
 
SIP Testing with FreeSWITCH
Moises Silva
 
Introduction To SIP
Chris McAndrew
 
Understanding Session Border Controllers
stefansayer
 
How PSTN phone works?
mahipal9
 
Ad

More from Moises Silva (11)

PDF
FreeSWITCH Monitoring
Moises Silva
 
PDF
Scaling FreeSWITCH Performance
Moises Silva
 
PPT
Interfaces de Scripting para librerias en C
Moises Silva
 
PPT
Vulnerabilidades en Aplicaciones Web PHP
Moises Silva
 
PPT
Manejo de Medios en FreeSWITCH
Moises Silva
 
PPTX
Implementation Lessons using WebRTC in Asterisk
Moises Silva
 
PPT
FreeSWITCH Modules for Asterisk Developers
Moises Silva
 
PPT
FreeSWITCH: Asterisk con Esteroides
Moises Silva
 
PPT
Negociacion de Codecs en Asterisk
Moises Silva
 
PDF
Sangoma en el Ecosistema Open Source
Moises Silva
 
PDF
OpenR2 in Asterisk
Moises Silva
 
FreeSWITCH Monitoring
Moises Silva
 
Scaling FreeSWITCH Performance
Moises Silva
 
Interfaces de Scripting para librerias en C
Moises Silva
 
Vulnerabilidades en Aplicaciones Web PHP
Moises Silva
 
Manejo de Medios en FreeSWITCH
Moises Silva
 
Implementation Lessons using WebRTC in Asterisk
Moises Silva
 
FreeSWITCH Modules for Asterisk Developers
Moises Silva
 
FreeSWITCH: Asterisk con Esteroides
Moises Silva
 
Negociacion de Codecs en Asterisk
Moises Silva
 
Sangoma en el Ecosistema Open Source
Moises Silva
 
OpenR2 in Asterisk
Moises Silva
 

FreeTDM PRI Passive Recording

  • 1. FreeTDM PRI Passive Call Recording Moises Silva <[email protected]> Senior Software Engineer. Sangoma Technologies. 02 Aug-2010 / 1
  • 2. Agenda • What is FreeTDM. • FreeTDM API basics. • PRI passive line monitoring. • ftmod_pritap – The FreeTDM PRI tapping module. • PRI tapping with FreeSWITCH. 02 Aug-2010 / 2
  • 3. FreeTDM Architecture • libfreetdm. – Generic unified “C” API for PSTN I/O and signaling. • Modular architecture. • I/O modules. – Sangoma, DAHDI, PIKA. • Signaling modules. – isdn, libpri, ss7, pritap, openr2. • mod_freetdm. – Interface to FreeSWITCH. 02 Aug-2010 / 3
  • 4. FreeTDM Architecture 02 Aug-2010 / 4
  • 5. FreeTDM Architecture • FreeTDM is the new name of OpenZAP. • FreeTDM introduces new features and better integration with new Sangoma signaling stacks. • Sangoma is committed to support FreeTDM and use it as its own signaling and I/O high level API. 02 Aug-2010 / 5
  • 6. FreeTDM API basics • Span and channel-based API • I/O API – ftdm_channel_open() – ftdm_channel_read/write() – ftdm_channel_wait() – ftdm_channel_command() – ftdm_channel_close() – ftdm_span_poll_event() – ftdm_span_next_event() 02 Aug-2010 / 6
  • 7. FreeTDM API basics • Call control API (signaling) – ftdm_channel_call_place() – ftdm_channel_call_indicate() – ftdm_channel_call_hold/unhold() – ftdm_channel_call_hangup() • Outgoing call events through callbacks – SIGEVENT_START, SIGEVENT_STOP, SIGEVENT_PROGRESS, SIGEVENT_UP etc. 02 Aug-2010 / 7
  • 8. PRI Passive Monitoring 02 Aug-2010 / 8
  • 9. PRI Passive Monitoring • Also known as tapping, call tapping, wire tapping etc. • Captures signaling (D-channel) and voice traffic in T1/E1 link. • Typical applications: – Call logging. – Call recording. – Lawful interception. – Inbound/Outbound call centers quality assurance. 02 Aug-2010 / 9
  • 10. PRI Passive Monitoring 02 Aug-2010 / 10
  • 11. PRI Passive Monitoring • Connections between A102 and tapping box. 02 Aug-2010 / 11
  • 12. PRI Passive Monitoring • Connections between A102 and tapping box. 02 Aug-2010 / 12
  • 13. PRI Passive Monitoring • 2 Sangoma ports needed per link. • Tapping box (PN 633) ensures quality. • High impedance mode in the card. • Wanpipe drivers drop any tx data. • One port for Tx NET, other for TX CPE Span 1 Span 2 02 Aug-2010 / 13
  • 14. PRI Passive Monitoring • Raw tapping can be achieved with wanpipemon (pcap file). • Raw access to D-channel messages through libsangoma. • Voice from NET in span 1, voice from CPE in span 2. In this mode, mixing is up to the user. 02 Aug-2010 / 14
  • 15. FreeTDM PRI Tapping Module • Easier API in C for PRI tapping. • You configure your spans with “pritap” signaling. • Calls are reported through regular SIGEVENT_ messages. • Using I/O FreeTDM API you can access the mixed stream. – ftdm_channel_read(ftdmchan) returns the stream already mixed. 02 Aug-2010 / 15
  • 16. FreeTDM Tapping Module 02 Aug-2010 / 16
  • 17. FreeTDM PRI Tapping Module • Uses passive version of libpri for message decoding. – http://svn.digium.com/svn/libpri/team/moy/tap-1.4/ • Decodes IE’s on SETUP, PROCEED, ALERTING, CONNECT, DISCONNECT, etc • Planning to move to independent decoder to drop dependency. • Configure FreeTDM with –with-pritap to enable ftmod_pritap.so. 02 Aug-2010 / 17
  • 18. Wanpipe Configuration • Interface in TDM_VOICE_API mode. • TE_HIGHIMPEDANCE = YES • Sample configs available: – at http://wiki.sangoma.com/sangoma-tap-system 02 Aug-2010 / 18
  • 19. FreeTDM Configuration • Regular T1/E1 configuration parameters for 2 spans (or more). [span wanpipe tap1] trunk_type => T1 b-channel => 1:1-23 d-channel => 1:24 [span wanpipe tap2] trunk_type => T1 b-channel => 2:1-23 d-channel => 2:24 02 Aug-2010 / 19
  • 20. FreeSWITCH PRI tapping • No changes at all needed in FreeSWITCH. • FreeTDM reports tapped calls to FreeSWITCH as regular incoming calls. • You use FreeSWITCH dial plan to do recording, logging or any other supported FreeSWITCH application on the tapped call. – <action application=“record” data=“….”> • Any application doing any writing won’t really do anything. 02 Aug-2010 / 20
  • 21. FreeSWITCH PRI tapping 02 Aug-2010 / 21
  • 22. FreeSWITCH PRI tapping Configuration • XML configuration in autoload_configs/freetdm.conf.xml <configuration name="freetdm.conf" description="FreeTDM Configuration"> <pritap_spans> <span name="tap1”> <param name="peerspan" value="tap2"/> <param name="dialplan" value="XML"/> <param name="context" value="default"/> </span> <span name="tap2”> <param name="peerspan" value="tap1"/> <param name="dialplan" value="XML"/> <param name="context" value="default"/> </span> </pritap_spans> </configuration> 02 Aug-2010 / 22
  • 23. Conclusion • You can build now a passive call recorder/logger easily. • Tapped system can be any PRI switch/telco. • Available in API mode or using standard FreeSWITCH/FreeTDM integration. • Extensible through regular dial plan logic (XML, LUA etc). 02 Aug-2010 / 23
  • 25. Thank You! Questions and Comments? Contact e-mail: [email protected] 02 Aug-2010 / 25

Editor's Notes

  • #5: For the hardware drivers, it should be “Wanpipe” instead of “Wanrouter”