How to tickle the MWI


(ledoktre) #1

This is a re-post of an old post I did a while back. I got busy, didn’t log in for a while, and didn’t have a chance to reply before it auto-closed :

"I had a request come in as to how to turn the MWI light on in a given hotel room to let the person know they have a message waiting. When they press the button it calls the front desk and they give them their message, and then toggle the light off.

I know the MWI is usually tied to voicemail. Without enabling voicemail - can anyone think of a way to facilitate the above? Something that would be easily enough achieved via the front desk phone itself.

The customer’s old Mitel system had a feature built in to handle this."

@cynjut replied: “The MWI is tied to a hint in Asterisk, so turning the hint on or off would turn the light on or off. After that, programming a button on the phone to do something (like call the front desk) is relatively trivial and could, through a custom context, toggle the hint back off if it was on.”

Fast forward to today, I guess… I understand creating a custom context. I should be able to figure out something there. I don’t think it would be a big deal to create an extension 1XX (for example) under a custom context, and use the ${exten} variable to manipulate the dialplan dynamically. That part I think I can fudge through.

I am a little stuck though, how do you create a hint and delete a hint? Ive done some searching around and not found much on that. I assume each extension would have its MWI extension set by default in FreePBX, so it would monitor for a hint there. I could probably hit the messages button and see what it dials. Presumably it would dial *97 to get into system voicemail. I assume you can override that in freepbx someplace though I haven’t looked into that (for hotel room extensions I would want it to dial 0 for operator automatically not a voicemail extension).

The big one for me is the hints. Does anyone have an example of creating and deleing a hint from a context on freepbx? I’ve been digging but Im not sure how I ought to go about it.

Thanks,


#2

Perhaps this will help

https://kb.smartvox.co.uk/asterisk/how-it-works/sip-subscribenotify-asterisk-hints-explained/


(Lorne Gaetz) #3

An example of using dialplan hints here

I’m not aware of any way to directly manipulate the MWI using dialplan, but it’s quite simple to do it with a BLF.


#4

I think that the simple existance of a file in /etc/asterisk/voicemail/default/1234/INBOX/msg0000.txt will make the MWI light go on, how you handle it is another story :wink:


(ledoktre) #5

Thanks @dicko. I am reading through the link you posted. @lgaetz I am trying to use this (in this instance) with a hotel full of old mitel phones connected via 3 grandstream 48 port ata’s. So using BLF isn’t going to work in this instance.


(ledoktre) #6

I had wondered about creating a “fake” file and then somehow removing it once the message is delivered. I was hoping there might be an internal way to do it without touching the file system.


#7

I doubt it, Comedian Mail predates even asterisk by a few years and the mechanism is hard coded, Yes you can hint/notify/subscribe but with a mitel, perhaps you let the underlying process just trigger the MWI light but simpply have the button’s return dial to *98 or whatever, be intercepted by code you will write, which will call the Front desk (mission accomplished) and then delete the file device that tickled the light (reset the status) , very far form perfect but should be functional for your use case, call it pragmatism.


(ledoktre) #8

@dicko, I was able to create an empty file (from CLI) under /var/spool/asterisk/voicemail/default/1234/INBOX/msg0000.txt and it did work. Removing the file also made the light go out. Not perfect but it does seem to work.

I suppose the other option (and a lot more complicated) is to try and change each extension to use a custom hint in its mailbox field, and if its custom we could use pure dialplan to manipulate it? That seems to be my issue. You can’t modify a hint unless its custom (that I can find).

?


#9

As I said, pragmatic solutions fulfill your use case, you have seen the basic trigger/untrigger process in it’s entirety , unless there are other reasons to keep voicemail as voicemail for other users , you are repurposing the flashing LED to something that takes outsidetheboxthinking. Go with the Flow Luke


(ledoktre) #10

I did also as a quick test, try it on an extension that does not have VM enabled. It didn’t work, but then I went into the extension > advanced, and added 1234@default and it lit right up, even with VM disabled. Nice.


#11

Excellent Luke :wink:


(ledoktre) #12

Nice. Go with the Flow, Luke. Yes I think solution works it does (sorry a horrible Yoda impression). I will see where it gets me thanks.


#13

Mission accomplished you are now successfully ‘tickling the MWI’


(ledoktre) #14

I am going to add some code to the PBX now for this and play with the Mitel phones. I did some initial testing on a test box and sure enough with a custom destination / misc app setup I was able to setup a * code to enable and disable MWI light. Works pretty slick.

Have to figure out how to capture the call coming back and have it include dialing the code to disable the light yet but that’s next.

Thanks


(system) closed #15

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.