Triggering a call from app_rpt on Human Voice detection

Hi all,

I have been using app_rpt to initiate a call from my handheld radio to my SIP users.

Usually I do this in two ways, either I set an autopatch on PTT button press to directly call a pre-set extension ( by fixing a value in ivoxexten = 1001);

Or, I set a DTMF based dialing by setting *61{1001} command in rpt.conf.

And both of these have been working fine.

But, Now, I want to initiate a call ONLY when human voice is detected. Is there any way to make my app_rpt DETECT a human voice apart from DTMF tones.

Earlier I tried using TALK_DETECT() application, to make Asterisk detect speech, but this didn’t work:
Here is my extensions.conf:
[Radio_1]
exten = _.,1,Set(CALLERID(num)=610)
same => n,SIPAddHeader(Call-Info: answer-after=1)
same => n,Set(DENOISE(rx)=on)
same => n,Set(TALK_DETECT(set)=1200,2500) ; Set thresholds for talk detection
same => n,Wait(2)
same => n,GotoIf($[“${TALKDETECT(status)}”=“TRUE”]?voice_detected:no_voice)

; Label for when voice activity is detected
same => n(voice_detected),NoOp(Voice activity detected!)
same => n,Dial(SIP/3005) ; Dial extension 3005 if voice is detected
same => n,NoOp(Current talk status : ${TALKDETECT(status)} .)

; Label for when no voice activity is detected
same => n(no_voice),NoOp(No voice activity detected, no call placed)
same => n,NoOp(Current talk status : ${TALKDETECT(status)} .)
;same => n,Hangup()

Here is my Rpt.conf:
[610]
rxchannel = Radio/usb_610
context = Radio_1
callerid = “610”
duplex = 2
linktolink = no
linkmongain = 0
erxgain = -3
etxgain = -3
scheduler = schedule
functions = functions
phone_functions = functions
link_functions = functions
callonvox = 1
ivoxcontext = Radio_1
ivoxexten = 3005
telemetry = telemetry
morse = morse
wait_times = wait-times
accountcode = RADIO
hangtime = 5000
althangtime = 4000
totime = 180000
idrecording = |iWA4XYZ
idtalkover = |iWA4XYZ
idtime = 540000
politeid = 30000
unlinkedct = ct2
remotect = ct3
linkunkeyct = ct8
holdofftelem = 0
telemdefault = 1
telemdynamic = 1

This is for producing events which go out over AMI or ARI. It’s not queryable from the dialplan for when talk is detected.

This doesn’t exist. Did you come up with this yourself or use AI? If using AI, be aware it can and will just make stuff up that doesn’t exist.

You could probably use the AMD dialplan application[1] instead.

[1] AMD - Asterisk Documentation

Also note that app_rpt has never been part of the Asterisk project, and there is no indication of a peer support forum.

Also note that Asterisk voice detection is only based on sound levels, and their timing. It is not going to be much better than the vox in the radios themselves.

Hi There,

Thank you @jcolp & @david551 for taking an interest in my case.

I got ${TALKDETECT(status)} from Chatgpt, obviously it didn’t work, I wanted a way to detect Audio Tx from my Radio to USB input in my Asterisk PBX system. :frowning: this did’nt work.

Also, as @david551 said, although vox detection is available in app_rpt, it’s really tough to get it working for human speech detection.

But, I may have found something, maybe I need to use a separate “speech detection engine”, that I can integrate with CentOS, Like Pocketsphinx.
Found a link here: Integrating CMUSphinx with Telephony Servers - Asterisk and Freeswitch – CMUSphinx Open Source Speech Recognition

Thanks for your comments friends, Now I need to figure this out. :peace_symbol:

The only way you are going to accurately detect human speech is a few seconds after the fact, and you will probably need AI for that. That means you would need to delay the audio by the detection time, or lose the first few words.

Traditional hardware vox tends to clip the first syllable, but that is only working on sound levels.