1.4 Asterisk as VoiceMail for CallManager 4.1 Not Working!

I have sip set up on Callmanager 4.x. When others call my ext of 2016 on ccm after a busy or no answer, asterisk voice mail answers by saying, “Mailbox … password.” I want it to put them into my mailbox so they can leave a message. Somehow I must be missing something… Please help!

I have spent 16 hours easy on trying to figure this one out.

SIP DN is 7777 on CCM
VOICEMAIL on Asterisk is 7777.

Here is my sip.conf:

[general]
context=default
allowoverlap=no
bindport=5060
bindaddr=0.0.0.0
srvlookup=yes
allowexternaldomains=yes
allowexternalinvites=no
allowguest=yes
allowsubscribe=no
allowtransfer=yes
alwaysauthreject=no
autodomain=no
callevents=no
compactheaders=no
dumphistory=no
g726nonstandard=no
ignoreregexpire=no
jbenable=no
jbforce=no
jblog=no
maxcallbitrate=384
maxexpiry=3600
minexpiry=60
nat=no
notifyringing=no
pedantic=no
promiscredir=no
recordhistory=no
relaxdtmf=no
rtcachefriends=no
rtsavesysname=no
rtupdate=no
sendrpid=yes
sipdebug=no
t1min=100
t38pt_udptl=no
[authentication]

[sip]
type=friend
context=incoming
host=172.20.1.57
ipaddr=172.20.1.57
allow=ulaw
allow=alaw
nat=no
canreinvite=yes
qualify=yes

Here is my voicemail.conf

[zonemessages]
eastern=America/New_York|‘vm-received’ Q ‘digits/at’ IMp
central=America/Chicago|‘vm-received’ Q ‘digits/at’ IMp
central24=America/Chicago|‘vm-received’ q ‘digits/at’ H N 'hours’
military=Zulu|‘vm-received’ q ‘digits/at’ H N ‘hours’ 'phonetic/z_p’
european=Europe/Copenhagen|‘vm-received’ a d b ‘digits/at’ HM
[other]

[general]
format=wav49|gsm|wav
serveremail=asterisk
attach=yes
skipms=3000
maxsilence=10
silencethreshold=128
maxlogins=3
emaildateformat=%A, %B %d, %Y at %r
sendvoicemail=yes
attachfmt=wav
deletevoicemail=no
envelope=no
maxgreet=60
maxmessage=120
maxmsg=100
minmessage=1
operator=yes
review=yes
saycid=no
sayduration=yes
mailcmd=/usr/sbin/sendmail -t
externotify=/var/libasterisk/scripts/vm.sh
[default]
2016=1234,Steve,steve@abc.com

Here is the relevant parts of my extensions.conf:

[macro-dialout-callmanager]
exten=s,1,ChanIsAvail(SIP/sip)
exten=s,2,Cut(AVAILCHAN=AVAILCHAN,1)
exten=s,3,Dial(${AVAILCHAN}/${ARG1})
exten=s,4,Hangup
exten=s,102,Congestion
[incoming]
exten=7777,1,GotoIf($[${RDNIS}]?2:400)
exten=7777,2,MailboxExists(${RDNIS}@default
exten=7777,3,Congestion
exten=7777,103,Voicemail(su${RDNIS})
exten=7777,104,Playback(vm-goodbye)
exten=7777,105,Hangup
exten=7777,400,VoicemailMain
[general]
static=yes
writeprotect=no
clearglobalvars=no
autofallthrough=yes
priorityjumping=no
[default]
exten=_230XXXX,1,SetCallerID(${EXTEN:3})
exten=_230XXXX,2,Dial(SIP/28888@172.20.1.57)
exten=_230XXXX,3,Answer
exten=_230XXXX,4,Wait,1
exten=_230XXXX,5,Hangup
exten=_231XXXX,1,SetCallerID(${EXTEN:3})
exten=_231XXXX,2,Dial(SIP/28889@172.20.1.57)
exten=_231XXXX,3,Answer
exten=_231XXXX,4,Wait,1
exten=_231XXXX,5,Hangup

I am using users.conf, but don’t know how that ties in or whether I even need it…???

thanks,

Steve

Then I changed it to this, with no affect:

[incoming]
exten=7777,1,Noop(${RDNIS})
exten=7777,2,GotoIf($[${RDNIS}]?3:400)
exten=7777,3,MailboxExists(${RDNIS}@default)
exten=7777,4,Congestion
exten=7777,103,Voicemail(su${RDNIS})
exten=7777,104,Playback(vm-goodbye)
exten=7777,105,Hangup
exten=7777,400,VoicemailMain

ps. We are running version 1.4

Here is what the .conf’s look like now (pertinent parts). It still will not let me leave voicemail, still wants extension…

sip.conf

[callman01]
type=peer
context=incoming
host=172.20.1.57
ipaddr=172.20.1.57
disallow=all
allow=ulaw
allow=alaw
nat=no
canreinvite=yes
qualify=yes
usereqphone=yes

users.conf (I don’t see where this gets referred to though)
[2016]
callwaiting=no
cid_number=2016
email=steve@korehicom.com
fullname=Steve
hasagent=no
hasdirectory=no
hasiax=no
hasmanager=no
hassip=no
hasvoicemail=yes
deletevoicemail=no
host=dynamic
mailbox=2016
secret=1234
threewaycalling=no
vmsecret=1234
registeriax=no
registersip=no
autoprov=no
canreinvite=no
nat=no
dtmfmode=rfc2833
disallow=all
allow=all
signalling=fxo_ks

extensions.conf (7777 is voicemailmain; default context exists here and in voicemail.conf)

[globals]
CONSOLE=Console/dsp
IAXINFO=guest
TRUNK=SIP/172.20.1.57
TRUNKMSD=1

[general]
static=yes
writeprotect=no
clearglobalvars=no
autofallthrough=yes
priorityjumping=no
[incoming]
exten=7777,1,Noop(${RDNIS})
exten=7777,2,GotoIf($[${RDNIS}]?3:400)
exten=7777,3,MailboxExists(${RDNIS}@default
exten=7777,4,Congestion
exten=7777,103,Voicemail(su${RDNIS})
exten=7777,104,Playback(vm-goodbye)
exten=7777,105,Hangup
exten=7777,400,VoicemailMain

[default] (seems to be the same context as in voicemail.conf?)
exten=7777,1,VoiceMailMain
exten=_230XXXX,1,SetCallerID(${EXTEN:3})
exten=_230XXXX,2,Dial(SIP/28888@ciscocm)
exten=_230XXXX,3,Answer
exten=_230XXXX,4,Wait,1
exten=_230XXXX,5,Hangup
exten=_231XXXX,1,SetCallerID(${EXTEN:3})
exten=_231XXXX,2,Dial(SIP/28889@ciscocm)
exten=_231XXXX,3,Answer
exten=_231XXXX,4,Wait,1
exten=_231XXXX,5,Hangup

Here is the debug for SIP

Connected to Asterisk 1.4.17~dfsg-2ubuntu1 currently running on ubuntu-n160 (pid = 17930)
Reliably Transmitting (no NAT) to 172.20.1.57:5060:
OPTIONS sip:172.20.1.57 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.69:5060;branch=z9hG4bK5af4603a;rport
From: “asterisk” sip:asterisk@192.168.1.69;tag=as56901708
To: sip:172.20.1.57
Contact: sip:asterisk@192.168.1.69
Call-ID: 43d57ee17005a6cb3de1ee1537e541ff@192.168.1.69
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX
Max-Forwards: 70
Date: Thu, 08 May 2008 16:31:53 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Content-Length: 0


ubuntu-n160*CLI>
<— SIP read from 172.20.1.57:5060 —>
SIP/2.0 400 Bad Request - 'Malformed/Missing URL’
Via: SIP/2.0/UDP 192.168.1.69:5060;branch=z9hG4bK5af4603a;rport
From: “asterisk” sip:asterisk@192.168.1.69;tag=as56901708
To: sip:172.20.1.57
Call-ID: 43d57ee17005a6cb3de1ee1537e541ff@192.168.1.69
CSeq: 102 OPTIONS
Content-Length: 0

<------------->
— (7 headers 0 lines) —
Really destroying SIP dialog ‘43d57ee17005a6cb3de1ee1537e541ff@192.168.1.69’ Method: OPTIONS
Reliably Transmitting (no NAT) to 172.20.1.57:5060:
OPTIONS sip:172.20.1.57 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.69:5060;branch=z9hG4bK561c440f;rport
From: “asterisk” sip:asterisk@192.168.1.69;tag=as71b3a43a
To: sip:172.20.1.57
Contact: sip:asterisk@192.168.1.69
Call-ID: 2ab0117f29de20f43668c7ce65fda945@192.168.1.69
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX
Max-Forwards: 70
Date: Thu, 08 May 2008 16:32:53 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Content-Length: 0


ubuntu-n160*CLI>
<— SIP read from 172.20.1.57:5060 —>
SIP/2.0 400 Bad Request - 'Malformed/Missing URL’
Via: SIP/2.0/UDP 192.168.1.69:5060;branch=z9hG4bK561c440f;rport
From: “asterisk” sip:asterisk@192.168.1.69;tag=as71b3a43a
To: sip:172.20.1.57
Call-ID: 2ab0117f29de20f43668c7ce65fda945@192.168.1.69
CSeq: 102 OPTIONS
Content-Length: 0

<------------->
— (7 headers 0 lines) —
Really destroying SIP dialog ‘2ab0117f29de20f43668c7ce65fda945@192.168.1.69’ Method: OPTIONS
[May 8 12:33:20] NOTICE[18500]: cdr.c:1371 do_reload: CDR simple logging enabled.
[May 8 12:33:20] NOTICE[18500]: res_odbc.c:565 reload: Adding ENV var: INFORMIXSERVER=my_special_database
[May 8 12:33:20] NOTICE[18500]: res_odbc.c:565 reload: Adding ENV var: INFORMIXDIR=/opt/informix
[May 8 12:33:20] WARNING[18500]: res_smdi.c:746 reload: No SMDI interfaces were specified to listen on, not starting SDMI listener.
[May 8 12:33:20] NOTICE[18500]: indications.c:505 ast_unregister_indication_country: Removed default indication country ‘us’
[May 8 12:33:20] NOTICE[18500]: app_playback.c:455 reload: Reloading say.conf
[May 8 12:33:20] NOTICE[18500]: pbx_ael.c:4094 pbx_load_module: Starting AEL load process.
[May 8 12:33:20] NOTICE[18500]: pbx_ael.c:4101 pbx_load_module: AEL load process: calculated config file name ‘/etc/asterisk/extensions.ael’.
[May 8 12:33:20] NOTICE[18500]: pbx_ael.c:4109 pbx_load_module: AEL load process: parsed config file name ‘/etc/asterisk/extensions.ael’.
[May 8 12:33:20] NOTICE[18500]: pbx_ael.c:4112 pbx_load_module: AEL load process: checked config file name ‘/etc/asterisk/extensions.ael’.
[May 8 12:33:20] NOTICE[18500]: pbx_ael.c:4114 pbx_load_module: AEL load process: compiled config file name ‘/etc/asterisk/extensions.ael’.
[May 8 12:33:20] NOTICE[18500]: pbx_ael.c:4117 pbx_load_module: AEL load process: merged config file name ‘/etc/asterisk/extensions.ael’.
[May 8 12:33:20] NOTICE[18500]: pbx_ael.c:4120 pbx_load_module: AEL load process: verified config file name ‘/etc/asterisk/extensions.ael’.
[May 8 12:33:20] WARNING[18500]: pbx_config.c:2292 pbx_load_config: No closing parenthesis found? ‘MailboxExists(${RDNIS}@default
[May 8 12:33:20] WARNING[18500]: chan_zap.c:13004 process_zap: Ignoring switchtype
[May 8 12:33:20] WARNING[18500]: chan_zap.c:13004 process_zap: Ignoring signalling
[May 8 12:33:20] WARNING[18500]: chan_zap.c:13004 process_zap: Ignoring rxwink
Reliably Transmitting (no NAT) to 172.20.1.57:5060:
OPTIONS sip:172.20.1.57 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.69:5060;branch=z9hG4bK2dddbb3e;rport
From: “asterisk” sip:asterisk@192.168.1.69;tag=as6d974566
To: sip:172.20.1.57
Contact: sip:asterisk@192.168.1.69
Call-ID: 4a67a03c5cf410614d7bd9093ed2101d@192.168.1.69
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX
Max-Forwards: 70
Date: Thu, 08 May 2008 16:33:21 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Content-Length: 0


ubuntu-n160*CLI>
<— SIP read from 172.20.1.57:5060 —>
SIP/2.0 400 Bad Request - 'Malformed/Missing URL’
Via: SIP/2.0/UDP 192.168.1.69:5060;branch=z9hG4bK2dddbb3e;rport
From: “asterisk” sip:asterisk@192.168.1.69;tag=as6d974566
To: sip:172.20.1.57
Call-ID: 4a67a03c5cf410614d7bd9093ed2101d@192.168.1.69
CSeq: 102 OPTIONS
Content-Length: 0

<------------->
— (7 headers 0 lines) —
Really destroying SIP dialog ‘4a67a03c5cf410614d7bd9093ed2101d@192.168.1.69’ Method: OPTIONS
ubuntu-n160CLI> sip set debug
SIP Debugging re-enabled
ubuntu-n160
CLI>
<— SIP read from 172.20.1.57:5060 —>
INVITE sip:7777@192.168.1.69:5060 SIP/2.0
Via: SIP/2.0/UDP 172.20.1.57:5060;branch=z9hG4bK1aa0354
From: “callman01” sip:7777@172.20.1.57;tag=16787476
To: sip:7777@192.168.1.69
Date: Thu, 08 May 2008 16:33:58 GMT
Call-ID: 8d662480-1de13b1f-2373-390114ac@172.20.1.57
Supported: timer
Min-SE: 1800
User-Agent: Cisco-CCM4.1
Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK
CSeq: 101 INVITE
Max-Forwards: 70
Remote-Party-ID: “callman01” sip:7777@172.20.1.57;party=calling;screen=no;privacy=off
Contact: sip:7777@172.20.1.57:5060
Diversion: sip:2016@172.20.1.57;reason=no-answer
Expires: 180
Allow-Events: telephone-event
Content-Type: application/sdp
Content-Length: 225

v=0
o=CiscoSystemsCCM-SIP 2000 1000 IN IP4 172.20.1.57
s=SIP Call
c=IN IP4 172.20.1.57
t=0 0
m=audio 25238 RTP/AVP 0 101
a=sendrecv
a=rtpmap:0 PCMU/8000
a=ptime:20
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15

<------------->
— (19 headers 11 lines) —
Sending to 172.20.1.57 : 5060 (no NAT)
Using INVITE request as basis request - 8d662480-1de13b1f-2373-390114ac@172.20.1.57
Found peer 'callman01’
Found RTP audio format 0
Found RTP audio format 101
Peer audio RTP is at port 172.20.1.57:25238
Found audio description format PCMU for ID 0
Found audio description format telephone-event for ID 101
Capabilities: us - 0xc (ulaw|alaw), peer - audio=0x4 (ulaw)/video=0x0 (nothing), combined - 0x4 (ulaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event), peer - 0x1 (telephone-event), combined - 0x1 (telephone-event)
Peer audio RTP is at port 172.20.1.57:25238
Looking for 7777 in incoming (domain 192.168.1.69)
RDNIS is 2016
list_route: hop: sip:7777@172.20.1.57:5060

<— Transmitting (no NAT) to 172.20.1.57:5060 —>
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 172.20.1.57:5060;branch=z9hG4bK1aa0354;received=172.20.1.57
From: “callman01” sip:7777@172.20.1.57;tag=16787476
To: sip:7777@192.168.1.69
Call-ID: 8d662480-1de13b1f-2373-390114ac@172.20.1.57
CSeq: 101 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Contact: sip:7777@192.168.1.69
Content-Length: 0

<------------>
Audio is at 192.168.1.69 port 17270
Adding codec 0x4 (ulaw) to SDP
Adding non-codec 0x1 (telephone-event) to SDP

<— Reliably Transmitting (no NAT) to 172.20.1.57:5060 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 172.20.1.57:5060;branch=z9hG4bK1aa0354;received=172.20.1.57
From: “callman01” sip:7777@172.20.1.57;tag=16787476
To: sip:7777@192.168.1.69;tag=as7007e039
Call-ID: 8d662480-1de13b1f-2373-390114ac@172.20.1.57
CSeq: 101 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Contact: sip:7777@192.168.1.69
Content-Type: application/sdp
Content-Length: 240

v=0
o=root 17930 17930 IN IP4 192.168.1.69
s=session
c=IN IP4 192.168.1.69
t=0 0
m=audio 17270 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16>
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv

<------------>
ubuntu-n160*CLI>
<— SIP read from 172.20.1.57:5060 —>
ACK sip:7777@192.168.1.69:5060 SIP/2.0
Via: SIP/2.0/UDP 172.20.1.57:5060;branch=z9hG4bK1f343e68
From: “callman01” sip:7777@172.20.1.57;tag=16787476
To: sip:7777@192.168.1.69;tag=as7007e039
Date: Thu, 08 May 2008 16:33:58 GMT
Call-ID: 8d662480-1de13b1f-2373-390114ac@172.20.1.57
Max-Forwards: 70
CSeq: 101 ACK
Content-Length: 0

<------------->
— (9 headers 0 lines) —
ubuntu-n160*CLI>
<— SIP read from 172.20.1.57:5060 —>
BYE sip:7777@192.168.1.69:5060 SIP/2.0
Via: SIP/2.0/UDP 172.20.1.57:5060;branch=z9hG4bK4e909d2
From: “callman01” sip:7777@172.20.1.57;tag=16787476
To: sip:7777@192.168.1.69;tag=as7007e039
Date: Thu, 08 May 2008 16:33:58 GMT
Call-ID: 8d662480-1de13b1f-2373-390114ac@172.20.1.57
User-Agent: Cisco-CCM4.1
Max-Forwards: 70
CSeq: 102 BYE
Content-Length: 0

<------------->
— (10 headers 0 lines) —
Sending to 172.20.1.57 : 5060 (no NAT)

<— Transmitting (no NAT) to 172.20.1.57:5060 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 172.20.1.57:5060;branch=z9hG4bK4e909d2;received=172.20.1.57
From: “callman01” sip:7777@172.20.1.57;tag=16787476
To: sip:7777@192.168.1.69;tag=as7007e039
Call-ID: 8d662480-1de13b1f-2373-390114ac@172.20.1.57
CSeq: 102 BYE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Contact: sip:7777@192.168.1.69
Content-Length: 0

<------------>
[May 8 12:34:05] WARNING[18504]: app_voicemail.c:6294 vm_authenticate: Couldn’t read username
Really destroying SIP dialog ‘8d662480-1de13b1f-2373-390114ac@172.20.1.57’ Method: BYE
ubuntu-n160CLI> sip set debug off
SIP Debugging Disabled
ubuntu-n160
CLI>