Straight to voicemail without inputing box #


Anyone have any ideas how I can have a user dial the voicemail and have it automatically go to the phones voicemail? The phones I am using (cisco spa502g) have a shortcut button for voicemail. I have programmed the button but it would be nice for the person to skip inputing the mailbox number. Nobody has two extensions or move to different phones.

one of my phones in extension.conf

exten => 1000,hint,SIP/user0
exten => 1000,1,Dial(SIP/user0,5)
same => n,GotoIf($["${DIALSTATUS}" = “BUSY”]?busy:unavail)
same => n(unavail),VoiceMail(1000@normMessage,b)
same => n,Hangup()
same => n(busy),VoiceMail(1000@normMessage,b)
same => n,Hangup()

exten => 6150,1,VoiceMailMain(${EXTEN}@normMessage)


Assuming the boxnumber is identical to the CALLERID(num) of the phone calling extension 6150 You may do the following:

[services] exten => 6150,1,VoiceMailMain(${CALLERID(num)}@normMessage)


I tried your suggested code but there was no change. Yes, the boxnumber is identical to the CALLERID(num) of the phone calling extension 6150.

It works if I change callerid to the actual extension (see below) but of course everyone would be leaving a voice mail for that one person

exten => 6150,1,VoiceMailMain(1000@normMessage)

I have “callerid = Random User” in sip.conf. Does this have any impact? I didn’t thinks so because you pull out the number with the code you gave me.


exten => 6150,1,VoiceMailMain(s${CALLERID(num)}@normMessage)

Note the ‘s’ before ${CALLERID(num)}


@gtj0: The s-prefix only suppresses the PIN-request but has no impact on the voicebox selected.

@gwedertz: As in Your example in context LocalSets all boxrecordings go to 1000@normMessage, VoiceMailMain will onlx playback Messages for this specific box. If this was Your intention, than Your assumption with VoiceMailMain(1000@normMessage) in Services was correct. But if You prefer individual messages to the persons/extensions that where called, than You have to correct Your LocalSets-Context to direct the messages to the box corresponding to the extension dialed within the context, And in this case my suggestion should lead You to the result You wanted to have if I understood You well :smile:


Perhaps it would help you to better understand what is going on if you change your [services] context as follows:

exten => 6150,1,NoOp(Access Voicemail)
same => n,NoOp(EXTEN = ${EXTEN})
same => n,NoOp(CALLERID = ${CALLERID(num)})
same => n,VoiceMailMain(${CALLERID(num)}@normMessages)
same => n,Hangup()

Then watch the CLI (with verbose >=3) when you call 6150.


If you have callerid = “random user” in your sip.conf for the user0 device, perhaps you will want to try setting it to something like…

callerid=Random User <1000>


Thanks for your help everyone. I was able to get the ip phones working the way I wanted with the help provided.

Interesting note, the ip phones work fine with this setup. I have a few softphones and they always pass the user0@normMessage even with callerid(num). user0 is the id of the phone and changes accordingly with each phone. I think this is a problem on my side with the softphone. Shouldn’t be too hard to figure out :wink: Thanks again guy’s for your help.