Ok so I have a SIP station… that starts in context [GUEST]… the context is shown below…
[guests]
include = voicemail
include = emergency
include = operator
include = local_7_digit
include = toll_free
include = north_america_ld
include = international
include = wakeups
include = roomtoroom
exten => h,1,NoOp("Guest User Hung up")
exten => h,2,NoOp(${CDR(src)})
exten => h,3,NoOp(${CDR(billsec)})
exten => h,4,NoOp(${CDR(dst)})
exten => h,5,NoOp(${CDR(disposition)})
exten => h,6,NoOp(${CDR(start)})
exten => h,7,NoOp(${CDR(end)})
lets take for instance this user dials 9+555+1111. the include for local-7-digit calls will take over
it is shown below…
[local_7_digit]
exten =_9XXXXXXX,1,Macro(normal-dialout,${T1}/001614${EXTEN:1},,loc
if a match is made (which the above number will match) it calls the macro normal-dialout
the macro will try the main trunk… if its busy or unavailable it will try another… otherwise it will return congestion if all trunks are unavailable… if a trunk is grabbed the call will complete… once the call disconnects the h extension in the macro should be called…
what I find is that if the call comes back congestion or unavailable within the Macro the h extension in the macro is not called but instead the h extension in the original context is called… i thought once a macro was entered the macro needed its own h extension… otherwise if it is a call without a macro then the h extension of the originating context was called at disconnect… so im a little lost here trying to figure out what h extension to be called…
shouldnt the ‘Hangup’ command after the congestion or chanunavail trigger a call to the h extension within this macro?
below is part of the macro that deals with the dialout…
exten = s,n(allowed),set(CALLERID(num)=${GLOBAL_OUTBOUNDCID})
exten = s,n,Goto(1-dial,1)
exten = 1-dial,1,Dial(${ARG1})
exten = 1-dial,n,Gotoif(${LEN(${ARG2})} > 0 ?1-${DIALSTATUS},1:1-out,1)
exten = 1-CHANUNAVAIL,1,Dial(${ARG2})
exten = 1-CHANUNAVAIL,n,Hangup()
exten = 1-CONGESTION,1,Dial(${ARG2})
exten = 1-CONGESTION,n,Hangup()
exten = 1-out,1,Hangup()
exten = h,1,NoOp("Trunk User Hung up")
exten = h,2,NoOp(${CDR(src)})
exten = h,3,NoOp(${CDR(billsec)})
exten = h,4,NoOp(${CDR(dst)})
exten = h,5,NoOp(${CDR(disposition)})
exten = h,6,NoOp(${CDR(start)})
exten = h,7,NoOp(${CDR(end)})
exten = h,8,AGI(smdr.php,${CDR(src)},${CDR(duration)},${CDR(billsec)},${CDR(dst
-Christopher