[Asterisk-Users] Adding an app

Steven Critchfield critch at basesys.com
Mon Jun 9 20:37:01 MST 2003


On Mon, 2003-06-09 at 13:01, JKNUTSEN at UP.COM wrote:
> I am in the process of testing out the Cisco ATA 186 to provide analog
> phone service via VoIP for some of our remote users.  I have that working
> fine and well, but am struggling with another aspect.  We already have a
> large centralized voicemail system, which I would like to use for these
> users.  I can get the call to roll to new the centralized voicemail no
> problem, but I'd like to provide message waiting for them as well.  I've
> seen where Asterisk can provide MWI via stutter dial tone for its own
> internal voicemail.  After looking at the source code, it appears that
> there is a flag set that determines whether or not  * needs to play stutter
> dial tone when the user lifts the handset.  I can get my voicemail system
> to pass the MWI to Asterisk in this form:
> 
> 810NXXXXXX == turns off MWI
> 811NXXXXXX == turns on MWI
> 
> I would like to set up extensions.conf like this:
> 
> exten => 810NXXXXXX,1,MessageWaitOff(EXTEN:6)
> exten => 811NXXXXXX,1,MessageWaitOn(EXTEN:6)
> 
> I would like the MessageWaitOff and MessageWaitOn apps to appropriately set
> the flag for the extension that is passed to it.  This is where my problems
> start.  I have spent some time looking through the source code, but I
> haven't determined what all I need to touch to add an application and have
> Asterisk recognize it.  I have created the apps, compiled them and created
> the shared object file.  What other steps do I need to take?  Will what I'm
> proposing here even work?

You need to get your shared object into the asterisk lib directory, and
worst case, add a load command to the modules.conf file.

Comment as to how you plan on implementing the above function. The exten
does not get the MWI, it is a channel. Channels and extensions are
different. Extensions can point to many channels, but a channel only
points to one phone interface. You will need to make a lookup to go from
extension to channel, then you can go toggle the MWI. Otherwise your
mailbox is going to have to be your extension, possibly in that long
format, and you will have to traverse every channel to find which ones
to set MWI.

-- 
Steven Critchfield <critch at basesys.com>




More information about the asterisk-users mailing list