SOLVED Call by Name or SpeedDial Code

ariban

Active Member
Joined
Aug 1, 2013
Messages
360
Reaction score
26
Hi
are there any tutorials how to setup call by name directory?
if i dial 411 from my office phone it says say the name and then it hangs up before i can say anything and press #. am i missing anything for incrdiblepbx 2021 and 2027?

also how do i put this feature in an IVR prompt option?
i read it works with asteridex is that correct? all names and numbers must be in there?
Thank you
Ben
 
This used TTS and STT services which are no longer available. Sorry.
 
Someday perhaps we'll tackle using the newer Asterisk STT toolkit. But be advised that anything that relies upon Google as part of its offering is typically short lived.
 
Last edited:
Thank you.
How about typing a name by key entry instead of talking the name.
 
@ariban: Here you go. Assuming you're using Incredible PBX 2021 or later...
Edit /etc/asterisk/extensions_custom.conf and replace the 412 Call By Code context with the code below. Save file.
Then: asterisk -rx "dialplan reload"
Then: enter 3-digit speed dial numbers (Dialcode) for each of your Asteridex records
Then: dial 412 and enter one of those 3-digit speed dial numbers to connect

Code:
;# // BEGIN Call by Code
exten => 412,1,Answer
exten => 412,2,Wait(1)
exten => 412,3,Set(TIMEOUT(digit)=7)
exten => 412,4,Set(TIMEOUT(response)=10)
exten => 412,5,Playback(pls-entr-num-uwish2-call)
exten => 412,6,Read(DIALCODE,beep,3)
exten => 412,7,NoOp(Name lookup: ${DIALCODE})
exten => 412,8,Set(USERDATA=${ODBC_ASTERIDEX(${DIALCODE})})
exten => 412,9,Set(CALLEE=${CUT(USERDATA,\,,1)})
exten => 412,10,Set(NUM2CALL=${CUT(USERDATA,\,,2)})
exten => 412,11,NoOp(Who to call: ${CALLEE})
exten => 412,12,NoOp(Number to call: ${NUM2CALL})
exten => 412,13,GotoIf($["foo${NUM2CALL}" = "foo"]?17)
exten => 412,14,Playback(calling)
exten => 412,15,Goto(outbound-allroutes,${NUM2CALL},1)
exten => 412,16,Hangup
exten => 412,17,Wait(1)
exten => 412,18,Playback(speed-dial-empty)
exten => 412,19,Hangup
;# // END Call by Code
 
Last edited:
@ariban: Here you go. Assuming you're using Incredible PBX 2021 or later...
Edit /etc/asterisk/extensions_custom.conf and replace the 412 Call By Code context with the code below. Save file.
Then: asterisk -rx "dialplan reload"
Then: enter 3-digit speed dial numbers (Dialcode) for each of your Asteridex records
Then: dial 412 and enter one of those 3-digit speed dial numbers to connect

Code:
;# // BEGIN Call by Code
exten => 412,1,Answer
exten => 412,2,Wait(1)
exten => 412,3,Set(TIMEOUT(digit)=7)
exten => 412,4,Set(TIMEOUT(response)=10)
exten => 412,5,Playback(pls-entr-num-uwish2-call)
exten => 412,6,Read(DIALCODE,beep,3)
exten => 412,7,NoOp(Name lookup: ${DIALCODE})
exten => 412,8,Set(USERDATA=${ODBC_ASTERIDEX(${DIALCODE})})
exten => 412,9,Set(CALLEE=${CUT(USERDATA,\,,1)})
exten => 412,10,Set(NUM2CALL=${CUT(USERDATA,\,,2)})
exten => 412,11,NoOp(Who to call: ${CALLEE})
exten => 412,12,NoOp(Number to call: ${NUM2CALL})
exten => 412,13,GotoIf($["foo${NUM2CALL}" = "foo"]?17)
exten => 412,14,Playback(calling)
exten => 412,15,Goto(outbound-allroutes,${NUM2CALL},1)
exten => 412,16,Hangup
exten => 412,17,Wait(1)
exten => 412,18,Playback(speed-dial-empty)
exten => 412,19,Hangup
;# // END Call by Code
wow, this is amazing! i will do this today. Thank you for your help and time!
 
i logged in via SSH and it ran the update automatically replacing the code for me! you are awesome, really!
 
it works great. it says please enter the code you wish to call, is there a way to change that prompt to something else like please enter the first 3 letters of the person name etc...?
 
it works great. it says please enter the code you wish to call, is there a way to change that prompt to something else like please enter the first 3 letters of the person name etc...?
Here you go.
1. Download this file and put it in /var/lib/asterisk/sounds/custom.
Code:
cd /var/lib/asterisk/sounds/custom
wget https://filedn.com/lBgbGypMOdDm8PWOoOiBR7j/Debian12/who2call.gsm

2. Then edit /etc/asterisk/extensions_custom.conf and change:
Code:
exten => 412,5,Playback(pls-entr-num-uwish2-call)
to:
Code:
exten => 412,5,Playback(custom/who2call)

3. Then save the file and fwconsole reload

TIP:
This was generated with ElevenLabs which provides 10 minutes of free TTS recordings per month.
Then you convert .mp3 recordings to .gsm using our script after installing the commented out modules;
Code:
#!/bin/bash

#sudo apt-get install sox
#sudo apt-get install lame
#sudo apt-get install libsox-fmt-mp3

if [ -z "$1" ]; then
 echo "Please append the name of the MP3 file to convert (without .mp3)"
 exit
fi

sox $1.mp3 -r 8k -c 1 -e gsm $1.gsm
 
Last edited:

Members online

No members online now.

Forum statistics

Threads
26,687
Messages
174,410
Members
20,257
Latest member
Dempan
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Back
Top