The above youtube video is a very convoluted way to do this. There is a much simpler way.
I just set this up in about 1 minute. First, you want a general DTMF command to say the local IP. That can be done as described in other posts here, but to recap,
cd /etc/asterisk/
sudo nano rpt.conf
Add following line if not already present, under ‘Autopatch Commands’ section:
69 = autopatchup,context=my-ip,noct=1,farenddisconnect=1,dialtime=9000,quiet=1
sudo nano extensions.conf
Add following lines if not already present, under [my-ip] section:
; *690: Say LAN IP Address
exten => 0,1,AGI(getip.sh)
exten => 0,n,Wait(1)
exten => 0,n,SayAlpha(${result})
exten => 0,n,Hangup
sudo nano /usr/share/asterisk/agi-bin/getip.sh
Add below lines:
#!/bin/bash
echo SET VARIABLE result ``hostname -I`
NOTE: This forum software has issues showing backtick characters. The “hostname -I” above should have one backtick character before and after it.
sudo chmod 775 /usr/share/asterisk/agi-bin/getip.sh
sudo nano modules.conf
Update following lines:
load => res_agi.so
load => res_speech.so
Now restart Asterisk and confirm DTMF command *690 says the LAN IP address.
sudo nano rpt.conf
Add the following line:
startup_macro = *690
Now reboot the node and confirm it says the LAN IP address.
Might not work if there is a delay in the OS getting an IP address assignment and there are some ways around that possible issue but for now the above works for me.