SlideShare a Scribd company logo
GETTING A LIVE TRANSCRIPT
OF YOUR CALL
PASCAL CADOTTE MICHAUD | CORE DEVELOPER
ASTRICON, ATLANTA, OCT. 2019
WHO AM I?
OPEN SOURCE ENTHUSIAST
PASCAL CADOTTE MICHAUD, CORE DEVELOPER @ WAZO
10+ YEARS IN DEVELOPMENT
PROGRAMMING SOFTWARES USING ASTERISK FOR ALMOST 10 YEARS USING
● AMI
● DIALPLAN
● AGI
● ARI AND STASIS APPLICATIONS
@PCADOTTE @PC-M
WAZO PLATFORM
PROJECT MISSION
LEVERAGE THE BEST OPEN SOURCE COMPONENTS TO
TRANSFORM THE WAY WE BUILD IP TELECOM
INFRASTRUCTURE AND CREATE COMMUNICATION SERVICES
WHY WOULD YOU WANT TO STREAM THE AUDIO OUT OF ASTERISK
INTERESTING USES CASES
WHY WOULD I STREAM SOUNDS OUT OF ASTERISK?
● ADDING SUBTITLES TO A CALL
● TRANSLATIONS
● DETECTING CUSTOMER FEELING
● CALL PRIORITIZATION
● FRAUD DETECTION
● INDEXATION
● CALL ROUTING IVR
http://www.wazo-platform.org/blog/solving-the-emergency-call-prioritization-issue-with-programmable-telecom
TIMELINE
AUGUST 2018
AUDIO SOCKET
OCTOBER 2018
ASTRIDEVCON
JANUARY 2019
WAZO PARIS HACKATHON
RES_ARI_STREAM
JULY 2019
ASTRICON CFP
OCTOBER 2019
ASTERISK 16.6.0 WITH
EXTERNALMEDIA
OUR JOURNEY
AUDIO SOCKET
BY SEÁN C. MCCORD
“AUDIOSOCKET IS A SIMPLE TCP-BASED PROTOCOL FOR SENDING AND
RECEIVING REALTIME AUDIO STREAMS.
THERE EXISTS A PROTOCOL DEFINITION, A GO LIBRARY, AND AN ASTERISK
APPLICATION.”
VERY SIMPLE PROTOCOL USING AN ASTERISK DIALPLAN APPLICATION.
SEE SEÁN’S PRESENTATION TOMORROW AT 10:30 FOR MORE INTERESTING
DETAILS.
https://wiki.asterisk.org/wiki/display/AST/AudioSocket
A FIRST WORKING IMPLEMENTATION
RES_ARI_STREAM
RES_ARI_STREAM IS A MODULE
DEVELOPED AS A HACKATHON
PROJECT TO GET A GOOD FEEL OF THE
PROBLEM.
IT USES THE ARI WEBSOCKET WITH
THE SUB-PROTOCOL
“STREAM-CHANNEL”.
HOW DOES IT WORK
RES_ARI_STREAM
1. ON LOAD ADDS A SUB-PROTOCOL TO THE WEBSOCKET
2. ON SUBSCRIPTION A HOOK ON RECEIVED FRAMES IS
ADDED
3. ON VOICE FRAME THE VOICE IS TRANSCODED TO SLIN16
4. THEN THE FRAMES ARE WRITTEN TO THE SUBSCRIBED
WEBSOCKET
https://github.com/sboily/wazo-hackathon-asterisk-stream-module
A VERY BASIC EXAMPLE
WRITING THE AUDIO FRAMES TO A FILE
import websocket
import sys
with open("out.wav", "wb") as f:
ws = websocket.WebSocketApp(
"ws://localhost:5039/ws",
on_message=lambda ws, msg: out.write(msg),
on_error=lambda ws, error: print(error),
on_close=lambda ws: print(“### closed ###”),
subprotocols=["stream-channel"],
header=[“Channel-ID: “ + sys.argv[1]],
)
ws.run_forever()
A VERY SIMPLE EXAMPLE
USAGE
RECORDING THE AUDIO TO A FILE
LISTENING TO YOUR RECORDING
play -t raw -b 16 --endian little -c 1 -e signed-integer -r 16000 out.wav
python3 record-channel-id.py “<my-channel>”
ASTERISK IMPLEMENTATION IN ASTERISK 16.6.0
POST /channels/externalmedia
1. CREATE AN EXTERNAL MEDIA CHANNEL WITH AN HOST AND PORT
2. ASTERISK WILL SEND RTP TO THE HOST AND PORT
3. ADD THE EXTERNAL MEDIA CHANNEL TO THE BRIDGE YOU WISH TO LISTEN
4. READ THE RTP FROM THE SOCKET
THE UNICASTRTP_LOCAL_ADDRESS AND UNICASTRTP_LOCAL_PORT CHANNEL
VARIABLES CONTAIN WHAT YOU NEED TO SEND MEDIA BACK TO ASTERISK.
https://wiki.asterisk.org/wiki/display/AST/External+Media+and+ARI
https://github.com/asterisk/asterisk-external-media
DIFFERENCES BETWEEN THE 3 OPTIONS
RES_ARI_STREAM ARI EXTERNALMEDIA AUDIOSOCKET
MEDIA DIRECTION UNI-DIRECTIONAL BI-DIRECTIONAL BI-DIRECTIONAL
USAGE
HTTP ENDPOINT WITH A
SPECIFIC SUB-PROTOCOL FOR
THE WEBSOCKET
LIMITED TO CHANNELS IN
STASIS
DIALPLAN APPLICATION AND
CHANNEL DRIVER
ARI RESOURCE IN A GERRIT PULL
REQUEST
FORMAT SLIN16 IS RECEIVED
RTP WITH SPECIFIED CODEC
IS RECEIVED
VERY SIMPLE PROTOCOL WITH
SLIN16 PAYLOAD
CONNECTIVITY CONNECTS TO A CHANNEL CONNECTS TO A BRIDGE
CONNECTS TO A CHANNEL OR A
BRIDGE
TRANSPORT WEBSOCKET UDP TCP
RES_ARI_STREAM DEMO
DEMO OF THE RES_ARI_STREAM MODULE
https://github.com/pc-m/transcript-demo/blob/master/transcript_demo/wazo.py
https://github.com/pc-m/transcript-demo/blob/master/transcript_demo/transcription.py
INCOMING CALL
AN INCOMING CALL IS
ANSWERED BY ALICE
THIS IS A NORMAL CALL, NO
STASIS APPLICATION IS
REQUIRED HERE
TRANSCRIPT SCRIPT
TRANSCRIPTION SCRIPT IS
LAUNCHED ON THE
INCOMING CALL
THE SCRIPT CONNECTS TO THE
ASTERISK WEBSOCKET AND
REGISTERS ITSELF TO THE
INCOMING CALL CHANNEL ID
GOOGLE SPEECH API
TRANSCRIPTION
GOOGLE SPEECH API IS USED
FOR THE TRANSCRIPTION
USER
HTTP SERVER
THE TRANSLATED TEXT IS
SERVED TO THE USER
ARI EXTERNAL MEDIA DEMO
DEMO OF THE ASTERISK ARI VERSION
https://github.com/pc-m/transcript-demo/blob/master/transcript_demo/ari_stasis.py
https://github.com/pc-m/transcript-demo/blob/master/transcript_demo/ari_server.py
https://github.com/pc-m/transcript-demo/blob/master/transcript_demo/transcription.py
STASIS
THE CALL ENTERS
STASIS
THE STASIS APPLICATION
ADDS THE CALL TO ITS
BRIDGE
UDP SERVER
THE SERVER RECEIVES
THE RTP FROM
ASTERISK
THE SERVER CREATES THE
EXTERNAL MEDIA CHANNELS
WHICH GET ADDED TO THE
STASIS BRIDGE AND RECEIVES
THE RTP
GOOGLE SPEECH API
TRANSCRIPTION
GOOGLE SPEECH API IS
USED FOR THE
TRANSCRIPTION
USER
HTTP SERVER
THE TRANSLATED TEXT IS
SERVED TO THE USER
WAZO PLATFORM: COLLABORATION
OPEN COLLABORATION & OPEN DEVELOPMENT
OPEN SOURCE PROJECT
https://www.wazo-platform.org/
PR WORKFLOW @ GITHUB
https://github.com/wazo-platform/
MATTERMOST CHAN
https://mm.wazo.community/wazo-platform/
SERVICE CODE UNDER GLPV3+ LICENCE
LIBRARY CODE UNDER MIT LICENCE
LET’S CONNECT
BUILD GREAT SOLUTIONS WITH WAZO PLATFORM
BOOTH WAZO W/ THE TEAM :
FRED, SYLVAIN, PASCAL & JÉROME
TO KNOW MORE :
- JEROME’S TALK : WEDNESDAY - 1:30PM
MORE INFO :
- BLOG POST
- OFFICIAL DEMO @GITHUB
QUESTIONS

More Related Content

What's hot

Three Ways Kamailio Can Help Your FreeSWITCH Deployment
Three Ways Kamailio Can Help Your FreeSWITCH DeploymentThree Ways Kamailio Can Help Your FreeSWITCH Deployment
Three Ways Kamailio Can Help Your FreeSWITCH Deployment
Fred Posner
 
Kamailio - API Based SIP Routing
Kamailio - API Based SIP RoutingKamailio - API Based SIP Routing
Kamailio - API Based SIP Routing
Daniel-Constantin Mierla
 
rtpengine - Media Relaying and Beyond
rtpengine - Media Relaying and Beyondrtpengine - Media Relaying and Beyond
rtpengine - Media Relaying and Beyond
Andreas Granig
 
rtpengine and kamailio - or how to simulate calls at scale
rtpengine and kamailio - or how to simulate calls at scalertpengine and kamailio - or how to simulate calls at scale
rtpengine and kamailio - or how to simulate calls at scale
Andreas Granig
 
HTTP Parameter Pollution Vulnerabilities in Web Applications (Black Hat EU 2011)
HTTP Parameter Pollution Vulnerabilities in Web Applications (Black Hat EU 2011)HTTP Parameter Pollution Vulnerabilities in Web Applications (Black Hat EU 2011)
HTTP Parameter Pollution Vulnerabilities in Web Applications (Black Hat EU 2011)
Marco Balduzzi
 
Sipwise rtpengine
Sipwise rtpengineSipwise rtpengine
Sipwise rtpengine
Andreas Granig
 
Expanding Asterisk with Kamailio
Expanding Asterisk with KamailioExpanding Asterisk with Kamailio
Expanding Asterisk with Kamailio
Fred Posner
 
Kill Your IVR with a Voicebot (ClueCon 2019)
Kill Your IVR with a Voicebot (ClueCon 2019)Kill Your IVR with a Voicebot (ClueCon 2019)
Kill Your IVR with a Voicebot (ClueCon 2019)
Chad Hart
 
Attacking thru HTTP Host header
Attacking thru HTTP Host headerAttacking thru HTTP Host header
Attacking thru HTTP Host header
Sergey Belov
 
SIP Attack Handling (Kamailio World 2021)
SIP Attack Handling (Kamailio World 2021)SIP Attack Handling (Kamailio World 2021)
SIP Attack Handling (Kamailio World 2021)
Fred Posner
 
Frans Rosén Keynote at BSides Ahmedabad
Frans Rosén Keynote at BSides AhmedabadFrans Rosén Keynote at BSides Ahmedabad
Frans Rosén Keynote at BSides Ahmedabad
Security BSides Ahmedabad
 
Asterisk sip channel performance
Asterisk sip channel performanceAsterisk sip channel performance
Asterisk sip channel performance
Flavio Eduardo de Andrade Goncalves
 
Asterisk, HTML5 and NodeJS; a world of endless possibilities
Asterisk, HTML5 and NodeJS; a world of endless possibilitiesAsterisk, HTML5 and NodeJS; a world of endless possibilities
Asterisk, HTML5 and NodeJS; a world of endless possibilitiesDan Jenkins
 
Cross-domain requests with CORS
Cross-domain requests with CORSCross-domain requests with CORS
Cross-domain requests with CORS
Vladimir Dzhuvinov
 
Getting Started with API Security Testing
Getting Started with API Security TestingGetting Started with API Security Testing
Getting Started with API Security Testing
SmartBear
 
AstriCon 2017 - Docker Swarm & Asterisk
AstriCon 2017  - Docker Swarm & AsteriskAstriCon 2017  - Docker Swarm & Asterisk
AstriCon 2017 - Docker Swarm & Asterisk
Evan McGee
 
Introduction to OpenID Connect
Introduction to OpenID Connect Introduction to OpenID Connect
Introduction to OpenID Connect
Nat Sakimura
 
Astricon 10 (October 2013) - SIP over WebSocket on Kamailio
Astricon 10 (October 2013) - SIP over WebSocket on KamailioAstricon 10 (October 2013) - SIP over WebSocket on Kamailio
Astricon 10 (October 2013) - SIP over WebSocket on Kamailio
Crocodile WebRTC SDK and Cloud Signalling Network
 
Going realtime with Socket.IO
Going realtime with Socket.IOGoing realtime with Socket.IO
Going realtime with Socket.IO
Christian Joudrey
 
Going Beyond Microsoft IIS Short File Name Disclosure - NahamCon 2023 Edition
Going Beyond Microsoft IIS Short File Name Disclosure - NahamCon 2023 EditionGoing Beyond Microsoft IIS Short File Name Disclosure - NahamCon 2023 Edition
Going Beyond Microsoft IIS Short File Name Disclosure - NahamCon 2023 Edition
Soroush Dalili
 

What's hot (20)

Three Ways Kamailio Can Help Your FreeSWITCH Deployment
Three Ways Kamailio Can Help Your FreeSWITCH DeploymentThree Ways Kamailio Can Help Your FreeSWITCH Deployment
Three Ways Kamailio Can Help Your FreeSWITCH Deployment
 
Kamailio - API Based SIP Routing
Kamailio - API Based SIP RoutingKamailio - API Based SIP Routing
Kamailio - API Based SIP Routing
 
rtpengine - Media Relaying and Beyond
rtpengine - Media Relaying and Beyondrtpengine - Media Relaying and Beyond
rtpengine - Media Relaying and Beyond
 
rtpengine and kamailio - or how to simulate calls at scale
rtpengine and kamailio - or how to simulate calls at scalertpengine and kamailio - or how to simulate calls at scale
rtpengine and kamailio - or how to simulate calls at scale
 
HTTP Parameter Pollution Vulnerabilities in Web Applications (Black Hat EU 2011)
HTTP Parameter Pollution Vulnerabilities in Web Applications (Black Hat EU 2011)HTTP Parameter Pollution Vulnerabilities in Web Applications (Black Hat EU 2011)
HTTP Parameter Pollution Vulnerabilities in Web Applications (Black Hat EU 2011)
 
Sipwise rtpengine
Sipwise rtpengineSipwise rtpengine
Sipwise rtpengine
 
Expanding Asterisk with Kamailio
Expanding Asterisk with KamailioExpanding Asterisk with Kamailio
Expanding Asterisk with Kamailio
 
Kill Your IVR with a Voicebot (ClueCon 2019)
Kill Your IVR with a Voicebot (ClueCon 2019)Kill Your IVR with a Voicebot (ClueCon 2019)
Kill Your IVR with a Voicebot (ClueCon 2019)
 
Attacking thru HTTP Host header
Attacking thru HTTP Host headerAttacking thru HTTP Host header
Attacking thru HTTP Host header
 
SIP Attack Handling (Kamailio World 2021)
SIP Attack Handling (Kamailio World 2021)SIP Attack Handling (Kamailio World 2021)
SIP Attack Handling (Kamailio World 2021)
 
Frans Rosén Keynote at BSides Ahmedabad
Frans Rosén Keynote at BSides AhmedabadFrans Rosén Keynote at BSides Ahmedabad
Frans Rosén Keynote at BSides Ahmedabad
 
Asterisk sip channel performance
Asterisk sip channel performanceAsterisk sip channel performance
Asterisk sip channel performance
 
Asterisk, HTML5 and NodeJS; a world of endless possibilities
Asterisk, HTML5 and NodeJS; a world of endless possibilitiesAsterisk, HTML5 and NodeJS; a world of endless possibilities
Asterisk, HTML5 and NodeJS; a world of endless possibilities
 
Cross-domain requests with CORS
Cross-domain requests with CORSCross-domain requests with CORS
Cross-domain requests with CORS
 
Getting Started with API Security Testing
Getting Started with API Security TestingGetting Started with API Security Testing
Getting Started with API Security Testing
 
AstriCon 2017 - Docker Swarm & Asterisk
AstriCon 2017  - Docker Swarm & AsteriskAstriCon 2017  - Docker Swarm & Asterisk
AstriCon 2017 - Docker Swarm & Asterisk
 
Introduction to OpenID Connect
Introduction to OpenID Connect Introduction to OpenID Connect
Introduction to OpenID Connect
 
Astricon 10 (October 2013) - SIP over WebSocket on Kamailio
Astricon 10 (October 2013) - SIP over WebSocket on KamailioAstricon 10 (October 2013) - SIP over WebSocket on Kamailio
Astricon 10 (October 2013) - SIP over WebSocket on Kamailio
 
Going realtime with Socket.IO
Going realtime with Socket.IOGoing realtime with Socket.IO
Going realtime with Socket.IO
 
Going Beyond Microsoft IIS Short File Name Disclosure - NahamCon 2023 Edition
Going Beyond Microsoft IIS Short File Name Disclosure - NahamCon 2023 EditionGoing Beyond Microsoft IIS Short File Name Disclosure - NahamCon 2023 Edition
Going Beyond Microsoft IIS Short File Name Disclosure - NahamCon 2023 Edition
 

Similar to Getting a live_transcript_of_your_call_using_the_ari

Developing SIP Applications
Developing SIP ApplicationsDeveloping SIP Applications
Developing SIP Applications
Voxeo Corp
 
How to Build Advanced Voice Assistants and Chatbots
How to Build Advanced Voice Assistants and ChatbotsHow to Build Advanced Voice Assistants and Chatbots
How to Build Advanced Voice Assistants and Chatbots
Cisco DevNet
 
Modern Web Security, Lazy but Mindful Like a Fox
Modern Web Security, Lazy but Mindful Like a FoxModern Web Security, Lazy but Mindful Like a Fox
Modern Web Security, Lazy but Mindful Like a Fox
C4Media
 
CableTap - Wirelessly Tapping Your Home Network
CableTap - Wirelessly Tapping Your Home NetworkCableTap - Wirelessly Tapping Your Home Network
CableTap - Wirelessly Tapping Your Home Network
Christopher Grayson
 
DevNet @TAG - Spark & Tropo APIs - Milan/Rome May 2016
DevNet @TAG - Spark & Tropo APIs - Milan/Rome May 2016DevNet @TAG - Spark & Tropo APIs - Milan/Rome May 2016
DevNet @TAG - Spark & Tropo APIs - Milan/Rome May 2016
Cisco DevNet
 
WebSockets 101
WebSockets 101WebSockets 101
WebSockets 101
The Software House
 
Containerizing a REST API and Deploying to Kubernetes
Containerizing a REST API and Deploying to KubernetesContainerizing a REST API and Deploying to Kubernetes
Containerizing a REST API and Deploying to Kubernetes
Ashley Roach
 
Serverless APIs with Apache OpenWhisk
Serverless APIs with Apache OpenWhiskServerless APIs with Apache OpenWhisk
Serverless APIs with Apache OpenWhisk
Daniel Krook
 
Securing Your BBC Identity
Securing Your BBC IdentitySecuring Your BBC Identity
Securing Your BBC Identity
Marc Littlemore
 
Wazo Platform @ Astricon19
Wazo Platform @ Astricon19Wazo Platform @ Astricon19
Wazo Platform @ Astricon19
Frédéric Lepied
 
Build advanced Voice Assistants and Chat Bots - Stève Sfartz - Codemotion Mil...
Build advanced Voice Assistants and Chat Bots - Stève Sfartz - Codemotion Mil...Build advanced Voice Assistants and Chat Bots - Stève Sfartz - Codemotion Mil...
Build advanced Voice Assistants and Chat Bots - Stève Sfartz - Codemotion Mil...
Codemotion
 
API and Microservices Meetup - To Code or Low Code?
API and Microservices Meetup - To Code or Low Code?API and Microservices Meetup - To Code or Low Code?
API and Microservices Meetup - To Code or Low Code?
Ian Vanstone
 
今すぐ始めるCloud Foundry #hackt #hackt_k
今すぐ始めるCloud Foundry #hackt #hackt_k今すぐ始めるCloud Foundry #hackt #hackt_k
今すぐ始めるCloud Foundry #hackt #hackt_k
Toshiaki Maki
 
WebRTC Videobroadcasting
WebRTC VideobroadcastingWebRTC Videobroadcasting
WebRTC Videobroadcasting
Ravi Kuril
 
Is your python application secure? - PyCon Canada - 2015-11-07
Is your python application secure? - PyCon Canada - 2015-11-07Is your python application secure? - PyCon Canada - 2015-11-07
Is your python application secure? - PyCon Canada - 2015-11-07
Frédéric Harper
 
PyCon Canada 2015 - Is your python application secure
PyCon Canada 2015 - Is your python application securePyCon Canada 2015 - Is your python application secure
PyCon Canada 2015 - Is your python application secure
IMMUNIO
 
Building Serverless applications with Python
Building Serverless applications with PythonBuilding Serverless applications with Python
Building Serverless applications with Python
Andrii Soldatenko
 
WP-CLI: Unleash the power
WP-CLI: Unleash the powerWP-CLI: Unleash the power
WP-CLI: Unleash the power
Giannis Economou
 
Building iot applications with Apache Spark and Apache Bahir
Building iot applications with Apache Spark and Apache BahirBuilding iot applications with Apache Spark and Apache Bahir
Building iot applications with Apache Spark and Apache Bahir
Luciano Resende
 

Similar to Getting a live_transcript_of_your_call_using_the_ari (20)

Developing SIP Applications
Developing SIP ApplicationsDeveloping SIP Applications
Developing SIP Applications
 
How to Build Advanced Voice Assistants and Chatbots
How to Build Advanced Voice Assistants and ChatbotsHow to Build Advanced Voice Assistants and Chatbots
How to Build Advanced Voice Assistants and Chatbots
 
Modern Web Security, Lazy but Mindful Like a Fox
Modern Web Security, Lazy but Mindful Like a FoxModern Web Security, Lazy but Mindful Like a Fox
Modern Web Security, Lazy but Mindful Like a Fox
 
CableTap - Wirelessly Tapping Your Home Network
CableTap - Wirelessly Tapping Your Home NetworkCableTap - Wirelessly Tapping Your Home Network
CableTap - Wirelessly Tapping Your Home Network
 
DevNet @TAG - Spark & Tropo APIs - Milan/Rome May 2016
DevNet @TAG - Spark & Tropo APIs - Milan/Rome May 2016DevNet @TAG - Spark & Tropo APIs - Milan/Rome May 2016
DevNet @TAG - Spark & Tropo APIs - Milan/Rome May 2016
 
WebSockets 101
WebSockets 101WebSockets 101
WebSockets 101
 
Containerizing a REST API and Deploying to Kubernetes
Containerizing a REST API and Deploying to KubernetesContainerizing a REST API and Deploying to Kubernetes
Containerizing a REST API and Deploying to Kubernetes
 
Serverless APIs with Apache OpenWhisk
Serverless APIs with Apache OpenWhiskServerless APIs with Apache OpenWhisk
Serverless APIs with Apache OpenWhisk
 
Securing Your BBC Identity
Securing Your BBC IdentitySecuring Your BBC Identity
Securing Your BBC Identity
 
Wazo Platform @ Astricon19
Wazo Platform @ Astricon19Wazo Platform @ Astricon19
Wazo Platform @ Astricon19
 
Build advanced Voice Assistants and Chat Bots - Stève Sfartz - Codemotion Mil...
Build advanced Voice Assistants and Chat Bots - Stève Sfartz - Codemotion Mil...Build advanced Voice Assistants and Chat Bots - Stève Sfartz - Codemotion Mil...
Build advanced Voice Assistants and Chat Bots - Stève Sfartz - Codemotion Mil...
 
API and Microservices Meetup - To Code or Low Code?
API and Microservices Meetup - To Code or Low Code?API and Microservices Meetup - To Code or Low Code?
API and Microservices Meetup - To Code or Low Code?
 
今すぐ始めるCloud Foundry #hackt #hackt_k
今すぐ始めるCloud Foundry #hackt #hackt_k今すぐ始めるCloud Foundry #hackt #hackt_k
今すぐ始めるCloud Foundry #hackt #hackt_k
 
WebRTC Videobroadcasting
WebRTC VideobroadcastingWebRTC Videobroadcasting
WebRTC Videobroadcasting
 
Is your python application secure? - PyCon Canada - 2015-11-07
Is your python application secure? - PyCon Canada - 2015-11-07Is your python application secure? - PyCon Canada - 2015-11-07
Is your python application secure? - PyCon Canada - 2015-11-07
 
PyCon Canada 2015 - Is your python application secure
PyCon Canada 2015 - Is your python application securePyCon Canada 2015 - Is your python application secure
PyCon Canada 2015 - Is your python application secure
 
WebKit, why it matters (PDF version)
WebKit, why it matters (PDF version)WebKit, why it matters (PDF version)
WebKit, why it matters (PDF version)
 
Building Serverless applications with Python
Building Serverless applications with PythonBuilding Serverless applications with Python
Building Serverless applications with Python
 
WP-CLI: Unleash the power
WP-CLI: Unleash the powerWP-CLI: Unleash the power
WP-CLI: Unleash the power
 
Building iot applications with Apache Spark and Apache Bahir
Building iot applications with Apache Spark and Apache BahirBuilding iot applications with Apache Spark and Apache Bahir
Building iot applications with Apache Spark and Apache Bahir
 

Recently uploaded

AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 

Recently uploaded (20)

AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 

Getting a live_transcript_of_your_call_using_the_ari

  • 1. GETTING A LIVE TRANSCRIPT OF YOUR CALL PASCAL CADOTTE MICHAUD | CORE DEVELOPER ASTRICON, ATLANTA, OCT. 2019
  • 2. WHO AM I? OPEN SOURCE ENTHUSIAST PASCAL CADOTTE MICHAUD, CORE DEVELOPER @ WAZO 10+ YEARS IN DEVELOPMENT PROGRAMMING SOFTWARES USING ASTERISK FOR ALMOST 10 YEARS USING ● AMI ● DIALPLAN ● AGI ● ARI AND STASIS APPLICATIONS @PCADOTTE @PC-M
  • 3. WAZO PLATFORM PROJECT MISSION LEVERAGE THE BEST OPEN SOURCE COMPONENTS TO TRANSFORM THE WAY WE BUILD IP TELECOM INFRASTRUCTURE AND CREATE COMMUNICATION SERVICES
  • 4. WHY WOULD YOU WANT TO STREAM THE AUDIO OUT OF ASTERISK
  • 5. INTERESTING USES CASES WHY WOULD I STREAM SOUNDS OUT OF ASTERISK? ● ADDING SUBTITLES TO A CALL ● TRANSLATIONS ● DETECTING CUSTOMER FEELING ● CALL PRIORITIZATION ● FRAUD DETECTION ● INDEXATION ● CALL ROUTING IVR http://www.wazo-platform.org/blog/solving-the-emergency-call-prioritization-issue-with-programmable-telecom
  • 6. TIMELINE AUGUST 2018 AUDIO SOCKET OCTOBER 2018 ASTRIDEVCON JANUARY 2019 WAZO PARIS HACKATHON RES_ARI_STREAM JULY 2019 ASTRICON CFP OCTOBER 2019 ASTERISK 16.6.0 WITH EXTERNALMEDIA OUR JOURNEY
  • 7. AUDIO SOCKET BY SEÁN C. MCCORD “AUDIOSOCKET IS A SIMPLE TCP-BASED PROTOCOL FOR SENDING AND RECEIVING REALTIME AUDIO STREAMS. THERE EXISTS A PROTOCOL DEFINITION, A GO LIBRARY, AND AN ASTERISK APPLICATION.” VERY SIMPLE PROTOCOL USING AN ASTERISK DIALPLAN APPLICATION. SEE SEÁN’S PRESENTATION TOMORROW AT 10:30 FOR MORE INTERESTING DETAILS. https://wiki.asterisk.org/wiki/display/AST/AudioSocket
  • 8. A FIRST WORKING IMPLEMENTATION RES_ARI_STREAM RES_ARI_STREAM IS A MODULE DEVELOPED AS A HACKATHON PROJECT TO GET A GOOD FEEL OF THE PROBLEM. IT USES THE ARI WEBSOCKET WITH THE SUB-PROTOCOL “STREAM-CHANNEL”.
  • 9. HOW DOES IT WORK RES_ARI_STREAM 1. ON LOAD ADDS A SUB-PROTOCOL TO THE WEBSOCKET 2. ON SUBSCRIPTION A HOOK ON RECEIVED FRAMES IS ADDED 3. ON VOICE FRAME THE VOICE IS TRANSCODED TO SLIN16 4. THEN THE FRAMES ARE WRITTEN TO THE SUBSCRIBED WEBSOCKET https://github.com/sboily/wazo-hackathon-asterisk-stream-module
  • 10. A VERY BASIC EXAMPLE WRITING THE AUDIO FRAMES TO A FILE import websocket import sys with open("out.wav", "wb") as f: ws = websocket.WebSocketApp( "ws://localhost:5039/ws", on_message=lambda ws, msg: out.write(msg), on_error=lambda ws, error: print(error), on_close=lambda ws: print(“### closed ###”), subprotocols=["stream-channel"], header=[“Channel-ID: “ + sys.argv[1]], ) ws.run_forever()
  • 11. A VERY SIMPLE EXAMPLE USAGE RECORDING THE AUDIO TO A FILE LISTENING TO YOUR RECORDING play -t raw -b 16 --endian little -c 1 -e signed-integer -r 16000 out.wav python3 record-channel-id.py “<my-channel>”
  • 12. ASTERISK IMPLEMENTATION IN ASTERISK 16.6.0 POST /channels/externalmedia 1. CREATE AN EXTERNAL MEDIA CHANNEL WITH AN HOST AND PORT 2. ASTERISK WILL SEND RTP TO THE HOST AND PORT 3. ADD THE EXTERNAL MEDIA CHANNEL TO THE BRIDGE YOU WISH TO LISTEN 4. READ THE RTP FROM THE SOCKET THE UNICASTRTP_LOCAL_ADDRESS AND UNICASTRTP_LOCAL_PORT CHANNEL VARIABLES CONTAIN WHAT YOU NEED TO SEND MEDIA BACK TO ASTERISK. https://wiki.asterisk.org/wiki/display/AST/External+Media+and+ARI https://github.com/asterisk/asterisk-external-media
  • 13. DIFFERENCES BETWEEN THE 3 OPTIONS RES_ARI_STREAM ARI EXTERNALMEDIA AUDIOSOCKET MEDIA DIRECTION UNI-DIRECTIONAL BI-DIRECTIONAL BI-DIRECTIONAL USAGE HTTP ENDPOINT WITH A SPECIFIC SUB-PROTOCOL FOR THE WEBSOCKET LIMITED TO CHANNELS IN STASIS DIALPLAN APPLICATION AND CHANNEL DRIVER ARI RESOURCE IN A GERRIT PULL REQUEST FORMAT SLIN16 IS RECEIVED RTP WITH SPECIFIED CODEC IS RECEIVED VERY SIMPLE PROTOCOL WITH SLIN16 PAYLOAD CONNECTIVITY CONNECTS TO A CHANNEL CONNECTS TO A BRIDGE CONNECTS TO A CHANNEL OR A BRIDGE TRANSPORT WEBSOCKET UDP TCP
  • 15. DEMO OF THE RES_ARI_STREAM MODULE https://github.com/pc-m/transcript-demo/blob/master/transcript_demo/wazo.py https://github.com/pc-m/transcript-demo/blob/master/transcript_demo/transcription.py INCOMING CALL AN INCOMING CALL IS ANSWERED BY ALICE THIS IS A NORMAL CALL, NO STASIS APPLICATION IS REQUIRED HERE TRANSCRIPT SCRIPT TRANSCRIPTION SCRIPT IS LAUNCHED ON THE INCOMING CALL THE SCRIPT CONNECTS TO THE ASTERISK WEBSOCKET AND REGISTERS ITSELF TO THE INCOMING CALL CHANNEL ID GOOGLE SPEECH API TRANSCRIPTION GOOGLE SPEECH API IS USED FOR THE TRANSCRIPTION USER HTTP SERVER THE TRANSLATED TEXT IS SERVED TO THE USER
  • 17. DEMO OF THE ASTERISK ARI VERSION https://github.com/pc-m/transcript-demo/blob/master/transcript_demo/ari_stasis.py https://github.com/pc-m/transcript-demo/blob/master/transcript_demo/ari_server.py https://github.com/pc-m/transcript-demo/blob/master/transcript_demo/transcription.py STASIS THE CALL ENTERS STASIS THE STASIS APPLICATION ADDS THE CALL TO ITS BRIDGE UDP SERVER THE SERVER RECEIVES THE RTP FROM ASTERISK THE SERVER CREATES THE EXTERNAL MEDIA CHANNELS WHICH GET ADDED TO THE STASIS BRIDGE AND RECEIVES THE RTP GOOGLE SPEECH API TRANSCRIPTION GOOGLE SPEECH API IS USED FOR THE TRANSCRIPTION USER HTTP SERVER THE TRANSLATED TEXT IS SERVED TO THE USER
  • 18. WAZO PLATFORM: COLLABORATION OPEN COLLABORATION & OPEN DEVELOPMENT OPEN SOURCE PROJECT https://www.wazo-platform.org/ PR WORKFLOW @ GITHUB https://github.com/wazo-platform/ MATTERMOST CHAN https://mm.wazo.community/wazo-platform/ SERVICE CODE UNDER GLPV3+ LICENCE LIBRARY CODE UNDER MIT LICENCE
  • 19. LET’S CONNECT BUILD GREAT SOLUTIONS WITH WAZO PLATFORM BOOTH WAZO W/ THE TEAM : FRED, SYLVAIN, PASCAL & JÉROME TO KNOW MORE : - JEROME’S TALK : WEDNESDAY - 1:30PM MORE INFO : - BLOG POST - OFFICIAL DEMO @GITHUB