Отправка sms через asterisk с chan_dongle

Здравствуйте!

В своем блоге (http://asterisk-service.com/blog/asterisk-1/post/sip-50) вы поднимали тему как настроить астер так, чтобы можно было с него отправлять смс посредством sip чата.

У меня прри любом раскладе не хочет отправлять смс (для упрощения строка написана текстом, без переменных )

same => n,DongleSendSMS(dongle0, +7921хххх, "test01", 1440, yes)

вот что выдет лог

    -- Executing [7921xxx@send-sms:6] DongleSendSMS("Message/ast_msg_queue", "dongle0, +7921ххх, "test01", 1440, yes") in new stack
[2016-08-01 11:49:38] ERROR[1815][C-00000005]: app.c:113 app_send_sms_exec: [dongle0] Invalid destination number with id 0xb6601da4


приём смс работает, через cli сообщения тоже отправляются.

 

В чём проблема?

Clayer
Clayer
7
| 2 1 1
Asked on 8/1/16, 9:53 AM
1
vote
18047 Views

Не используйте кавычьки и пробелы в DongleSendSMS, была аналогичная проблема.

same => n,DongleSendSMS(dongle0,+7921хххх,test01,1440,yes)

Так же в том примере в DongleSendSMS прилетает номер получателя в виде sip:+7921хххх, что нам неподходит.

Вот рабочая конструкция

exten => _+380XXXXXXXXX,1,NoOp(SMS send to dongle)
same => n,NoOp(To ${MESSAGE(to)})
same => n,NoOp(From ${MESSAGE(from)})
same => n,NoOp(Body ${MESSAGE(body)})
same => n,Set(SMSTEMP=${CUT(MESSAGE(to),@,1)})
same => n,Set(SMSTO=${CUT(SMSTEMP,\:,2)})
same => n,DongleSendSMS(Vodafone,${SMSTO},${MESSAGE(body)},1440,yes)
;same => n,System(asterisk -rx "dongle sms Vodafone ${SMSTO} ${MESSAGE(body)}") если не работает DongleSendSMS можно отправлять через System
same => n,Hangup()

 

Asterisk 13.11.2

 

Max
Max
6
| 1 0 0
Answered on 10/27/16, 8:08 AM
0
vote

Думаю вормат номера не подходит. попробуй без + или с 8 

Alexcr
Alexcr
58
| 4 1 2
Answered on 9/17/16, 8:56 AM
0
vote

Your answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

Ask a Question

Поделится

Будьте в курсе

Об этом форуме

This community is for professionals and enthusiasts of our products and services.

Read Guidelines

Question tools

3 follower(s)

Stats

Asked: 8/1/16, 9:53 AM
Seen: 18047 times
Last updated: 10/27/16, 8:10 AM

Более 1 000 000 компаний в мире используют Asterisk.

Присоединяйтесь к нам и сделайте вашу компанию лучше.