problem with voicemail configuration

new_ast1971
Joined: Sat 19 of Nov, 2011

problem with voicemail configuration

Posted:Sat 19 of Nov, 2011 (04:44 UTC)
Hello,

I am facing problem with my Asterisk configuration for Voicemail. My Asterisk version is 1.6.2.20 installed on CentOS 5.6

There are 4 incoming PSTN lines configured using Sangoma A200 4 Port Analog Card and 4 FXS Port configured using external Audio Codes Gateway MP112 - 2 Nos. We are running an IVR script from which the caller gets transferred to the logged in Agents. There are two branches in the script and for each branch there are two Agents. Tranfering to agent from the IVR AGI script is achieved by following statement:
$AGI->exec('Playback','../prompts/calltransfer');
$AGI-> exec('Wait','1');
$AGI-> exec ('Queue','itsupport'); ---------- This is for IT Support and Similarly for other branch.
Now the transfer happens properly to the two Agents who have logged into the itsupport queue. I have configured Voicemail if the agents are busy or no answer but what i observerd and for which I need the help is that when the third caller is on the music on hold he remains there after 30 seconds which is the timeout period mentioned in my queues.conf and no voicemail is initiated. If i have one Agent logged in and other logged off then, if the agent one is busy or he doesn't pick up the phone the caller is taken to Voicemail where he drops his /her voicemail.

My extension.conf is as mentioned below:

extensions.conf

#include extensions_custom.conf
[default]
include => from-pstn
include => Queues      ; allow phones to call queues
;include => QueueMemberFunctions
include => subSetupAvailableQueues
include => ACD

[Queues]
exten => 7001,1,Verbose(2,${CALLERID(NUMBER)},Joining the itsupport queue for a maximum of 2 minutes)
   same => n,Queue(itsupport,n,,,)
   same => n,VoiceMail(itsupport@default,u,b,g(4))
   same => n,Hangup()

exten => 7002,1,Verbose(2,${CALLERID(NUMBER)},Joining the gensupport queue for a maximum of 2 minutes)
   same => n,Queue(admin,n,,,)
   same => n,VoiceMail(admin@default,u,b,g(4))
   same => n,Hangup()

[LocalSets]
include => Queues      ; allow phones to call queues

[QueueMemberFunctions]

exten => *54,1,Verbose(2,Logging In Queue Member)
   same => n,Set(MemberChannel=${CHANNEL(channeltype)}/${CHANNEL(peername)})
   same => n,AddQueueMember(itsupport,${MemberChannel})

; ${AQMSTATUS}
;   ADDED
;   MEMBERALREADY
;   NOSUCHQUEUE

exten => *56,1,Verbose(2,Logging Out Queue Member)
   same => n,Set(MemberChannel=${CHANNEL(channeltype)}/${CHANNEL(peername)})
   same => n,RemoveQueueMember(itsupport,${MemberChannel})

; ${RQMSTATUS}:
;    REMOVED
;    NOTINQUEUE
;    NOSUCHQUEUE

exten => *72,1,Verbose(2,Pause Queue Member)
   same => n,Set(MemberChannel=${CHANNEL(channeltype)}/${CHANNEL(peername)})
   same => n,PauseQueueMember(itsupport,${MemberChannel})

; ${PQMSTATUS}:
;     PAUSED
;     NOTFOUND

exten => *87,1,Verbose(2,Unpause Queue Member)
   same => n,Set(MemberChannel=${CHANNEL(channeltype)}/${CHANNEL(peername)})
   same => n,UnpauseQueueMember(itsupport,${MemberChannel})

; ${UPQMSTATUS}:
;     UNPAUSED
;     NOTFOUND


[subSetupAvailableQueues]
;
; This subroutine is used by the various login/logout/pausing/unpausing routines
; in the [ACD] context. The purpose of the subroutine is centralize the retrieval 
; of information easier.
;
exten => start,1,Verbose(2,Checking for available queues)

; Get the current channel's peer name (SIP/1001)
   same => n,Set(MemberChannel=${CHANNEL(peername)})

; Get the current channel's technology type (SIP, IAX, etc)
   same => n,Set(MemberChanType=${CHANNEL(channeltype)})    

; Get the list of queues available for this agent
   same => n,Set(AvailableQueues=${DB(queue_agent/${MemberChannel}/available_queues)})
; *** This should all be on a single line

; if there are no queues assigned to this agent we'll handle it in the 
; no_queues_available extension
   same => n,GotoIf($[${ISNULL(${AvailableQueues})}]?no_queues_available,1)
                                       
   same => n,Return()

exten => no_queues_available,1,Verbose(2,No queues available for agent ${MemberChannel})
; *** This should all be on a single line

; playback a message stating the channel has not yet been assigned
   same => n,Playback(silence/1&channel&not-yet-assigned)  
   same => n,Hangup()

[ACD]
;
; Used for logging agents into all configured queues per the AstDB
;
;
; Logging into multiple queues via the AstDB system
exten => *54,1,Verbose(2,Logging into multiple queues per the database values)

; get the available queues for this channel
   same => n,GoSub(subSetupAvailableQueues,start,1())  
   same => n,Set(QueueCounter=1)  ; setup a counter variable

; using CUT(), get the first listed queue returned from the AstDB
   same => n,Set(WorkingQueue=${CUT(AvailableQueues,^,${QueueCounter})})

; While the WorkingQueue channel variable contains a value, loop
   same => n,While($[${EXISTS(${WorkingQueue})}])

; AddQueueMember(queuename[,interface[,penalty[,options[,membername
;  [,stateinterface]]]]])
; Add the channel to a queue, setting the interface for calling 
; and the interface for monitoring of device state
;
; *** This should all be on a single line
   same => n,AddQueueMember(${WorkingQueue},${MemberChanType}/${MemberChannel},,,MemberChanType}/${MemberChannel})


   same => n,Set(QueueCounter=$[${QueueCounter} + 1])    ; increase our counter

; get the next available queue; if it is null our loop will end
   same => n,Set(WorkingQueue=${CUT(AvailableQueues,^,${QueueCounter})})

   same => n,EndWhile()

; let the agent know they were logged in okay
   same => n,Playback(silence/1&agent-loginok)
   same => n,Hangup()

exten => no_queues_available,1,Verbose(2,No queues available for ${MemberChannel})
   same => n,Playback(silence/1&channel&not-yet-assigned)
   same => n,Hangup()

; -------------------------

; Used for logging agents out of all configured queues per the AstDB
exten => *56,1,Verbose(2,Logging out of multiple queues)

; Because we reused some code, we've placed the duplicate code into a subroutine
   same => n,GoSub(subSetupAvailableQueues,start,1())   
   same => n,Set(QueueCounter=1)
   same => n,Set(WorkingQueue=${CUT(AvailableQueues,^,${QueueCounter})})
   same => n,While($[${EXISTS(${WorkingQueue})}])
   same => n,RemoveQueueMember(${WorkingQueue},${MemberChanType}/${MemberChannel})
   same => n,Set(QueueCounter=$[${QueueCounter} + 1])
   same => n,Set(WorkingQueue=${CUT(AvailableQueues,^,${QueueCounter})})
   same => n,EndWhile()
   same => n,Playback(silence/1&agent-loggedoff)
   same => n,Hangup()

; -------------------------

; Used for pausing agents in all available queues
exten => *72,1,Verbose(2,Pausing member in all queues)
   same => n,GoSub(subSetupAvailableQueues,start,1())

   ; if we don't define a queue, the member is paused in all queues
   same => n,PauseQueueMember(,${MemberChanType}/${MemberChannel})
   same => n,GotoIf($[${PQMSTATUS} = PAUSED]?agent_paused,1:agent_not_found,1)

exten => agent_paused,1,Verbose(2,Agent paused successfully)
   same => n,Playback(silence/1&unavailable)
   same => n,Hangup()

; -------------------------

; Used for unpausing agents in all available queues
exten => *87,1,Verbose(2,UnPausing member in all queues)
   same => n,GoSub(subSetupAvailableQueues,start,1())

   ; if we don't define a queue, then the member is unpaused from all queues
   same => n,UnPauseQueueMember(,${MemberChanType}/${MemberChannel})
   same => n,GotoIf($[${UPQMSTATUS} = UNPAUSED]?agent_unpaused,1:agent_not_found,1)

exten => agent_unpaused,1,Verbose(2,Agent paused successfully)
   same => n,Playback(silence/1&available)
   same => n,Hangup()

; -------------------------

; Used by both pausing and unpausing dialplan functionality
exten => agent_not_found,1,Verbose(2,Agent was not found)
   same => n,Playback(silence/1&cannot-complete-as-dialed)
----------------------------------------------------------------------------------------------------------------
-------------------
Queues.conf

[general]
autofill=yes             ; distribute all waiting callers to available members
shared_lastcall=yes      ; respect the wrapup time for members logged into more 
                         ; than one queue
persistentmembers=yes
updatecdr=yes
timeout = 30
;retry = 1

;announce-frequency = 0
announce-holdtime = no


[StandardQueue](!)       ; template to provide common features
music       ; play [default] music
;music = default
strategy=rrmemory        ; use the Round Robin Memory strategy
joinempty=no             ; do not join the queue when no members available
leavewhenempty=yes        ; leave the queue when no members available
ringinuse=no             ; don't ring members when already InUse (prevents 
                         ; multiple calls to an agent)

maxlen=8
timeout=30

monitor-type = MixMonitor
monitor-format = wav49

wrapuptime=10		; number of secs we want the agent not to recieve next call for 
                        ;completing his previous call work
;maxlen = 8		; maximum callers in the queue
eventwhencalled => vars

; -------- Announcement Control --------
;announce-frequency=30           ; announces caller's hold time and position every 30
                                ; seconds
;min-announce-frequency=30       ; minimum amount of time that must pass before the
                                ; caller's position is announced 
;periodic-announce-frequency=45  ; defines how often to play a periodic announcement to
                                ; caller
;random-periodic-announce=no     ; defines whether to play periodic announcements in 
                                ; a random order, or serially
;relative-periodic-announce=yes  ; defines whether the timer starts at the end of
                                ; file playback (yes) or the beginning (no)
;announce-holdtime=once          ; defines whether the estimated hold time should be 
                                ; played along with the periodic announcement
;announce-position=limit         ; defines if we should announce the caller's position
                                ; in the queue
;announce-position-limit=10      ; defines the limit value where we announce the
                                ; caller's position (when announce-position is set to 
                                ; limit or more)
;announce-round-seconds=30       ; rounds the hold time announcement to the nearest 
                                ; 30-second value


[admin](StandardQueue)   ; create the sales queue using the parameters in the
                              ; StandardQueue template

[itsupport](StandardQueue) ; create the support queue using the parameters in the
                         ; StandardQueue template