astinit.sh 855 B

12345678910111213141516
  1. #!/bin/sh
  2. SIPNATPATH=/etc/asterisk/sip_nat.conf
  3. echo "externaddr = ${HOST}" > ${SIPNATPATH}
  4. echo "externhost = ${HOST}" >> ${SIPNATPATH}
  5. echo "externrefresh = 60" >> ${SIPNATPATH}
  6. echo "localnet = 192.168.0.0/255.255.0.0" >> ${SIPNATPATH}
  7. [ -f /etc/scripts/extension_gen ] && /etc/scripts/extension_gen 0
  8. [ -f /etc/scripts/extension_gen ] && /etc/scripts/extension_gen 1
  9. [ -f /etc/scripts/generate_trunk_conf ] && /etc/scripts/generate_trunk_conf trunk
  10. [ -f /etc/scripts/generate_trunk_conf ] && /etc/scripts/generate_trunk_conf did
  11. [ -f /etc/scripts/generate_trunk_conf ] && /etc/scripts/generate_trunk_conf dod
  12. [ -f /etc/scripts/generate_group_conf ] && /etc/scripts/generate_group_conf
  13. [ -f /etc/scripts/generate_context_conf ] && /etc/scripts/generate_context_conf
  14. [ -f /etc/scripts/generate_extension_conf ] && /etc/scripts/generate_extension_conf