--- safe_asterisk.orig	2018-07-10 09:32:27.279094016 +0000
+++ safe_asterisk	2018-07-10 09:31:29.484324987 +0000
@@ -173,9 +173,11 @@
 		if test -n "$TTY" && test "$TTY" != "no"; then
 			cd "${RUNDIR}"
 			stty sane </dev/${TTY}
+			export TERM=xterm
 			nice -n $PRIORITY "${ASTSBINDIR}/asterisk" -f ${CLIARGS} ${ASTARGS} >/dev/${TTY} 2>&1 </dev/${TTY}
 		else
 			cd "${RUNDIR}"
+			export TERM=xterm
 			nice -n $PRIORITY "${ASTSBINDIR}/asterisk" -f ${CLIARGS} ${ASTARGS} >/dev/null 2>&1 </dev/null
 		fi
 		EXITSTATUS=$?
