Hi

I use a simple script to enable/disable for voicemail on an extension
for testing (attached: test_voicemail). The script only created the txt
file, but I don't suppose this should matter.

I set up a mailbox. The new message shows fine in 'voicemail show users'
(The new user takes 'voicemail reload' for it to be added on the list,
but after it has been initially added , it seems to be updated
immediately (or by running 'voicemail show users'?).

However the voicemail indication to the tested phone (in chan_dahdi, in
this case) did not follow suit: it never updates. Even a full 'dahdi
restart' is not good enough. Nothing short of a restart of asterisk
seems to make it update.

Looking further I see that the MWI values are cached:

kemeny*CLI> event dump cache MWI 
Event Type: MWI
Cache Unique Keys:
--> Mailbox
--> Context

--- Begin Cache Dump ---

Event: MWI
Mailbox: 4004
Context: default
NewMessages: 1
OldMessages: 0
EntityID: 00:1c:c0:fc:f0:ad

--- End Cache Dump ---

kemeny*CLI> voicemail show users 
Context    Mbox  User                      Zone       NewMsg
default    4004                                            0
1 voicemail users configured.


Is there any way to tell Asterisk to flush that cache? Is this
considered a bug?


Tested on 1.8 (1.8.7.0 and SVN-branch-1.8-r349672).

-- 
               Tzafrir Cohen
icq#16849755              jabber:[email protected]
+972-50-7952406           mailto:[email protected]
http://www.xorcom.com  iax:[email protected]/tzafrir
#!/bin/sh

NUM=${2-:4001}

vm_base="/var/spool/asterisk/voicemail/default"
vm_dir="$vm_base/$NUM/INBOX"

setup() {
        sed -i -e "/^$NUM/d" -e "\$a$NUM => ," /etc/asterisk/voicemail.conf
}

on() {
        mkdir -p "$vm_dir"
        cat <<EOF >"$vm_dir/msg0000.txt"
;
; Message Information file
;
[message]
origmailbox=$NUM
context=from-internal
macrocontext=
exten=s
priority=1
callerchan=DAHDI/1-1
callerid="Channel 1" <$NUM>
origdate=`date -R`
origtime=`date +'%s'`
category=
duration=4
EOF
}

off() {
        rm -f "$vm_dir/"*
}

case "$1" in
        setup | on | off) "$1";;
esac
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to