LINUX.ORG.RU
решено ФорумAdmin

Asterisk select Voicemail storage

 , ,


0

1

Задача:
1) Часть голосовых сообщений должна храниться локально, абонент уведомляться сообщением/пейджером на почту, часть /etc/asterisk/voicemail.conf:

[vm]
100 = 100,100,,user0@example.ru,
101 = 101,101,,user1@example.ru,
103 = 103,103,,user3@example.ru,
106 = 106,106,,user6@example.ru,
108 = 108,108,user8@example.com,
109 = 109,109,,user9@example2.ru,
110 = 110,110,,use10@example2.ru,
111 = 111,111,,use11@example2.ru,
2) Часть должна складываться на IMAP, часть /etc/asterisk/voicemail.conf:
[imapvm]
102 = 102,102,,,imapuser=user2@example.ru|imappassword=234|imapfolder=INBOX|delete=no
104 = 104,104,,,imapuser=user4@example.ru|imappassword=567|imapfolder=INBOX|delete=no
105 = 105,105,,,imapuser=user5@example.ru|imappassword=678|imapfolder=INBOX|delete=no
107 = 107,107,,,imapuser=user7@example.ru|imappassword=546|imapfolder=INBOX|delete=no

Проблема:
1) imapstorage упорно ищет для ящиков 100, 101, 103, 106, 108, 109, 110, 111 параметры для соединения с IMAP Хранилищем.

asterisk*CLI> voicemail show users
Context    Mbox  User                      Zone       NewMsg
vm         100   100                       ru              0
vm         101   101                       ru              0
vm         103   103                       ru              0
vm         106   106                       ru              0
vm         108   108                       ru              0
vm         109   109                       ru              0
vm         110   110                       ru              0
vm         111   111                       ru              0
imapvm     102   102                       ru              0
imapvm     104   104                       ru              0
imapvm     105   105                       ru              0
imapvm     107   107                       ru              0
12 voicemail users configured.
[Jan  6 09:32:20] ERROR[21835]: app_voicemail_imapstorage.c:2420 inboxcount2: Couldn't find mailbox 100 in context vm
[Jan  6 09:32:20] ERROR[21835]: app_voicemail_imapstorage.c:2420 inboxcount2: Couldn't find mailbox 101 in context vm
[Jan  6 09:32:20] ERROR[21835]: app_voicemail_imapstorage.c:2420 inboxcount2: Couldn't find mailbox 103 in context vm
[Jan  6 09:32:20] ERROR[21835]: app_voicemail_imapstorage.c:2420 inboxcount2: Couldn't find mailbox 106 in context vm
[Jan  6 09:32:20] ERROR[21835]: app_voicemail_imapstorage.c:2420 inboxcount2: Couldn't find mailbox 108 in context vm
[Jan  6 09:32:20] ERROR[21835]: app_voicemail_imapstorage.c:2420 inboxcount2: Couldn't find mailbox 109 in context vm
[Jan  6 09:32:20] ERROR[21835]: app_voicemail_imapstorage.c:2420 inboxcount2: Couldn't find mailbox 110 in context vm
[Jan  6 09:32:20] ERROR[21835]: app_voicemail_imapstorage.c:2420 inboxcount2: Couldn't find mailbox 111 in context vm

1.1) При этом, при звонке в голосовую почту одного из этих номеров (к примеру на 103 номер) возникает ошибка:
- развитие звонка (для справки):

    -- Executing [103@phones:2] Dial("SIP/104-00000002", "SIP/103,15,rt") in new stack
  == Using SIP RTP CoS mark 5
    -- Called SIP/103
  == Begin MixMonitor Recording SIP/104-00000002
    -- Got SIP response 480 "Temporarily not available" back from 192.168.7.235:5060
    -- SIP/103-00000003 is circuit-busy
  == Everyone is busy/congested at this time (1:0/1/0)
    -- Executing [103@phones:3] NoOp("SIP/104-00000002", "CONGESTION") in new stack
    -- Executing [103@phones:4] GotoIf("SIP/104-00000002", "1?hold") in new stack
    -- Goto (phones,103,5)
    -- Executing [103@phones:5] Macro("SIP/104-00000002", "followme,103") in new stack
    -- Executing [s@macro-followme:1] NoOp("SIP/104-00000002", "Macro folowme") in new stack
    -- Executing [s@macro-followme:2] Goto("SIP/104-00000002", "103,1") in new stack
    -- Goto (macro-followme,103,1)
- вызов voicemail и последующая ошибка «No entry in voicemail config file for '103'»:
    -- Executing [103@macro-followme:1] VoiceMail("SIP/104-00000002", "103@vm,u") in new stack
[Jan  6 09:35:38] NOTICE[21924]: res_rtp_asterisk.c:2339 ast_rtp_read: Unknown RTP codec 95 received from '192.168.7.241:63588'
[Jan  6 09:35:38] WARNING[21924]: app_voicemail_imapstorage.c:5662 leave_voicemail: No entry in voicemail config file for '103'
    -- Auto fallthrough, channel 'SIP/104-00000002' status is 'CONGESTION'
[Jan  6 09:35:38] NOTICE[21924]: channel.c:4170 __ast_read: Dropping incompatible voice frame on SIP/104-00000002 of format ulaw since our native format has changed to 0x2 (gsm)

Материалы:
1) Full content /etc/asterisk/voicemail.conf:

[general]
format= wav49|gsm|wav
attach=yes 
maxmsg=100
maxsecs=600
;minsecs=3
maxgreet=60
skipms=3000
;maxsilence=1
silencethreshold=128
maxlogins=3
moveheard=yes
charset=UTF-8
pbxskip=yes
fromstring=VoiceMail
emailsubject=[PBX]: New message ${VM_MSGNUM} in mailbox ${VM_MAILBOX}
emailbody=Dear ${VM_NAME},\n\njust wanted to let you know you were just left a ${VM_DUR} long message (number ${VM_MSGNUM})\$
emaildateformat=%A, %B %d, %Y at %r
pagerdateformat=%A, %B %d, %Y at %r
mailcmd=/usr/sbin/sendmail -t
delete=yes 
sendvoicemail = yes
pollmailboxes = yes
pollfreq=30
tz=ru
imapserver=imap.example.ru
imapport=993
imapflags=ssl/novalidate-cert/notls
imapparentfolder=INBOX
imapfolder=INBOX
imapgreetings=no
expungeonhangup=no
imapopentimeout=60
imapclosetimeout=60
imapreadtimeout=60
imapwritetimeout=60

[vm]
100 = 100,100,,user0@example.ru,
101 = 101,101,,user1@example.ru,
103 = 103,103,,user3@example.ru,
106 = 106,106,,user6@example.ru,
108 = 108,108,user8@example.com,
109 = 109,109,,user9@example2.ru,
110 = 110,110,,use10@example2.ru,
111 = 111,111,,use11@example2.ru,

[imapvm]
102 = 102,102,,,imapuser=user2@example.ru|imappassword=234|imapfolder=INBOX|delete=no
104 = 104,104,,,imapuser=user4@example.ru|imappassword=567|imapfolder=INBOX|delete=no
105 = 105,105,,,imapuser=user5@example.ru|imappassword=678|imapfolder=INBOX|delete=no
107 = 107,107,,,imapuser=user7@example.ru|imappassword=546|imapfolder=INBOX|delete=no
★★★★★

voicemail может в качестве бэкэнда использовать что-то одно из этого:

# apt-cache search asterisk-voicemail
asterisk-voicemail - simple voicemail support for the Asterisk PBX
asterisk-voicemail-imapstorage - IMAP voicemail storage support for the Asterisk PBX
asterisk-voicemail-odbcstorage - ODBC voicemail storage support for the Asterisk PBX
Единовременно может быть установлен только один пакет asterisk-voicemail*!
Ранее установленный удаляется, см. сообщение «The following packages will be REMOVED» процесса установки:
root@asterisk:/etc/asterisk# apt-get install asterisk-voicemail
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  asterisk-voicemail-imapstorage
The following NEW packages will be installed:
  asterisk-voicemail
0 upgraded, 1 newly installed, 1 to remove and 133 not upgraded.
Need to get 0 B/696 kB of archives.
After this operation, 36.9 kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 42427 files and directories currently installed.)
Removing asterisk-voicemail-imapstorage ...
Selecting previously unselected package asterisk-voicemail.
(Reading database ... 42421 files and directories currently installed.)
Unpacking asterisk-voicemail (from .../asterisk-voicemail_1%3a1.8.13.1~dfsg1-3+deb7u8_amd64.deb) ...
Setting up asterisk-voicemail (1:1.8.13.1~dfsg1-3+deb7u8) ...

petav ★★★★★
() автор топика
Последнее исправление: petav (всего исправлений: 2)
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.