Hi Alex,

Referring to this wiki:

https://wiki.freeswitch.org/wiki/Mod_spandsp#Call_Progress

You need to tune the detector (record the tone and make a freq analysis). Take note the series of <element /> in spandsp.conf.  That's the sequence of tones to be detected. The min/max is the duration of every tone.  

In the dialplan app start_tone_detect, the data=1 refers to the <descriptor name="1">. You can create your own set of progress tones.

Good luck.

/Nandy

On Mon, Jun 20, 2016 at 10:58 PM, Alexandru Covalschi <568691@gmail.com> wrote:
Thanks for your reply Christopher!

Can you please specify how should I edit spandsp.conf (tones section) to add my tone? I was trying for hours but didn't get any result, I just can't get the logic and I'm struggling.

Cheers,
Alex



From: Christopher Rienzo <cmrienzo@gmail.com>
To: FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org>
Cc: 
Date: Mon, 20 Jun 2016 08:59:32 -0400
Subject: Re: [Freeswitch-users] Tone detection issue
Use spandsp_start_tone_detect instead.  It's better suited for detecting tones + cadence.

On Sun, Jun 19, 2016 at 10:58 PM, Alexandru Covalschi <568691@gmail.com> wrote:
Hi list,

I have an issue using tone_detect. The thing is I must detect two very short tones - 1400 Hz and 2300 Hz 100ms coming one after another (with 100 ms pause I suppose) after ~2 seconds the call is answered. I have pretty accurate wav file, in audacity I see pikes are 1400 and 2296.
I've seen that in spandsp sources it is said that accuracy is ~3% so that should be enough,
However tones aren't detected even if I set:

<action application="tone_detect" data="tone_1_0 1395 r 0 set tone_first=true 1"/>
<action application="tone_detect" data="tone_2_0 2295 r 0 set tone_second=true 1"/>
<action application="tone_detect" data="tone_1_1 1396 r 0 set tone_first=true 1"/>
<action application="tone_detect" data="tone_2_1 2296 r 0 set tone_second=true 1"/>
<action application="tone_detect" data="tone_1_2 1397 r 0 set tone_first=true 1"/>
<action application="tone_detect" data="tone_2_2 2297 r 0 set tone_second=true 1"/>
<action application="tone_detect" data="tone_1_3 1398 r 0 set tone_first=true 1"/>
<action application="tone_detect" data="tone_2_3 2298 r 0 set tone_second=true 1"/>
<action application="tone_detect" data="tone_1_4 1399 r 0 set tone_first=true 1"/>
<action application="tone_detect" data="tone_2_4 2299 r 0 set tone_second=true 1"/>
<action application="tone_detect" data="tone_1_5 1400 r 0 set tone_first=true 1"/>
<action application="tone_detect" data="tone_2_5 2300 r 0 set tone_second=true 1"/>
<action application="tone_detect" data="tone_1_6 1401 r 0 set tone_first=true 1"/>
<action application="tone_detect" data="tone_2_6 2301 r 0 set tone_second=true 1"/>
<action application="tone_detect" data="tone_1_7 1402 r 0 set tone_first=true 1"/>
<action application="tone_detect" data="tone_2_7 2302 r 0 set tone_second=true 1"/>

Tried to do same using spandsp_start_tone_detect(), but I have no idea how to edit spandsp.conf to add a tone matching my needs.

Can someone give me any clue? Any parameter I need to change in sources to obtain what I need?

Debian Jessie
FreeSWITCH version: 1.6.6-13-d2d0b32~64bit (-13-d2d0b32 64bit)


Thanks in advance!
--
Alexandru Covalschi
ABRISS-Solutions
VoIP engineer and system administrator
tel: +37367398493
web: http://abriss.solutions/

_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org



-


--
Alexandru Covalschi
ABRISS-Solutions
VoIP engineer and system administrator
tel: +37367398493
web: http://abriss.solutions/

_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org