Managing extensions and sending to vmail by default

Hi,
I’m trying to manage an existing asterisk installation on fedora25 as a novice. The problem I’m having is that when people dial the general mailbox, it rings at my desk briefly, then immediately goes to voicemail, leaving me without the ability to answer.

The default operation is to be put through to the general mailbox if an extension or contact isn’t selected. When a choice is not made, the IVR transfers the caller to the general mailbox. When this happens, the general mailbox rings once at my desk, then the IVR reports “that extension is busy” and sends the caller directly to voicemail.

Is it generally accepted that the caller is sent to a general mailbox extension by default? Or do they typically require a selection be made?

I hoped someone could look through my extensions.conf and provide some feedback on how to require a user enter an extension or selection, then otherwise hang up on the caller?

I’ve tried to redirect the default mailbox (7000) to my desk phone (7003), and believe I may have done it incorrectly. This may be where the problem is.

The phones are IP-450 (there are two physical phones) running on asterisk-13.9.1 on fedora25.

[general]
static		= yes
writeprotect	= no
[globals]
VOICEPULSE_TRUNK01	= voicepulse-primary
VOICEPULSE_TRUNK02	= voicepulse-secondary
[macro-stdexten]
exten		=> s,1,Dial(${ARG1},20,tr)
exten		=> s,2,Goto(s-${DIALSTATUS},1)
exten		=> s-NOANSWER,1,Voicemail(${ARG2}@local,u)	; No answer.
exten		=> s-NOANSWER,2,Hangup
exten		=> s-BUSY,1,Voicemail(${ARG2}@local,b)		; Phone busy.
exten		=> s-BUSY,2,Hangup
exten		=> _s-.,1,Playback(invalid)		; Channel unavailable.
exten		=> _s-.,2,Goto(incoming,_1NXXNXXXXXX,4)
[macro-shitlist]
exten		=> s,1,Answer
exten		=> s,2,Congestion
exten		=> s,3,Hangup
[local]
exten		=>  7000,1,Macro(stdexten,SIP/7003,7003)
exten		=>  7003,1,Macro(stdexten,SIP/7003,7003)
exten		=>  7004,1,Macro(stdexten,SIP/7004,7004)
exten		=>  8000,1,Goto(incoming,s,1)
exten		=> _8XXX,1,Playback(invalid)
exten		=> _8XXX,2,Goto(incoming,s,1)
exten		=> _9XXX,1,Playback(invalid)
exten		=> _9XXX,2,Goto(incoming,s,1)
exten		=> *86,1,Answer	
exten		=> *86,2,Wait(.5)
exten		=> *86,3,VoicemailMain(@local)
exten		=> *86,4,Hangup
exten		=> *87,1,Answer	
exten		=> *87,2,Wait(.5)
exten		=> *87,3,VoicemailMain(${CALLERID(num)}@local)
exten		=> *87,4,Hangup
exten		=> 9,1,Set(CALLERID(all)=9 - ${CALLERID(name)} <${CALLERID(num)}>)
exten		=> 9,2,Directory(local)
exten		=> 9,3,Hangup
exten		=> h,1,Hangup
exten		=> i,1,Hangup
exten		=> t,1,Hangup
[macro-intercom]
exten		=> s,1,ChanIsAvail(${ARG1},js)
exten		=> s,2,SIPAddHeader(Alert-Info: Ring Answer)
exten		=> s,3,Dial(${ARG1},,)
exten		=> s,4,Hangup
exten		=> t,1,Hangup
exten		=> T,1,Hangup
[intercom]
exten		=> _X.,1,Macro(intercom,SIP/${EXTEN}) 
[testing]
exten		=> 200,1,Goto(mainmenu-day,_1NXXNXXXXXX,1)
exten		=> 201,1,Goto(mainmenu-night,_1NXXNXXXXXX,1)
exten		=> 202,1,Goto(incoming,_1NXXNXXXXXX,1)
exten		=> 203,1,MusicOnHold()
exten		=> 300,1,Answer
exten		=> 300,2,Ringing
exten		=> 300,3,Wait(1)
exten		=> 300,4,Echo
exten		=> 300,5,Hangup
exten		=> 1102,1,Answer
exten		=> 1102,2,Ringing
exten		=> 1102,3,Wait(3)
exten		=> 1102,4,Milliwatt()
exten		=> 1102,5,Hangup
exten		=> 31337,1,ChanSpy(SIP,q)
exten		=> 31337,2,Hangup
[mainmenu-day]
exten		=> _1NXXNXXXXXX,1,Answer
exten		=> _1NXXNXXXXXX,2,Ringing
exten		=> _1NXXNXXXXXX,3,Wait(3)
exten		=> _1NXXNXXXXXX,4,Set(TIMEOUT(digit)=2)
exten		=> _1NXXNXXXXXX,5,Background(local-mainmenu-day)
exten		=> _1NXXNXXXXXX,6,Set(CALLERID(all)=0 - ${CALLERID(name)} <${CALLERID(num)}>)
exten		=> _1NXXNXXXXXX,7,Queue(operator,t,,,1)
exten		=> _1NXXNXXXXXX,8,Voicemail(7000@local,b)
exten		=> _1NXXNXXXXXX,9,Hangup
exten		=> _1NXXNXXXXXX,109,Hangup
exten		=>   2,1,Set(CALLERID(all)=2 - ${CALLERID(name)} <${CALLERID(num)}>)
exten		=>   2,2,Queue(sales,t,,,1)
exten		=>   2,3,Voicemail(7000@local,b)
exten		=>   2,4,Hangup
exten		=>   2,104,Hangup
exten		=>   3,1,Set(CALLERID(all)=3 - ${CALLERID(name)} <${CALLERID(num)}>)
exten		=>   3,2,Queue(custservice,t,,,1)
exten		=>   3,3,Voicemail(7000@local,b)
exten		=>   3,4,Hangup
exten		=>   3,104,Hangup
exten		=>   4,1,Set(CALLERID(all)=4 - ${CALLERID(name)} <${CALLERID(num)}>)
exten		=>   4,2,Queue(support,t,,,1)
exten		=>   4,3,Voicemail(7000@local,b)
exten		=>   4,4,Hangup
exten		=>   4,104,Hangup
exten		=>   5,1,Set(CALLERID(all)=5 - ${CALLERID(name)} <${CALLERID(num)}>)
exten		=>   5,2,Queue(noc,t,,,1)
exten		=>   5,3,Voicemail(7000@local,b)
exten		=>   5,4,Hangup
exten		=>   5,104,Hangup
exten		=>   6,1,Goto(incoming,s,1)
exten		=>   9,1,Set(CALLERID(all)=9 - ${CALLERID(name)} <${CALLERID(num)}>)
exten		=>   9,2,Directory(local)
exten		=>   9,3,Hangup
exten		=> *86,1,Goto(local,*86,1)
exten		=>  _X,1,Playback(invalid)
exten		=>  _X,2,Goto(incoming,s,1)
exten		=> h,1,Hangup
exten		=> i,1,Hangup
exten		=> t,1,Hangup
[mainmenu-night]
exten		=> _1NXXNXXXXXX,1,Answer
exten		=> _1NXXNXXXXXX,2,Ringing
exten		=> _1NXXNXXXXXX,3,Wait(3)
exten		=> _1NXXNXXXXXX,4,Set(TIMEOUT(digit)=2)
exten		=> _1NXXNXXXXXX,5,Background(local-mainmenu-night)
exten		=> _1NXXNXXXXXX,6,Wait(1)
exten		=> _1NXXNXXXXXX,7,Ringing
exten		=> _1NXXNXXXXXX,8,Wait(2)
exten		=> _1NXXNXXXXXX,9,Voicemail(7000@local,u)
exten		=> _1NXXNXXXXXX,10,Hangup
exten		=>   1,1,Goto(enterprise-support-auth,s,1)
exten		=>   9,1,Set(CALLERID(all)=9 - ${CALLERID(name)} <${CALLERID(num)}>)
exten		=>   9,2,Directory(local)
exten		=>   9,3,Hangup
exten		=> *86,1,Goto(local,*86,1)
exten		=>  _X,1,Playback(invalid)
exten		=>  _X,1,Goto(incoming,s,1)
exten		=>  _X,2,Goto(incoming,s,1)
exten		=> h,1,Hangup
exten		=> i,1,Hangup
exten		=> t,1,Hangup
[incoming]
include		=> local
include		=> mainmenu-night,00:00-23:59,thu,01,jan	; New Years Day		2009
include		=> mainmenu-night,00:00-23:59,mon,25,may	; Memorial Day
include		=> mainmenu-night,00:00-23:59,fri,03,jul	; Independence Day
include		=> mainmenu-night,00:00-23:59,mon,07,sep	; Labor Day
include		=> mainmenu-night,00:00-23:59,thu,26,nov	; Thanksgiving Day
include		=> mainmenu-night,00:00-23:59,fri,25,dec	; Christmas Day		2009
include		=> mainmenu-night,00:00-23:59,fri,01,jan	; New Years Day		2010
include		=> mainmenu-day,09:00-18:00,mon-fri
include		=> mainmenu-night
exten		=> s,1,NoOp(CALLERID = ${CALLERID(name)} - ${CALLERID(num)})
exten		=> s,2,Goto(incoming,_1NXXNXXXXXX,1)
exten		=> h,1,Hangup
exten		=> i,1,Hangup
exten		=> t,1,Hangup
[incoming-sales]
exten		=> s,1,NoOp(CALLERID = ${CALLERID(name)} - ${CALLERID(num)})
exten		=> s,2,Macro(stdexten,SIP/7004,7004)
exten		=> s,2,Goto(incoming,_1NXXNXXXXXX,1)
exten		=> s,3,Goto(incoming,_1NXXNXXXXXX,1)
exten		=> s,4,Hangup
[outgoing]
exten		=> h,1,Hangup
exten		=> i,1,Hangup
exten		=> t,1,Hangup
exten	=> _81NXXNXXXXXX,1,Set(CALLFILENAME=${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)}-${EXTEN}-${CALLERIDNUM}-${EXTEN:1})
exten	=> _81NXXNXXXXXX,2,Monitor(wav,${CALLFILENAME},m)
exten	=> _81NXXNXXXXXX,3,Goto(outgoing,${EXTEN:1},1);
exten	=> _91NXXNXXXXXX,1,AGI(make-outgoing.agi,${CALLERID(num)},${EXTEN})
exten	=> _91NXXNXXXXXX,2,Set(CALLERID(all)=)
exten	=> _91NXXNXXXXXX,3,Goto(outgoing,_1NXXNXXXXXX,3);
exten	=> _1NXXNXXXXXX,1,AGI(make-outgoing.agi,${CALLERID(num)},${EXTEN})
exten	=> _1NXXNXXXXXX,2,Set(CALLERID(all)=12015557300)
exten	=> _1NXXNXXXXXX,3,NoOp([outgoing] STARTING -- ${STRFTIME(${EPOCH},,%m/%d/%Y - %H:%M:%S)})
exten	=> _1NXXNXXXXXX,4,Dial(DAHDI/${CHANNEL_OV}/${DIAL_OV})
exten	=> _1NXXNXXXXXX,7,Congestion
exten	=> _011.,1,Set(CALLERID(all)=12015557300)
exten	=> _011.,4,Congestion
[enterprise-support-auth]
exten		=> s,1,Authenticate(/etc/asterisk/enterprise-customers.txt,a)
exten		=> s,2,Goto(enterprise-support,s,1)
exten		=> s,3,Hangup
exten		=> i,1,Hangup
exten		=> h,1,Hangup
exten		=> t,1,Hangup
[enterprise-support]
exten		=> s,1,Voicemail(7999@local,)
exten		=> s,2,Hangup
exten		=> i,1,Hangup
exten		=> h,1,AGI(enterprise-support.agi,1)
exten		=> t,1,Hangup
[enterprise-support-callback]
exten		=> s,1,Background(local-enterprise-support-callback-dial-7999)
exten		=> s,2,Wait(1)
exten		=> s,3,Goto(enterprise-support-callback,s,1)
exten		=> s,4,Hangup
exten		=> i,1,Goto(enterprise-support-callback,s,1)
exten		=> *,1,Goto(local,*86,1)
[trusted]
include		=> local
include		=> outgoing
include		=> parkedcalls
include		=> testing
exten		=> _*7XXX,1,Answer
exten		=> _*7XXX,2,Ringing
exten		=> _*7XXX,3,Wait(3)
exten		=> _*7XXX,4,Voicemail(${EXTEN:1}@local,u)
exten		=> _*7XXX,5,Hangup
exten 		=> 8000,1,Set(TIMEOUT(absolute)=21)
exten		=> 8000,2,AGI(intercom.agi,${CALLERID(num)})
exten 		=> 8000,3,Page(${CANDIDATES}) 
exten		=> h,1,NoOp([trusted] CALL ENDING -- ${STRFTIME(${EPOCH},,%m/%d/%Y - %H:%M:%S)})
[invalid]
exten		=> s,1,Hangup
exten		=> h,1,Hangup
exten		=> i,1,Hangup
exten		=> t,1,Hangup
[network-outage]
exten		=> s,1,AGI(network-outage.agi,1)
exten		=> s,2,Answer
exten		=> s,3,Hangup
exten		=> i,1,Hangup
exten		=> h,1,Hangup
exten		=> t,1,Hangup
[network-outage-callback]
exten		=> s,1,Background(local-network-outage);
exten		=> s,2,Wait(1)
exten		=> s,3,Goto(network-outage-callback,s,1)
exten		=> s,4,Hangup
[default]
exten		=> s,1,Goto(incoming,_1NXXNXXXXXX,1)
exten		=> h,1,Hangup
exten		=> i,1,Hangup
exten		=> t,1,Hangup

You’ve got an exceptionally short timeout on the queue. Unless you use AgentLogin, it is unlikely that the call will be answered before it times out.

If you expect calls from the general public, you should try to sent them to a real person if they struggle with the IVR.

You have no WaitExten, so people need to key in the IVR digit whilst the announcement is still playing. Unless you have a long silence at the end of the announcement, you need to use WiatExten.

1 Like

Hi, thanks for your help. I think it’s more than that. I traced it to where there is indeed no pause between the last option and transferring to the default extension, but it just rings briefly and goes directly to voicemail.

I don’t understand where I would put the WaitExten and what format it would have. This is a sample IVR session with SIP debug enabled. I’ve cut out much of the SIP garbage that I didn’t think was relevant.

So I think I need to add a WaitExten, but I also think I need to let it ring at the extension and not go directly to voicemail.

I also think it’s the [mainmenu-day] section where the WaitExten should be added, although I’m not sure. Somehow where I’ve added it currently, it causes the call to just drop entirely after the transfer.

 == Manager 'dave' logged on from 64.1.11.18
  == Manager 'dave' logged off from 64.1.11.18
    -- Starting simple switch on 'DAHDI/1-1' 
    -- Executing [s@incoming:1] NoOp("DAHDI/1-1", "CALLERID = SAMPLE CALLER - 2015551212") in new stack 
    -- Executing [s@incoming:2] Goto("DAHDI/1-1", "incoming,_1NXXNXXXXXX,1") in new stack
    -- Goto (incoming,_1NXXNXXXXXX,1)
    -- Executing [_1NXXNXXXXXX@incoming:1] Answer("DAHDI/1-1", "") in new stack
    -- Executing [_1NXXNXXXXXX@incoming:2] Ringing("DAHDI/1-1", "") in new stack
    -- Executing [_1NXXNXXXXXX@incoming:3] Wait("DAHDI/1-1", "3") in new stack  
    -- Executing [_1NXXNXXXXXX@incoming:4] Set("DAHDI/1-1", "TIMEOUT(digit)=2") in new stack
    -- Digit timeout set to 2.000
    -- Executing [_1NXXNXXXXXX@incoming:5] BackGround("DAHDI/1-1", "local-mainmenu-day") in new stack
    -- <DAHDI/1-1> Playing 'local-mainmenu-day.slin' (language 'en')
    -- Executing [_1NXXNXXXXXX@incoming:6] Set("DAHDI/1-1", "CALLERID(all)=0 - SAMPLE CALLER <2015551212>") in new stack
    -- Executing [_1NXXNXXXXXX@incoming:7] Queue("DAHDI/1-1", "operator,t,,,1") in new stack
    -- Started music on hold, class 'default', on channel 'DAHDI/1-1'
Scheduling destruction of SIP dialog '47deacc9793e5a556dc80a3155cc4728@192.168.1.1:5060' in 6400 ms (Method: INVITE)
    -- Stopped music on hold on DAHDI/1-1
    -- Executing [_1NXXNXXXXXX@incoming:8] WaitExten("DAHDI/1-1", "3") in new stack
Scheduling destruction of SIP dialog '47deacc9793e5a556dc80a3155cc4728@192.168.1.1:5060' in 6400 ms (Method: INVITE)
    -- Timeout on DAHDI/1-1, continuing...
    -- Executing [_1NXXNXXXXXX@incoming:9] Hangup("DAHDI/1-1", "") in new stack
  == Spawn extension (incoming, _1NXXNXXXXXX, 9) exited non-zero on 'DAHDI/1-1'
    -- Executing [h@incoming:1] Hangup("DAHDI/1-1", "") in new stack
  == Spawn extension (incoming, h, 1) exited non-zero on 'DAHDI/1-1'
    -- Hanging up on 'DAHDI/1-1'
    -- Hungup 'DAHDI/1-1'
Really destroying SIP dialog '47deacc9793e5a556dc80a3155cc4728@192.168.1.1:5060' Method: INVITE



https://wiki.asterisk.org/wiki/display/AST/Background+and+WaitExten+Applications

It’s ringing briefly because you are sending it to the operator queue for 1 second, and you are, presumably configured as an agent on that queue.

2 Likes

Hi, yes, I am in the operator queue.

If I move the WaitExten up after Background, there is then a pause after the IVR finishes. If I increase the queue timeout to 10 instead of 1, it does then ring a few times before then reporting “the person at extension 7000 is on the phone”, then immediately goes to voicemail.

Is this because there is no default voicemail greeting?

And the phone was ringing at my desk - there was no one on the phone.

Ideas greatly appreciated.

It says 7000 because that is what you have configured.

1 Like

Okay, thank you. I’ve changed it to 7003, but it still just then rings 7003 and says “on the phone” instead of playing the voicemail prompts for that extension.

How do I configure it to go to the general voicemail box and use the general recording there?

https://wiki.asterisk.org/wiki/display/AST/Application_VoiceMail

There is no default mailbox, although you can suppress the annoucements.

1 Like

Hi, that is helpful. I’ve changed it to “unavailable”, but it still doesn’t play the voicemail greeting.

I need to:

  • change the default number of rings or length of timeout before actually going to voicemail
  • play the voicemail greeting at the extension instead of the default “unavailable” message

Is that possible?

  1. is the number in the last parameter of Queue.

  2. there is a “the voicemail greeting”. Each mailbox has its own. Have you recorded one for the mailbox you are currently specifying?

2 Likes