Voicemail always asking for a password - FIXED


#1

Hi,

I have my system set up and (mostly!) working. Is there any way of having Asterisk not ask for a password if the user is dialing in from their own phone? I’m running 1.2.1 and have Grandstream 2000 phones.

We’re dialling 86 to get to our voicemail. If we try and dial our own extension, we end up calling ourselves…

Appropriate part of extensions.conf:

exten => 6002,1,Macro(stdexten,6002,${BEN})
exten => ben,1,Goto(6002|1)

[voicemail]
;voicemail, speaks for its self really
exten => 86,1,VoicemailMain
exten => 86,2,Hangup
exten => 1571,1,VoicemailMain
exten => 1571,2,Hangup

[macro-stdexten];
;
; Standard extension macro:
; ${ARG1} - Extension (we could have used ${MACRO_EXTEN} here as well
; ${ARG2} - Device(s) to ring
;
;is the caller thats beeing called 6007 ?
exten => s,1,GotoIf($[${ARG1} = 6007]?30:2)
;yes go to 30, no go to 2

;save all the caller id info (for 1471) in CALLOG/EXTEN
exten => s,2,DBput(CALLLOG/${ARG1}=${CALLERIDNUM})
exten => s,3,DBput(CALLLOG/${ARG1}-month=${TIMESTAMP:4:2})
exten => s,4,DBput(CALLLOG/${ARG1}-day=${TIMESTAMP:6:2})
exten => s,5,DBput(CALLLOG/${ARG1}-hour=${TIMESTAMP:9:2})
exten => s,6,DBput(CALLLOG/${ARG1}-minute=${TIMESTAMP:-4:2})
exten => s,7,DBput(CALLLOG/${ARG1}-second=${TIMESTAMP:-2:2})
;play transfer (please hold whilst i try to conenct you)
exten => s,8,Playback(transfer)
; Ring ring, call arg2 (but put caller on a Music on hold processe)
exten => s,9,Dial(${ARG2},25,m)
; If unavailable, send to voicemail w/ unavail announce
exten => s,10,Voicemail(u${ARG1})
exten => s,11,Hangup()

exten => s,102,Voicemail(b${ARG1}) ; If busy, send to voicemail w/ busy announce
exten => s,103,Hangup()

;this adds the callid stuff to EVERYONES extension
exten => s,30,DBput(CALLLOG/6001=${CALLERIDNUM})
exten => s,31,DBput(CALLLOG/6001-month=${TIMESTAMP:4:2})
exten => s,32,DBput(CALLLOG/6001-day=${TIMESTAMP:6:2})
exten => s,33,DBput(CALLLOG/6001-hour=${TIMESTAMP:9:2})
exten => s,34,DBput(CALLLOG/6001-minute=${TIMESTAMP:-4:2})
exten => s,35,DBput(CALLLOG/6001-second=${TIMESTAMP:-2:2})
exten => s,36,DBput(CALLLOG/6002=${CALLERIDNUM})
exten => s,37,DBput(CALLLOG/6002-month=${TIMESTAMP:4:2})
exten => s,38,DBput(CALLLOG/6002-day=${TIMESTAMP:6:2})
exten => s,39,DBput(CALLLOG/6002-hour=${TIMESTAMP:9:2})
exten => s,40,DBput(CALLLOG/6002-minute=${TIMESTAMP:-4:2})
exten => s,41,DBput(CALLLOG/6002-second=${TIMESTAMP:-2:2})
exten => s,42,DBput(CALLLOG/6003=${CALLERIDNUM})
exten => s,43,DBput(CALLLOG/6003-month=${TIMESTAMP:4:2})
exten => s,44,DBput(CALLLOG/6003-day=${TIMESTAMP:6:2})
exten => s,45,DBput(CALLLOG/6003-hour=${TIMESTAMP:9:2})
exten => s,46,DBput(CALLLOG/6003-minute=${TIMESTAMP:-4:2})
exten => s,47,DBput(CALLLOG/6003-second=${TIMESTAMP:-2:2})
;go to 8
exten => s,48,Goto(8)

Thanks,
Ben


#2

You can use the s option for the Voicemailmain() command to do that.

Something like:

VoiceMailMain(s,${CALLERID})

Will probably do what you want.


#3

Sorry, I’m not clear where this should be added?


#4

You need to add to here :-

[voicemail]
;voicemail, speaks for its self really
exten => 86,1,VoiceMailMain(s,${CALLERID})
exten => 86,2,Hangup
exten => 1571,1,VoicemailMain
exten => 1571,2,Hangup


#5

[quote=“Maximo1970”]You need to add to here :-

[voicemail]
;voicemail, speaks for its self really
exten => 86,1,VoiceMailMain(s,${CALLERID})
exten => 86,2,Hangup
exten => 1571,1,VoicemailMain
exten => 1571,2,Hangup[/quote]

Hmmm. I’ve tried that but to no avail. I can see in the trace log that my name and extension number are being passed into the VoiceMailMain method but it’s still asking for a mailbox…


#6

Ahhh. Fixed it with:

exten => 86,1,VoiceMailMain(s${CALLERIDNUM})