Created
May 22, 2016 03:37
-
-
Save goedecke/7f08cfcd25f7569dbba8fed13ca63138 to your computer and use it in GitHub Desktop.
Añadir re-enviador de SMS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//AL FINAL de /etc/asterisk/extensions_custom.conf | |
// Reemplaza <Tu TELEFONO> por Tu telefono | |
// Reemplaza <Tu correo> por Tu correo | |
[from-trunk-dongle] | |
exten => sms,1,Verbose(Incoming SMS from ${CALLERID(num)} ${BASE64_DECODE(${SMS_BASE64})}) | |
exten => sms,n,System(echo "To: <Tu correo>\nSubject: Incoming SMS from ${CALLERID(num)}\n\n${STRFTIME(${EPOCH},,%Y-%m-%d %H:%M:%S)} - ${DONGLENAME} - ${CALLERID(num)}: " > /tmp/sms.txt) | |
exten => sms,n,Set(FILE(/tmp/sms.txt,,,a)=${BASE64_DECODE(${SMS_BASE64})}) | |
exten => sms,n,System(sendmail -t < /tmp/sms.txt) | |
exten => sms,n,DongleSendSMS(dongle0,<Tu TELEFONO>,${BASE64_DECODE(${SMS_BASE64})} - De ${CALLERID(num)}) | |
exten => sms,n,Hangup() | |
exten => _.,1,Set(CALLERID(name)=${CALLERID(num)}) | |
exten => _.,n,Goto(from-trunk,${EXTEN},1) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment