Voicemail busy o not

hello forum, I have a asterisk server and my extensions sip they are of 3 digits, I want is that when a person this busy one and another extension calls him that it jumps to the voice mailbox and that he says that the extension this busy one or to the telephone leaves its message and when not this speaking that a message comes out of not available…

I have inside the dialplan this configuration, if this busy one or not this busy one always comes out not this available one

exten => _XXX,1,Voicemail(u${EXTEN})
exten => _XXX,n,Hangup

exten => _XXX,1,Voicemail(b${EXTEN})
exten => _XXX,n,Hangup




something like this?

exten=> _XXX,1,Dial(SIP/${EXTEN})
exten=> _XXX,n,ExecIF($["${DIALSTATUS}"=“BUSY”],Voicemail,${EXTEN},b)
exten=> _XXX,n,ExecIF($["${DIALSTATUS}"!=“BUSY”],Voicemail,${EXTEN},u)
exten => _XXX,n,Hangup

Hi friend …

my problem is that my extensions sip is of openser , all my extensions are of three digits, what I want to be able to make is that when an extension this speaking plays the message of busy, but generally alone not plays available

inside my openser I have a route that detects that if the prefix comes with the, it is not available and if it is B, it is busy, generally if an extension this speaking the one has to play this busy one, but the one not plays available

my context is


exten => _b.,1,Voicemail(${EXTEN})
exten => _b.,2,hangup()

exten => _u.,1,Voicemail(${EXTEN})
exten => _u.,n,Hangup()

which the best form is of making it?


-- Executing [u119@netsoluciones:1] VoiceMail("SIP/", "u119") in new stack
-- <SIP/> Playing 'vm-theperson' (language 'es')
-- <SIP/> Playing 'digits/1' (language 'es')
-- <SIP/> Playing 'digits/1' (language 'es')
-- <SIP/> Playing 'digits/9' (language 'es')
-- <SIP/> Playing 'vm-isunavail' (language 'es')

I think you want something like this.


exten => _b.,1,Voicemail(${EXTEN:1},b)
exten => _b.,n,Hangup()

exten => _u.,1,Voicemail(${EXTEN:1},u)
exten => _u.,n,Hangup() [/code]

ok, work fine