[asterisk-users] Aastra ignore call button hangs up call instead of going to voicemail

Jeremy Winder jwinder at logicalsi.com
Fri Jul 30 14:40:25 CDT 2010


I have a Asterisk server (PBX in a Flash) with Aastra 57i phones. When
there is an incoming call the phone will display two buttons "answer"
and "ignore". If you press "ignore" the call is dropped instead of sent
to voice mail. The following is the log:

  -- Called 111
  -- SIP/111-00001c14 is ringing
  -- Got SIP response 486 "Busy Here" back from 192.168.3.126
  -- SIP/111-00001c14 is busy
== Everyone is busy/congested at this time (1:1/0/0)
  -- Executing [s at macro-dial:8] Set("DAHDI/10-1", "DIALSTATUS=BUSY") in
new stack
  -- Executing [s at macro-dial:9] GosubIf("DAHDI/10-1", "1?BUSY,1") in new
stack
== Spawn extension (macro-dial, s, 10) exited non-zero on 'DAHDI/10-1'
in macro 'dial'
== Spawn extension (macro-exten-vm, s, 9) exited non-zero on
'DAHDI/10-1' in macro 'exten-vm'
== Spawn extension (from-did-direct, 111, 1) exited non-zero on
'DAHDI/10-1'
    -- Hungup 'DAHDI/10-1'

The extensions.conf file has this macro-dial in it:

; Rings one or more extensions.  Handles things like call forwarding and
DND
; We don't call dial directly for anything internal anymore.
; ARGS: $TIMER, $OPTIONS, $EXT1, $EXT2, $EXT3, ...
; Use a Macro call such as the following:
;  Macro(dial,$DIAL_TIMER,$DIAL_OPTIONS,$EXT1,$EXT2,$EXT3,...)
[macro-dial]
exten => s,1,GotoIf($["${MOHCLASS}" = ""]?dial)
exten => s,n,SetMusicOnHold(${MOHCLASS})
exten => s,n(dial),AGI(dialparties.agi)
exten => s,n,NoOp(Returned from dialparties with no extensions to call
and DIALSTATUS: ${DIALSTATUS})

exten => s,n+2(normdial),Dial(${ds})                               ;
dialparties will set the priority to 10 if $ds is not null
exten => s,n,Set(DIALSTATUS=${IF($["${DIALSTATUS_CW}"!
="" ]?${DIALSTATUS_CW}:${DIALSTATUS})})
exten => s,n,GosubIf($["${SCREEN}" != ""]?${DIALSTATUS},1)

exten => s,20(huntdial),NoOp(Returned from dialparties with hunt groups
to dial )
exten => s,n,Set(HuntLoop=0)
exten => s,n(a22),GotoIf($[${HuntMembers} >= 1]?a30)  ; if this is from
rg-group, don't strip prefix
exten => s,n,NoOp(Returning there are no members left in the hunt group
to ring)

; dialparties.agi has setup the dialstring for each hunt member in a
variable labeled HuntMember0, HuntMember1 etc for each iteration
; and The total number in HuntMembers. So for each iteration, we will
update the CALLTRACE Data.
;
exten => s,n+2(a30),Set(HuntMember=HuntMember${HuntLoop})
exten => s,n,GotoIf($[$["${CALLTRACE_HUNT}" != "" ] &
$[$["${RingGroupMethod}" = "hunt" ] | $["${RingGroupMethod}" =
"firstavailable"] | $["${RingGroupMethod}" =
"firstnotonphone"]]]?a32:a35)

exten => s,n(a32),Set(CT_EXTEN=${CUT(FILTERED_DIAL,,$[${HuntLoop} +
1])})
exten => s,n,Set(DB(CALLTRACE/${CT_EXTEN})=${CALLTRACE_HUNT})
exten => s,n,Goto(s,a42)

;Set Call Trace for each hunt member we are going to call "Memory groups
have multiple members to set CALL TRACE For" hence the loop
;
exten => s,n(a35),GotoIf($[$["${CALLTRACE_HUNT}" != "" ] &
$["${RingGroupMethod}" = "memoryhunt" ]]?a36:a50)
exten => s,n(a36),Set(CTLoop=0)
exten => s,n(a37),GotoIf($[${CTLoop} > ${HuntLoop}]?a42)  ; if this is
from rg-group, don't strip prefix
exten => s,n,Set(CT_EXTEN=${CUT(FILTERED_DIAL,,$[${CTLoop} + 1])})
exten => s,n,Set(DB(CALLTRACE/${CT_EXTEN})=${CALLTRACE_HUNT})
exten => s,n,Set(CTLoop=$[1 + ${CTLoop}])
exten => s,n,Goto(s,a37)

exten => s,n(a42),Dial(${${HuntMember}}${ds})
exten => s,n,Set(HuntLoop=$[1 + ${HuntLoop}])
exten => s,n,GotoIf($[$[$["foo${RingGroupMethod}" !=
"foofirstavailable"] & $["foo${RingGroupMethod}" !=
"foofirstnotonphone"]] | $["foo${DialStatus}" = "fooBUSY"]]?a46)
exten => s,n,Set(HuntMembers=0)
exten => s,n(a46),Set(HuntMembers=$[${HuntMembers} - 1])
exten => s,n,Goto(s,a22)

exten => s,n(a50),DBdel(CALLTRACE/${CT_EXTEN})
exten => s,n,Goto(s,a42)

; For call screening
exten => NOANSWER,1,Macro(vm,${SCREEN_EXTEN},BUSY,${IVR_RETVM})
exten => NOANSWER,n,GotoIf($["${IVR_RETVM}" != "RETURN" |
"${IVR_CONTEXT}" = ""]?bye)
exten => NOANSWER,n,Return
exten => NOANSWER,n(bye),Macro(hangupcall)
exten => TORTURE,1,Goto(app-blackhole,musiconhold,1)
exten => TORTURE,n,Macro(hangupcall)
exten => DONTCALL,1,Answer
exten => DONTCALL,n,Wait(1)
exten => DONTCALL,n,Zapateller()
exten => DONTCALL,n,Playback(ss-noservice)
exten => DONTCALL,n,Macro(hangupcall)

; make sure hungup calls go here so that proper cleanup occurs from call
confirmed calls and the like
;
exten => h,1,Macro(hangupcall)

Which unfortunately doesn't make much sense to me. I do see a
macro-exten-vm with a comment that it is where the call should be routed
is the extension is busy or doesn't answer. But I'm not sure how to
modify the macro-dial to make it happen.

I appreciate any help that anyone can give thanks in advance,

Jeremy




More information about the asterisk-users mailing list