Пожалуйста, войдите здесь. Часто задаваемые вопросы О нас
Задайте Ваш вопрос

История изменений [назад]

нажмите, чтобы скрыть/показать версии 1
изначальная версия
редактировать

спросил 2013-10-03 03:27:44 +0400

Muzzykiev Gravatar Muzzykiev

sms + freepbx +dongle

Есть 11 астериск + 2.11 freepbx. Хочется смс читать.

прописал контекст в extensions_custom.conf

[dongle-incoming-sms] exten => sms,1,Noop(Incoming SMS from ${CALLERID(num)} ${BASE64DECODE(${SMSBASE64})}) exten => sms,n,System(echo '${STRFTIME(${EPOCH},,%Y-%m-%d %H:%M:%S)} — ${DONGLENAME} — ${CALLERID(num)}: ${BASE64DECODE(${SMSBASE64})}' >> /var/log/asterisk/sms/sms.txt) exten => sms,n,Hangup() exten => _.,1,Set(CALLERID(name)=${CALLERID(num)}) exten => _.,n,Goto(from-trunk,${EXTEN},1)

[dongle-incoming-ussd] exten => ussd,1,Noop(Incoming USSD: ${BASE64DECODE(${USSDBASE64})}) exten => ussd,n,System(echo '${STRFTIME(${EPOCH},,%Y-%m-%d %H:%M:%S)} — ${DONGLENAME}: ${BASE64DECODE(${USSDBASE64})}' >> /var/log/asterisk/ussd/ussd.txt) exten => ussd,n,Hangup() exten => _.,1,Set(CALLERID(name)=${CALLERID(num)}) exten => _.,n,Goto(from-trunk,${EXTEN},1)

[from-trunk-dongle] include => dongle-incoming-sms include => dongle-incoming-ussd

в самом dongle.conf отправляю в него

на входящее смс вижу -

[2013-10-03 02:12:13] VERBOSE[13089] atresponse.c: [mts] Got SMS from +380500000000: '�' [2013-10-03 02:12:13] VERBOSE[13147][C-00000002] pbx.c: -- Executing [sms@from-trunk-dongle:1] NoOp("Local/sms@from-trunk-dongle-00000001;1", "Incoming SMS from +380500000000 �") in new stack [2013-10-03 02:12:13] VERBOSE[13147][C-00000002] pbx.c: -- Executing [sms@from-trunk-dongle:2] System("Local/sms@from-trunk-dongle-00000001;1", "echo '2013-10-03 02:12:13 � mts � +380500000000: �' >> /var/log/asterisk/sms/sms.txt") in new stack [2013-10-03 02:12:13] VERBOSE[13147][C-00000002] pbx.c: -- Executing [sms@from-trunk-dongle:3] Hangup("Local/sms@from-trunk-dongle-00000001;1", "") in new stack [2013-10-03 02:12:13] VERBOSE[13147][C-00000002] pbx.c: == Spawn extension (from-trunk-dongle, sms, 3) exited non-zero on 'Local/sms@from-trunk-dongle-00000001;1' [2013-10-03 02:12:13] VERBOSE[13147][C-00000002] pbx.c: -- Executing [h@from-trunk-dongle:1] Set("Local/sms@from-trunk-dongle-00000001;1", "CALLERID(name)=+380500000000") in new stack [2013-10-03 02:12:13] VERBOSE[13147][C-00000002] pbx.c: -- Executing [h@from-trunk-dongle:2] Goto("Local/sms@from-trunk-dongle-00000001;1", "from-trunk,h,1") in new stack [2013-10-03 02:12:13] VERBOSE[13147][C-00000002] pbx.c: -- Goto (from-trunk,h,1) [2013-10-03 02:12:13] VERBOSE[13147][C-00000002] pbx.c: -- Executing [h@from-trunk:1] Macro("Local/sms@from-trunk-dongle-00000001;1", "hangupcall,") in new stack [2013-10-03 02:12:13] VERBOSE[13147][C-00000002] pbx.c: -- Executing [s@macro-hangupcall:1] GotoIf("Local/sms@from-trunk-dongle-00000001;1", "1?theend") in new stack [2013-10-03 02:12:13] VERBOSE[13147][C-00000002] pbx.c: -- Goto (macro-hangupcall,s,3) [2013-10-03 02:12:13] VERBOSE[13147][C-00000002] pbx.c: -- Executing [s@macro-hangupcall:3] ExecIf("Local/sms@from-trunk-dongle-00000001;1", "0?Set(CDR(recordingfile)=)") in new stack [2013-10-03 02:12:13] VERBOSE[13147][C-00000002] pbx.c: -- Executing [s@macro-hangupcall:4] Hangup("Local/sms@from-trunk-dongle-00000001;1", "") in new stack [2013-10-03 02:12:13] VERBOSE[13147][C-00000002] appmacro.c: == Spawn extension (macro-hangupcall, s, 4) exited non-zero on 'Local/sms@from-trunk-dongle-00000001;1' in macro 'hangupcall' [2013-10-03 02:12:13] VERBOSE[13147][C-00000002] pbx.c: == Spawn extension (from-trunk, h, 1) exited non-zero on 'Local/sms@from-trunk-dongle-00000001;1'

но в /var/log/asterisk/sms/sms.txt ничего нет и близко. Что то я на ночь глядя не допираю явно но вот что - пните в нужном направлении плз.

sms + freepbx +dongle

Есть 11 астериск + 2.11 freepbx. Хочется смс читать.

прописал контекст в extensions_custom.conf

[dongle-incoming-sms]
exten => sms,1,Noop(Incoming SMS from ${CALLERID(num)} ${BASE64DECODE(${SMSBASE64})})
${BASE64_DECODE(${SMS_BASE64})})
exten => sms,n,System(echo '${STRFTIME(${EPOCH},,%Y-%m-%d %H:%M:%S)} — ${DONGLENAME} — ${CALLERID(num)}: ${BASE64DECODE(${SMSBASE64})}' ${BASE64_DECODE(${SMS_BASE64})}' >> /var/log/asterisk/sms/sms.txt)
exten => sms,n,Hangup()
exten => _.,1,Set(CALLERID(name)=${CALLERID(num)})
exten => _.,n,Goto(from-trunk,${EXTEN},1)

_.,n,Goto(from-trunk,${EXTEN},1) [dongle-incoming-ussd] exten => ussd,1,Noop(Incoming USSD: ${BASE64DECODE(${USSDBASE64})}) ${BASE64_DECODE(${USSD_BASE64})}) exten => ussd,n,System(echo '${STRFTIME(${EPOCH},,%Y-%m-%d %H:%M:%S)} — ${DONGLENAME}: ${BASE64DECODE(${USSDBASE64})}' ${BASE64_DECODE(${USSD_BASE64})}' >> /var/log/asterisk/ussd/ussd.txt) exten => ussd,n,Hangup() exten => _.,1,Set(CALLERID(name)=${CALLERID(num)}) exten => _.,n,Goto(from-trunk,${EXTEN},1)

_.,n,Goto(from-trunk,${EXTEN},1) [from-trunk-dongle] include => dongle-incoming-sms include => dongle-incoming-ussd

dongle-incoming-ussd

в самом dongle.conf отправляю в него

на входящее смс вижу -

[2013-10-03 02:12:13] VERBOSE[13089] atresponse.c: at_response.c: [mts] Got SMS from +380500000000: '�'
[2013-10-03 02:12:13] VERBOSE[13147][C-00000002] pbx.c: -- Executing [sms@from-trunk-dongle:1] NoOp("Local/sms@from-trunk-dongle-00000001;1", "Incoming SMS from +380500000000 �") in new stack
[2013-10-03 02:12:13] VERBOSE[13147][C-00000002] pbx.c: -- Executing [sms@from-trunk-dongle:2] System("Local/sms@from-trunk-dongle-00000001;1", "echo '2013-10-03 02:12:13 � mts � +380500000000: �' >> /var/log/asterisk/sms/sms.txt") in new stack
[2013-10-03 02:12:13] VERBOSE[13147][C-00000002] pbx.c: -- Executing [sms@from-trunk-dongle:3] Hangup("Local/sms@from-trunk-dongle-00000001;1", "") in new stack
[2013-10-03 02:12:13] VERBOSE[13147][C-00000002] pbx.c: == Spawn extension (from-trunk-dongle, sms, 3) exited non-zero on 'Local/sms@from-trunk-dongle-00000001;1'
[2013-10-03 02:12:13] VERBOSE[13147][C-00000002] pbx.c: -- Executing [h@from-trunk-dongle:1] Set("Local/sms@from-trunk-dongle-00000001;1", "CALLERID(name)=+380500000000") in new stack
[2013-10-03 02:12:13] VERBOSE[13147][C-00000002] pbx.c: -- Executing [h@from-trunk-dongle:2] Goto("Local/sms@from-trunk-dongle-00000001;1", "from-trunk,h,1") in new stack
[2013-10-03 02:12:13] VERBOSE[13147][C-00000002] pbx.c: -- Goto (from-trunk,h,1)
[2013-10-03 02:12:13] VERBOSE[13147][C-00000002] pbx.c: -- Executing [h@from-trunk:1] Macro("Local/sms@from-trunk-dongle-00000001;1", "hangupcall,") in new stack
[2013-10-03 02:12:13] VERBOSE[13147][C-00000002] pbx.c: -- Executing [s@macro-hangupcall:1] GotoIf("Local/sms@from-trunk-dongle-00000001;1", "1?theend") in new stack
[2013-10-03 02:12:13] VERBOSE[13147][C-00000002] pbx.c: -- Goto (macro-hangupcall,s,3)
[2013-10-03 02:12:13] VERBOSE[13147][C-00000002] pbx.c: -- Executing [s@macro-hangupcall:3] ExecIf("Local/sms@from-trunk-dongle-00000001;1", "0?Set(CDR(recordingfile)=)") in new stack
[2013-10-03 02:12:13] VERBOSE[13147][C-00000002] pbx.c: -- Executing [s@macro-hangupcall:4] Hangup("Local/sms@from-trunk-dongle-00000001;1", "") in new stack
[2013-10-03 02:12:13] VERBOSE[13147][C-00000002] appmacro.c: app_macro.c: == Spawn extension (macro-hangupcall, s, 4) exited non-zero on 'Local/sms@from-trunk-dongle-00000001;1' in macro 'hangupcall'
[2013-10-03 02:12:13] VERBOSE[13147][C-00000002] pbx.c: == Spawn extension (from-trunk, h, 1) exited non-zero on 'Local/sms@from-trunk-dongle-00000001;1'

'Local/sms@from-trunk-dongle-00000001;1'

но в /var/log/asterisk/sms/sms.txt ничего нет и близко. Что то я на ночь глядя не допираю явно но вот что - пните в нужном направлении плз.

Проект компании "АТС Дизайн"
Asterisk® и Digium® являются зарегистрированными торговыми марками компании Digium, Inc., США.
IP АТС Asterisk распространяется под лицензией GNU GPL.