System information

Note that Asterisk’s dynamic realtime will not work with this configu-
ration, as a peer’s information is only loaded into memory when there
is an actual call involving that peer. Since message notification is not a
call as far as Asterisk is concerned, using dynamic realtime will not allow
message waiting to happen for any peers not registered to Asterisk.
You will not want to implement this unless you have prototyped the basic operation of
the solution. Although we all agree that SIP is a protocol, not everyone agrees as to the
correct way to implement the protocol. As a result, there are many interoperability
challenges that need to be addressed in a solution like this. We have provided a basic
introduction to this concept in this book, but the implementation details will depend
on other factors external to Asterisk, such as the capabilities of the proxy.
The fact that no device has to register with Asterisk will significantly reduce the load
on the Asterisk server, and as a result this design should allow for a voicemail server
that can support several thousand subscribers.
Dialplan requirements
The dialplan of the voicemail server can be fairly simple. Two needs must be satisfied:
1. Receive incoming calls and direct them to the appropriate mailbox
2. Handle incoming calls from users wishing to check their messages
The system that is passing calls to the voicemail server should set some SIP headers in
order to pass additional information to the voicemail server. Typically, this information
would include the mailbox/username that is relevant to the call. In our example, we
are going to set the headers X-Voicemail-Mailbox and X-Voicemail-Context, which will
contain information we wish to pass to the voicemail server.
#
If the source system is also an Asterisk system, you might set the headers
using the SIPAddHeader() voicemail application, in a manner similar
to this:
exten => sendtovoicemail,1,Verbose(2,Set SIP headers for voicemail)
same => n,SipAddHeader(X-Voicemail-Mailbox: <mailbox number>)
same => n,SipAddHeader(X-Voicemail-Context: voicemailbox)
Note that this dialplan does not go on the voicemail server. It would
only be useful if one of the other servers in your environment was also
an Asterisk server. If you were using a different kind of server, you would
need to find out how to set custom headers in that platform, or find out
if it already uses specific headers for this sort of thing, and possibly
modify the dialplan on the voicemail server to handle those headers.
#As far as we know, there aren’t any specific SIP headers that are standardized for this sort of thing, so you
should be able to name the headers whatever you want. We chose these header names simply because they
make some sort of sense. You may find that other headers would suit your needs better.
176 | Chapter 8:Voicemail