BASH   24

saypublicip

Guest on 25th July 2022 05:08:38 AM

  1. #!/bin/bash
  2. if [ -z "$1" ]
  3.   then
  4.     echo "No node number supplied - saypublicip.sh <node> "
  5.     exit 1
  6. fi
  7.  
  8. ip=`curl -s ifconfig.me 2>&1`
  9.  
  10. cat /var/lib/asterisk/sounds/letters/i.gsm /var/lib/asterisk/sounds/letters/p.gsm /var/lib/asterisk/sounds/address.gsm > /tmp/ip.gsm
  11.  
  12. asterisk -rx "rpt localplay $1 /tmp/ip"
  13. sleep 1
  14. /usr/local/sbin//speaktext.sh $ip $1
  15.  
  16. rm /tmp/ip.gsm

Raw Paste


Login or Register to edit or fork this paste. It's free.