SlideShare a Scribd company logo
1 of 13
2012



E n h a n c in g F r e e P B X w it h
 A d h e a r s io n
Luca Pradovera
Voice Application Developer, Mojo Lingo
Ad h e ars io n
Ruby framework for telephony applications
Actively developed by Adhearsion community
Interacts with Asterisk through AGI and AMI
Also supports Tropo via AGI
More platforms Coming Soon...
In s tallatio n
Install RVM on the machine https://gist.github.com/843946
The script:
   Installs RVM
   Installs the build requirements
   Installs Ruby 1.9.3 and the Gem system
   Sets up Ruby
   Installs Adhearsion and required gems
Vo ic e ap p lic atio n
Is a way to add logic to telephony systems
Can interact with external databases and protocols
Examples: MySQL, Rails, XMPP, LDAP
Yo u r n e w ap p lic atio n
ahn create <appname>
Important files are dialplan.rb and config/startup.rb
Edit startup.rb to set the correct argument delimiter
Build a simple dialplan:
fosdem {
    play “tt-monkeys”
}
As te ris k c o n fig u ratio n
On a FreePBX machine, edit extensions_custom.conf to
 add a context and AGI extension
[adhearsion]
exten => s,1,AGI(agi://localhost/fosdem)
Start the Adhearsion application with “ahn start .”
Fre e P B X c o n fig u ratio n
Tools > Custom Destination, Add Custom destination with a
 name of “adhearsion,s,1”
Setup > IVR: Create an IVR with your custom destination in it
Route the default DID to the IVR: Setup > Inbound Routes >
 All DIDs, set default to IVR and the name of your IVR
Create a SIP user if needed and dial 7777 to simulate an
 incoming call
Press 1 and hear the sweet sound of monkeys!
Tim e -b as e d o u tb o u n d c all
re s tric tio n
Requirement: restricting outbound calls based on the
 timezone at the destination or any other criteria
Done by one of our customers
Add to extensions_custom.conf, macro name is mandated
 by FreePBX:
[macro-dialout-trunk-predial-hook]
exten => s,1,AGI(agi://localhost/time_of_day_filter)
TB O C R : Ad h e ars io n c o n te x t
time_of_day_filter {
# tz = Timezone.find_by_number(call.variables[:agi_dnid])
# time = Time.now.localtime(tz.offset)
time = Time.now
if time.hour > 11
   #reject the call
   play "something-terribly-wrong"
   execute "CONGESTION", 5
   hangup
TB O C R : Fre e P B X
Our macro will be executed every time an outside
 extension is dialed
For demonstration purposes, we have added a simple
 outbound catch-all route
Dial 4044754849 (my phone number at Mojo Lingo!)
AM I E ve n ts in Ad h e ars io n
AMI allows you to do event monitoring and handling
To enable AMI and events, first edit manager_custom.conf
 adding a new user
[adhearsion]
secret = ahn123
deny=0.0.0.0/0.0.0.0
permit=127.0.0.1/255.255.255.0
read = all
write = all
AM I E ve n ts in Ad h e ars io n /2
Reload the manager in the Asterisk console
Edit startup.rb enabling AMI with the proper credentials
Edit events.rb to add some monitoring code
Restart the Adhearsion application if running
Th an k yo u !
Adhearsion Project
http://adhearsion.com
github.com/adhearsion
@adhearsion


Luca Pradovera
@lucaprado on Twitter – polysics on Github
lpradovera@mojolingo.com (Email/XMPP)

More Related Content

Viewers also liked

Can You Speak Magic? with Adhearsion
Can You Speak Magic? with AdhearsionCan You Speak Magic? with Adhearsion
Can You Speak Magic? with AdhearsionMojo Lingo
 
Connecting Adhearsion
Connecting AdhearsionConnecting Adhearsion
Connecting AdhearsionMojo Lingo
 
Telephony Through Ruby Colored Lenses
Telephony Through Ruby Colored LensesTelephony Through Ruby Colored Lenses
Telephony Through Ruby Colored LensesMojo Lingo
 
State of the Art Telephony with Ruby
State of the Art Telephony with RubyState of the Art Telephony with Ruby
State of the Art Telephony with RubyAdhearsion Foundation
 
Infiltrating Telecoms Using Ruby
Infiltrating Telecoms Using RubyInfiltrating Telecoms Using Ruby
Infiltrating Telecoms Using RubyMojo Lingo
 
Adhearsion for Devs - CloudComm 2011
Adhearsion for Devs  - CloudComm 2011Adhearsion for Devs  - CloudComm 2011
Adhearsion for Devs - CloudComm 2011Adhearsion Foundation
 
Infiltrando Telecoms Usando Ruby
Infiltrando Telecoms Usando RubyInfiltrando Telecoms Usando Ruby
Infiltrando Telecoms Usando RubyMojo Lingo
 
Talking to Rails - MagRails 2011
Talking to Rails - MagRails 2011Talking to Rails - MagRails 2011
Talking to Rails - MagRails 2011Ben Langfeld
 
Rayo for XMPP Folks
Rayo for XMPP FolksRayo for XMPP Folks
Rayo for XMPP FolksMojo Lingo
 
State of the Art Telephony with Ruby
State of the Art Telephony with Ruby State of the Art Telephony with Ruby
State of the Art Telephony with Ruby Mojo Lingo
 
Adhearsion and the cloud
Adhearsion and the cloudAdhearsion and the cloud
Adhearsion and the cloudMojo Lingo
 
AdhearsionConf Keynote 2012
AdhearsionConf Keynote 2012AdhearsionConf Keynote 2012
AdhearsionConf Keynote 2012Mojo Lingo
 
Securing Voice Communication
Securing Voice CommunicationSecuring Voice Communication
Securing Voice CommunicationLuca Pradovera
 

Viewers also liked (20)

Can You Speak Magic? with Adhearsion
Can You Speak Magic? with AdhearsionCan You Speak Magic? with Adhearsion
Can You Speak Magic? with Adhearsion
 
Adhearsion conf 2011 keynote
Adhearsion conf 2011 keynoteAdhearsion conf 2011 keynote
Adhearsion conf 2011 keynote
 
Amoocon Tutorial May 2009 Germany
Amoocon Tutorial May 2009   GermanyAmoocon Tutorial May 2009   Germany
Amoocon Tutorial May 2009 Germany
 
Adhearsion Astricon October 2010
Adhearsion Astricon October 2010Adhearsion Astricon October 2010
Adhearsion Astricon October 2010
 
ClueCon 2012
ClueCon 2012ClueCon 2012
ClueCon 2012
 
Connecting Adhearsion
Connecting AdhearsionConnecting Adhearsion
Connecting Adhearsion
 
Amoocon May 2009 Germany
Amoocon May 2009   GermanyAmoocon May 2009   Germany
Amoocon May 2009 Germany
 
Telephony Through Ruby Colored Lenses
Telephony Through Ruby Colored LensesTelephony Through Ruby Colored Lenses
Telephony Through Ruby Colored Lenses
 
State of the Art Telephony with Ruby
State of the Art Telephony with RubyState of the Art Telephony with Ruby
State of the Art Telephony with Ruby
 
Infiltrating Telecoms Using Ruby
Infiltrating Telecoms Using RubyInfiltrating Telecoms Using Ruby
Infiltrating Telecoms Using Ruby
 
Adhearsion for Devs - CloudComm 2011
Adhearsion for Devs  - CloudComm 2011Adhearsion for Devs  - CloudComm 2011
Adhearsion for Devs - CloudComm 2011
 
Infiltrando Telecoms Usando Ruby
Infiltrando Telecoms Usando RubyInfiltrando Telecoms Usando Ruby
Infiltrando Telecoms Usando Ruby
 
Talking to Rails - MagRails 2011
Talking to Rails - MagRails 2011Talking to Rails - MagRails 2011
Talking to Rails - MagRails 2011
 
Rayo for XMPP Folks
Rayo for XMPP FolksRayo for XMPP Folks
Rayo for XMPP Folks
 
State of the Art Telephony with Ruby
State of the Art Telephony with Ruby State of the Art Telephony with Ruby
State of the Art Telephony with Ruby
 
Adhearsion and the cloud
Adhearsion and the cloudAdhearsion and the cloud
Adhearsion and the cloud
 
AdhearsionConf Keynote 2012
AdhearsionConf Keynote 2012AdhearsionConf Keynote 2012
AdhearsionConf Keynote 2012
 
Connfu adhearsion
Connfu adhearsionConnfu adhearsion
Connfu adhearsion
 
Securing Voice Communication
Securing Voice CommunicationSecuring Voice Communication
Securing Voice Communication
 
Ruby Conf 2011
Ruby Conf 2011Ruby Conf 2011
Ruby Conf 2011
 

Similar to Enhancing Free PBX with Adhearsion at Fosdem 2012

Enhancing FreePBX with Adhearsion
Enhancing FreePBX with AdhearsionEnhancing FreePBX with Adhearsion
Enhancing FreePBX with AdhearsionMojo Lingo
 
Pwning Your Phone with Adhearsion and Asterisk
Pwning Your Phone with Adhearsion and AsteriskPwning Your Phone with Adhearsion and Asterisk
Pwning Your Phone with Adhearsion and Asteriskjicksta
 
Stuff we noticed while building "Asterisk in the cloud"
Stuff we noticed while building "Asterisk in the cloud"Stuff we noticed while building "Asterisk in the cloud"
Stuff we noticed while building "Asterisk in the cloud"troyd
 
Setup VoIP System and Interconnection with LTE network
Setup VoIP System and Interconnection with LTE networkSetup VoIP System and Interconnection with LTE network
Setup VoIP System and Interconnection with LTE networkNazmul Hossain Rakib
 
Porting your favourite cmdline tool to Android
Porting your favourite cmdline tool to AndroidPorting your favourite cmdline tool to Android
Porting your favourite cmdline tool to AndroidVlatko Kosturjak
 
ROS Hands-On Intro/Tutorial (Robotic Vision Summer School 2015) #RVSS #ACRV
ROS Hands-On Intro/Tutorial (Robotic Vision Summer School 2015) #RVSS #ACRVROS Hands-On Intro/Tutorial (Robotic Vision Summer School 2015) #RVSS #ACRV
ROS Hands-On Intro/Tutorial (Robotic Vision Summer School 2015) #RVSS #ACRVJuxi Leitner
 
C# Production Debugging Made Easy
 C# Production Debugging Made Easy C# Production Debugging Made Easy
C# Production Debugging Made EasyAlon Fliess
 
Python and Machine Learning
Python and Machine LearningPython and Machine Learning
Python and Machine Learningtrygub
 
Telephony Service Development on Asterisk Platform
Telephony Service Development on Asterisk PlatformTelephony Service Development on Asterisk Platform
Telephony Service Development on Asterisk PlatformHamid Fadishei
 
Raising the Bar on Robotics Code Quality
Raising the Bar on Robotics Code QualityRaising the Bar on Robotics Code Quality
Raising the Bar on Robotics Code QualityThomas Moulard
 
Otra forma de hacer aplicaciones de telefonía
Otra forma de hacer aplicaciones de telefoníaOtra forma de hacer aplicaciones de telefonía
Otra forma de hacer aplicaciones de telefoníaMartin Perez
 
An OpenShift Primer for Developers to get your Code into the Cloud (PTJUG)
An OpenShift Primer for Developers to get your Code into the Cloud (PTJUG)An OpenShift Primer for Developers to get your Code into the Cloud (PTJUG)
An OpenShift Primer for Developers to get your Code into the Cloud (PTJUG)Eric D. Schabell
 
Adhearsion and Telegraph Framework Presentation
Adhearsion and Telegraph Framework PresentationAdhearsion and Telegraph Framework Presentation
Adhearsion and Telegraph Framework PresentationJustin Grammens
 
Rapid Prototyping Chatter with a PHP/Hack Canvas App on Heroku
Rapid Prototyping Chatter with a PHP/Hack Canvas App on HerokuRapid Prototyping Chatter with a PHP/Hack Canvas App on Heroku
Rapid Prototyping Chatter with a PHP/Hack Canvas App on HerokuSalesforce Developers
 
Getting Started with Adobe AIR 1.5
Getting Started with Adobe AIR 1.5Getting Started with Adobe AIR 1.5
Getting Started with Adobe AIR 1.5Elad Elrom
 

Similar to Enhancing Free PBX with Adhearsion at Fosdem 2012 (20)

Enhancing FreePBX with Adhearsion
Enhancing FreePBX with AdhearsionEnhancing FreePBX with Adhearsion
Enhancing FreePBX with Adhearsion
 
Pwning Your Phone with Adhearsion and Asterisk
Pwning Your Phone with Adhearsion and AsteriskPwning Your Phone with Adhearsion and Asterisk
Pwning Your Phone with Adhearsion and Asterisk
 
Stuff we noticed while building "Asterisk in the cloud"
Stuff we noticed while building "Asterisk in the cloud"Stuff we noticed while building "Asterisk in the cloud"
Stuff we noticed while building "Asterisk in the cloud"
 
Setup VoIP System and Interconnection with LTE network
Setup VoIP System and Interconnection with LTE networkSetup VoIP System and Interconnection with LTE network
Setup VoIP System and Interconnection with LTE network
 
Porting your favourite cmdline tool to Android
Porting your favourite cmdline tool to AndroidPorting your favourite cmdline tool to Android
Porting your favourite cmdline tool to Android
 
Doc_VOIP_Xivo
Doc_VOIP_XivoDoc_VOIP_Xivo
Doc_VOIP_Xivo
 
Otto AI
Otto AIOtto AI
Otto AI
 
Ruby voip
Ruby voipRuby voip
Ruby voip
 
ROS Hands-On Intro/Tutorial (Robotic Vision Summer School 2015) #RVSS #ACRV
ROS Hands-On Intro/Tutorial (Robotic Vision Summer School 2015) #RVSS #ACRVROS Hands-On Intro/Tutorial (Robotic Vision Summer School 2015) #RVSS #ACRV
ROS Hands-On Intro/Tutorial (Robotic Vision Summer School 2015) #RVSS #ACRV
 
C# Production Debugging Made Easy
 C# Production Debugging Made Easy C# Production Debugging Made Easy
C# Production Debugging Made Easy
 
Python and Machine Learning
Python and Machine LearningPython and Machine Learning
Python and Machine Learning
 
Telephony Service Development on Asterisk Platform
Telephony Service Development on Asterisk PlatformTelephony Service Development on Asterisk Platform
Telephony Service Development on Asterisk Platform
 
Raising the Bar on Robotics Code Quality
Raising the Bar on Robotics Code QualityRaising the Bar on Robotics Code Quality
Raising the Bar on Robotics Code Quality
 
Otra forma de hacer aplicaciones de telefonía
Otra forma de hacer aplicaciones de telefoníaOtra forma de hacer aplicaciones de telefonía
Otra forma de hacer aplicaciones de telefonía
 
An OpenShift Primer for Developers to get your Code into the Cloud (PTJUG)
An OpenShift Primer for Developers to get your Code into the Cloud (PTJUG)An OpenShift Primer for Developers to get your Code into the Cloud (PTJUG)
An OpenShift Primer for Developers to get your Code into the Cloud (PTJUG)
 
Adhearsion and Telegraph Framework Presentation
Adhearsion and Telegraph Framework PresentationAdhearsion and Telegraph Framework Presentation
Adhearsion and Telegraph Framework Presentation
 
Backtrack Manual Part4
Backtrack Manual Part4Backtrack Manual Part4
Backtrack Manual Part4
 
Rapid Prototyping Chatter with a PHP/Hack Canvas App on Heroku
Rapid Prototyping Chatter with a PHP/Hack Canvas App on HerokuRapid Prototyping Chatter with a PHP/Hack Canvas App on Heroku
Rapid Prototyping Chatter with a PHP/Hack Canvas App on Heroku
 
OneTeam Media Server
OneTeam Media ServerOneTeam Media Server
OneTeam Media Server
 
Getting Started with Adobe AIR 1.5
Getting Started with Adobe AIR 1.5Getting Started with Adobe AIR 1.5
Getting Started with Adobe AIR 1.5
 

Recently uploaded

TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 

Recently uploaded (20)

TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 

Enhancing Free PBX with Adhearsion at Fosdem 2012

  • 1. 2012 E n h a n c in g F r e e P B X w it h A d h e a r s io n Luca Pradovera Voice Application Developer, Mojo Lingo
  • 2. Ad h e ars io n Ruby framework for telephony applications Actively developed by Adhearsion community Interacts with Asterisk through AGI and AMI Also supports Tropo via AGI More platforms Coming Soon...
  • 3. In s tallatio n Install RVM on the machine https://gist.github.com/843946 The script: Installs RVM Installs the build requirements Installs Ruby 1.9.3 and the Gem system Sets up Ruby Installs Adhearsion and required gems
  • 4. Vo ic e ap p lic atio n Is a way to add logic to telephony systems Can interact with external databases and protocols Examples: MySQL, Rails, XMPP, LDAP
  • 5. Yo u r n e w ap p lic atio n ahn create <appname> Important files are dialplan.rb and config/startup.rb Edit startup.rb to set the correct argument delimiter Build a simple dialplan: fosdem { play “tt-monkeys” }
  • 6. As te ris k c o n fig u ratio n On a FreePBX machine, edit extensions_custom.conf to add a context and AGI extension [adhearsion] exten => s,1,AGI(agi://localhost/fosdem) Start the Adhearsion application with “ahn start .”
  • 7. Fre e P B X c o n fig u ratio n Tools > Custom Destination, Add Custom destination with a name of “adhearsion,s,1” Setup > IVR: Create an IVR with your custom destination in it Route the default DID to the IVR: Setup > Inbound Routes > All DIDs, set default to IVR and the name of your IVR Create a SIP user if needed and dial 7777 to simulate an incoming call Press 1 and hear the sweet sound of monkeys!
  • 8. Tim e -b as e d o u tb o u n d c all re s tric tio n Requirement: restricting outbound calls based on the timezone at the destination or any other criteria Done by one of our customers Add to extensions_custom.conf, macro name is mandated by FreePBX: [macro-dialout-trunk-predial-hook] exten => s,1,AGI(agi://localhost/time_of_day_filter)
  • 9. TB O C R : Ad h e ars io n c o n te x t time_of_day_filter { # tz = Timezone.find_by_number(call.variables[:agi_dnid]) # time = Time.now.localtime(tz.offset) time = Time.now if time.hour > 11 #reject the call play "something-terribly-wrong" execute "CONGESTION", 5 hangup
  • 10. TB O C R : Fre e P B X Our macro will be executed every time an outside extension is dialed For demonstration purposes, we have added a simple outbound catch-all route Dial 4044754849 (my phone number at Mojo Lingo!)
  • 11. AM I E ve n ts in Ad h e ars io n AMI allows you to do event monitoring and handling To enable AMI and events, first edit manager_custom.conf adding a new user [adhearsion] secret = ahn123 deny=0.0.0.0/0.0.0.0 permit=127.0.0.1/255.255.255.0 read = all write = all
  • 12. AM I E ve n ts in Ad h e ars io n /2 Reload the manager in the Asterisk console Edit startup.rb enabling AMI with the proper credentials Edit events.rb to add some monitoring code Restart the Adhearsion application if running
  • 13. Th an k yo u ! Adhearsion Project http://adhearsion.com github.com/adhearsion @adhearsion Luca Pradovera @lucaprado on Twitter – polysics on Github lpradovera@mojolingo.com (Email/XMPP)