Sunday, April 14, 2013

Asterisk voice mail and not requiring entering a mailbox number for retrieval


My Cisco Unity Express module exploded recently, so being without a (world's most expensive) home answering machine, I thought I'd just commit to running Asterisk and it's voice mail system instead.

I haven't fiddled with starting up Asterisk from scratch in years, but given I might actually use it now, it seemed to be worth the effort familiarizing myself with all the CLI / configuration options again.

I managed to get a new version of X-Lite 4 from http://www.counterpath.com/x-lite.html running and registered, was able to forward it to voice mail  and could retrieve voice mail by dialing an extension for the VoiceMailMain application.  I struggled with removing the requirement to enter an extension number though.

What I found is that I needed to pass the caller id of my X-Lite 4 device via the SIP.CONF configuration, to be handled by the ${CALLERID(num) variable in the EXTENSIONS.CONF entry.

Here's the relevant snippets:

SIP.CONF

[general]
context=default
allowguest=no

[web1]
type=friend
host=dynamic
secret=web2
context=users
deny=0.0.0.0/0
permit=192.168.10.0/255.255.255.0
; below define caller id that will be processed by the VoiceMailMain / CALLERID(num) variable
callerid="web1" <6001>


EXTENSIONS.CONF

[default]

[demo]

[users]
; test xlite phone
exten=>6001,1,Dial(SIP/web1,20)
exten=>6001,n,VoiceMail(6001@webvm,u)

; generic voicemail retrieval app
exten=>6500,1,Answer(500)
; below catch caller id that represents voice mail box number
exten=>6500,n,VoiceMailMain(${CALLERID(num)}@webvm)


VOICEMAIL.CONF

[webvm]

; simple voice mail box setup
6001 => 12345,Web,web@web.com,web@web.com,attach=no|tz=eastern

No comments:

Post a Comment