Код: Выделить всё
[dongle-incoming-sms]
exten => sms,1,Noop(Vhodishee smst ot ${CALLERID(num)} ${BASE64_DECODE(${SMS_BASE64})})
exten => sms,n,System(echo '${STRFTIME(${EPOCH},,%Y-%m-%d %H:%M:%S)} — ${DONGLENAME} — ${CALLERID(num)}: ${BASE64_DECODE(${SMS_BASE64})}' >> /var/log/asterisk/sms.txt)
exten => sms,n,Hangup()
[dongle-incoming-ussd]
exten => ussd,1,Noop(Vhodiahi ussd: ${BASE64_DECODE(${USSD_BASE64})})
exten => ussd,n,System(echo '${STRFTIME(${EPOCH},,%Y-%m-%d %H:%M:%S)} — ${DONGLENAME}: ${BASE64_DECODE(${USSD_BASE64})}' >> /var/log/asterisk/ussd.txt)
exten => ussd,n,Hangup()
[dongle-incoming]
include => dongle-incoming-sms
include => dongle-incoming-ussd
exten => _X.,1,Dial(SIP/me)
exten => h,1,Hangup()
[Jun 6 05:26:37] WARNING[507][C-00000015]: pbx.c:4924 pbx_extension_helper: No application 'System' for extension (dongle-incoming, sms, 2)