Asterisk + Adhearsion -- DTMF Events

91 views
Skip to first unread message

John Burke

unread,
Jun 21, 2017, 6:02:13 PM6/21/17
to Adhearsion
Hello!  I am just getting started with Adhearsion 2.6.4  but have run into a bit of trouble receiving DTMF events.

My ultimate goal is to be able to capture DTMF events on a bridged call . . . for in-call voice apps, etc.  I looked through previous posts in this group and was guided to try Matrioska  However, I was using Asterisk 11 at the time and was only able to get DTMF events while the call was ringing, but not bridged (I later read a post in this group stating that Matrioska doesn't work with Asterisk 11 or early . . . since Asterisk itself didn't emit DTMF events while bridged).

Finally, where I'm at now, I installed Asterisk 13 to try and get the DTMF events and no luck.  Again, I'm able to see the DTMFBegin / DTMFEnd only before the call is bridged.  When the call is connected... it appears that there are no events from Asterisk with "DTMF".



Is Adhearsion able to do in-call apps with Asterisk via Matrioska or some other alternative while on a bridged call???  As to me it doesn't seem as though Asterisk emits anything mid-call....  Any help would be much appreciated.

Thanks,
John




The event code that I used to troubleshoot why I wasn't seeing any DTMF events on bridged call (shows DTMFBegin/DTMFEnd while dialing, but not bridged):
Adhearsion::Events.ami do |events|
#This simply writes events that have been sent to AMI
logger.info "Event recorded by AMI was #{events.name}"
end




The Matrioska code that I tried (worked when calling):
# encoding: utf-8
require 'matrioska/dial_with_apps'
class MatrioskaController < Adhearsion::CallController
include Matrioska::DialWithApps

def run
dial_with_local_apps 'sip/5555' do |runner, dial|

#if user presses 1 during call... just hangup
runner.map_app '1' do
logger.info "YOU PRESSED 1*************************************************************************************"
hangup
end

end

end

end




Ben Langfeld

unread,
Jun 21, 2017, 9:06:59 PM6/21/17
to Adhearsion
To my knowledge, this only works on FreeSWITCH, and Asterisk was never fixed.

--
You received this message because you are subscribed to the Google Groups "Adhearsion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adhearsion+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

John Burke

unread,
Jun 21, 2017, 10:54:40 PM6/21/17
to Adhearsion
Hi Ben, thanks for the quick reply!  I am likely going to transition my development to FreeSWITCH to gain this capability.  Are there any features / gems on the Adhearsion platform that won't work in FreeSWITCH?

Thanks,
John

Ben Langfeld

unread,
Jun 22, 2017, 6:07:17 AM6/22/17
to adhea...@googlegroups.com
The main one is answer machine detection, for which FreeSWITCH lacks a good solution. Everything else Adhearsion-related typically works better.

Ben

Enviado do meu iPhone
--

James Le Cuirot

unread,
Jun 22, 2017, 6:25:18 AM6/22/17
to adhea...@googlegroups.com
On Thu, 22 Jun 2017 07:07:11 -0300
Ben Langfeld <b...@langfeld.co.uk> wrote:

> The main one is answer machine detection, for which FreeSWITCH lacks
> a good solution. Everything else Adhearsion-related typically works
> better.

Actually we've started using crienzo's mod_simpleamd and it works quite
well. What would be really handy is if it supported detecting multiple
iterations of silence like Asterisk's WaitForSilence does. It only
emits a silence event once until noise is heard so if it stays silent,
it will wait forever. I had to emulate it by calling detect_tone!
multiple times, which seems good enough.

Christopher Rienzo

unread,
Jun 22, 2017, 9:09:37 AM6/22/17
to adhea...@googlegroups.com
That detector is outside of FS main repository since they have their own commercial offering.  


NOTE: simple here means the algorithm is 'simple', not that the setup and installation is :)

The lower-level VAD stuff should be in there if you are looking for silence/speech events.  It could be hooked into adhearsion in the somewhat complicated rayo.conf.xml.

 
Reply all
Reply to author
Forward
0 new messages