Using a headset with my raspberry and having it call me too

#1. I would like to use a non-phone-like headset with my rPi to make calls from the console.
#2. Every now and then when I’m out, I’d like the rPi to call me and
#3. have it let me press a key from a menu to run a shell script.

The sun is rising over here and having installed and updated asterisk11 on a brand new pie i feel like my head is going to explode from all the vocabulary i don’t know yet.

I know you’re all rooting for me, so please tell me that I’m in the right place and that I can get these things configured with the info i hope to find here!

tyvm!

A tough one for a newbie, you need to build asterisk with chan_console support (few distro’s do)

from the asterisk cli

help console

will give you your options if any, if you get a response, then chase them down with

console list available

If not then you don’t have the module built or loaded and you will need to rebuild asterisk with chan_console support.

(this will take a long long time on a PI)

Hi, thanks kindly. I’ll get right on building it with the cli. talk to you later!

so i’ve built v11.16.0 from source after enabling the console in menuconfig. but its not showing up. so i wrote the script below to check all the things asterisk spews out at startup but no console yet.

#!/bin/sh
FILE=/var/log/asterisk/messages
OUTP=$FILE.txt
rm $OUTP

show() {
    echo $1: >>$OUTP
    cat $FILE |grep $2 |cut -b $3- |sort -u >>$OUTP
    echo >>$OUTP
}
echo ASTERISK messages >>$OUTP
echo ----------------- >>$OUTP
head -n 1 $FILE >>$OUTP
echo  from $FILE >>$OUTP
echo >>$OUTP
show Errors ERROR 32
show Warnings WARNING 34
show Infos NOTICE 33
echo >>$OUTP

less -S $OUTP

i’ll poke around more, meanwhile I hope this helps someone. if you have another round of clues for me on how to do what i described, please go ahead!

thanks!

Couple of things to be aware of

/bin/sh is not bash in Debian, clever stuff won’t work, but I applaud your effort :slight_smile:

Don’t be restrictive (as your script is)

to use the console then

/usr/lib/asterisk/modules/chan_console.so

needs to exist and be loaded.

rasterisk -x " module show like console"

then proactively in asterisk cli

console (tab complete)

for your options.

It’s as easy as that.

turns out i needed to

raspbx:/etc/asterisk# touch console.conf

and

raspbx*CLI> module load chan_console

to ‘get-in’.

i wound up making an org-mode file from the help during which i discovered the module section and its sub-commands.

so i’m looking at the console commands and am open to suggestions and pointers for how to make this thing call me when it needs a decision! tyvm!

p.s. i see my devices and i understand (more or less) how i’d drive this from a script. connecting the device … and responding to tones … ugh. clues would save my weekend!

your console.conf needs to contain more than “nothing”

(WTF is an “org-mode file”)

Have you heard about google? :wink:

found a sample console.conf … http svn.dd-wrt.com / browser/src/router/asterisk/configs/samples/console.conf.sample … still looking for how to specify the USB Audio device.

org-mode is dangerous. do not learn about it. seriously. do not invest 2 month in learning emacs and org-mode just so you can save an hour or two every day. http youtube.com / watch?v=6W82EdwQhxU better just throw me another bone so the rpi can call me and present me with a menu of choices… for which it then runs a shell script. … i repeat, stay away from emacs/org-mode :smile:

thanks for any help you can offer!
(can’t put links in yet)

Your audio driver should normally take care of that if you are you using pulseaudio, use that for your audio source/sink

can you offer anthing concrete?

You miss the the point, there is nothing concrete, your audio devices are better appropriated by your audio service presumably pulseaudio

You will need to use those generated devices for your asterisk console connections

Have you heard about google? :slight_smile: