Caller Initiated Blind Transfer Don't Disconnect

The below output is from a call I placed from an extension to an outside number. I then blind transferred the call the parking lot. After the parking lot announces the number I received the all circuits are busy message. It should have just hung up. This happens for both attended or blind transfers to any extension for calls dialed. If I receive a call the attended and blind transfers work as expected. I am using Asterisk 1.6.1.4 and FreePBX 2.6.0.1. I have tested Asterisk 1.6.1.14 with the same result.

== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Executing [[email protected]:1] Macro(“SIP/8678-04c994b8”, “user-callerid,SKIPTTL,”) in new stack
– Executing [[email protected]:1] Set(“SIP/8678-04c994b8”, “AMPUSER=8678”) in new stack
– Executing [[email protected]:2] GotoIf(“SIP/8678-04c994b8”, “0?report”) in new stack
– Executing [[email protected]:3] ExecIf(“SIP/8678-04c994b8”, “1?Set(REALCALLERIDNUM=8678)”) in new stack
– Executing [[email protected]:4] Set(“SIP/8678-04c994b8”, “AMPUSER=8678”) in new stack
– Executing [[email protected]:5] Set(“SIP/8678-04c994b8”, “AMPUSERCIDNAME=Ryan”) in new stack
– Executing [[email protected]:6] GotoIf(“SIP/8678-04c994b8”, “0?report”) in new stack
– Executing [[email protected]:7] Set(“SIP/8678-04c994b8”, “AMPUSERCID=8678”) in new stack
– Executing [[email protected]:8] Set(“SIP/8678-04c994b8”, “CALLERID(all)=“Ryan” <8678>”) in new stack
– Executing [[email protected]:9] GotoIf(“SIP/8678-04c994b8”, “1?continue”) in new stack
– Goto (macro-user-callerid,s,18)
– Executing [[email protected]:18] NoOp(“SIP/8678-04c994b8”, “Using CallerID “Ryan” <8678>”) in new stack
– Executing [[email protected]:2] Set(“SIP/8678-04c994b8”, “_NODEST=”) in new stack
– Executing [[email protected]:3] Macro(“SIP/8678-04c994b8”, “record-enable,8678,OUT,”) in new stack
– Executing [[email protected]:1] GotoIf(“SIP/8678-04c994b8”, “1?check”) in new stack
– Goto (macro-record-enable,s,4)
– Executing [[email protected]:4] AGI(“SIP/8678-04c994b8”, “recordingcheck,20100223-224541,1266983141.17”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck
recordingcheck,20100223-224541,1266983141.17: Outbound recording not enabled
– <SIP/8678-04c994b8>AGI Script recordingcheck completed, returning 0
– Executing [[email protected]:5] MacroExit(“SIP/8678-04c994b8”, “”) in new stack
– Executing [[email protected]:4] Macro(“SIP/8678-04c994b8”, “dialout-trunk,1,7039361212,”) in new stack
– Executing [[email protected]:1] Set(“SIP/8678-04c994b8”, “DIAL_TRUNK=1”) in new stack
– Executing [[email protected]:2] GosubIf(“SIP/8678-04c994b8”, “0?sub-pincheck,s,1”) in new stack
– Executing [[email protected]:3] GotoIf(“SIP/8678-04c994b8”, “0?disabletrunk,1”) in new stack
– Executing [[email protected]:4] Set(“SIP/8678-04c994b8”, “DIAL_NUMBER=7039361212”) in new stack
– Executing [[email protected]:5] Set(“SIP/8678-04c994b8”, “DIAL_TRUNK_OPTIONS=trwTW”) in new stack
– Executing [[email protected]:6] Set(“SIP/8678-04c994b8”, “OUTBOUND_GROUP=OUT_1”) in new stack
– Executing [[email protected]:7] GotoIf(“SIP/8678-04c994b8”, “1?nomax”) in new stack
– Goto (macro-dialout-trunk,s,9)
– Executing [[email protected]:9] GotoIf(“SIP/8678-04c994b8”, “0?skipoutcid”) in new stack
– Executing [[email protected]:10] Set(“SIP/8678-04c994b8”, “DIAL_TRUNK_OPTIONS=twTW”) in new stack
– Executing [[email protected]:11] Macro(“SIP/8678-04c994b8”, “outbound-callerid,1”) in new stack
– Executing [[email protected]:1] ExecIf(“SIP/8678-04c994b8”, “0?Set(CALLERPRES()=)”) in new stack
– Executing [[email protected]:2] ExecIf(“SIP/8678-04c994b8”, “0?Set(REALCALLERIDNUM=8678)”) in new stack
– Executing [[email protected]:3] GotoIf(“SIP/8678-04c994b8”, “1?normcid”) in new stack
– Goto (macro-outbound-callerid,s,6)
– Executing [[email protected]:6] Set(“SIP/8678-04c994b8”, “USEROUTCID=703XXX8678”) in new stack
– Executing [[email protected]:7] Set(“SIP/8678-04c994b8”, “EMERGENCYCID=”) in new stack
– Executing [[email protected]:8] Set(“SIP/8678-04c994b8”, “TRUNKOUTCID=703XXX8500”) in new stack
– Executing [[email protected]:9] GotoIf(“SIP/8678-04c994b8”, “1?trunkcid”) in new stack
– Goto (macro-outbound-callerid,s,12)
– Executing [[email protected]:12] ExecIf(“SIP/8678-04c994b8”, “1?Set(CALLERID(all)=703XXX8500)”) in new stack
– Executing [[email protected]:13] ExecIf(“SIP/8678-04c994b8”, “1?Set(CALLERID(all)=703XXX8678)”) in new stack
– Executing [[email protected]:14] ExecIf(“SIP/8678-04c994b8”, “0?Set(CALLERPRES()=prohib_passed_screen)”) in new stack
– Executing [[email protected]:12] ExecIf(“SIP/8678-04c994b8”, “0?AGI(fixlocalprefix)”) in new stack
– Executing [[email protected]:13] Set(“SIP/8678-04c994b8”, “OUTNUM=7039361212”) in new stack
– Executing [[email protected]:14] Set(“SIP/8678-04c994b8”, “custom=DAHDI/g0”) in new stack
– Executing [[email protected]:15] ExecIf(“SIP/8678-04c994b8”, “0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^)twTW)”) in new stack
– Executing [[email protected]:16] Macro(“SIP/8678-04c994b8”, “dialout-trunk-predial-hook,”) in new stack
– Executing [[email protected]:1] MacroExit(“SIP/8678-04c994b8”, “”) in new stack
– Executing [[email protected]:17] GotoIf(“SIP/8678-04c994b8”, “0?bypass,1”) in new stack
– Executing [[email protected]:18] GotoIf(“SIP/8678-04c994b8”, “0?customtrunk”) in new stack
– Executing [[email protected]:19] Dial(“SIP/8678-04c994b8”, “DAHDI/g0/7039361212,300,twTW”) in new stack
– Requested transfer capability: 0x00 - SPEECH
– Called g0/7039361212
– DAHDI/49-1 is proceeding passing it to SIP/8678-04c994b8
– PROGRESS with cause code 127 received
– DAHDI/49-1 is making progress passing it to SIP/8678-04c994b8
– DAHDI/49-1 answered SIP/8678-04c994b8
– Started music on hold, class ‘default’, on DAHDI/49-1
– <SIP/8678-04c994b8> Playing ‘pbx-transfer.gsm’ (language ‘en’)
– Stopped music on hold on DAHDI/49-1
– Started music on hold, class ‘default’, on DAHDI/49-1
== Parked DAHDI/49-1 on 71 (lot default). Will timeout back to extension [from-pstn] , 1 in 45 seconds
– Added extension ‘71’ priority 1 to parkedcalls (0x2aaac80008c0)
– <SIP/8678-04c994b8> Playing ‘digits/7.gsm’ (language ‘en’)
– <SIP/8678-04c994b8> Playing ‘digits/1.gsm’ (language ‘en’)
– Executing [[email protected]:1] Macro(“SIP/8678-04c994b8”, “hangupcall,”) in new stack
– Executing [[email protected]:1] GotoIf(“SIP/8678-04c994b8”, “1?skiprg”) in new stack
– Goto (macro-hangupcall,s,4)
– Executing [[email protected]:4] GotoIf(“SIP/8678-04c994b8”, “1?skipblkvm”) in new stack
– Goto (macro-hangupcall,s,7)
– Executing [[email protected]:7] GotoIf(“SIP/8678-04c994b8”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,9)
– Executing [[email protected]:9] Hangup(“SIP/8678-04c994b8”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 9) exited non-zero on ‘SIP/8678-04c994b8’ in macro ‘hangupcall’
== Spawn extension (macro-dialout-trunk, h, 1) exited non-zero on ‘SIP/8678-04c994b8’
– Executing [[email protected]:20] Goto(“SIP/8678-04c994b8”, “s-ANSWER,1”) in new stack
– Goto (macro-dialout-trunk,s-ANSWER,1)
– Executing [[email protected]:1] GotoIf(“SIP/8678-04c994b8”, “1?noreport”) in new stack
– Goto (macro-dialout-trunk,s-ANSWER,3)
– Executing [[email protected]:3] NoOp(“SIP/8678-04c994b8”, “TRUNK Dial failed due to ANSWER - failing through to other trunks”) in new stack
– Executing [[email protected]:5] Macro(“SIP/8678-04c994b8”, “outisbusy,”) in new stack
– Executing [[email protected]:1] Playback(“SIP/8678-04c994b8”, “all-circuits-busy-now,noanswer”) in new stack
– <SIP/8678-04c994b8> Playing ‘all-circuits-busy-now.gsm’ (language ‘en’)
– Executing [[email protected]:2] Playback(“SIP/8678-04c994b8”, “pls-try-call-later,noanswer”) in new stack
– <SIP/8678-04c994b8> Playing ‘pls-try-call-later.gsm’ (language ‘en’)
– Executing [[email protected]:3] Macro(“SIP/8678-04c994b8”, “hangupcall”) in new stack
– Executing [[email protected]:1] GotoIf(“SIP/8678-04c994b8”, “1?skiprg”) in new stack
– Goto (macro-hangupcall,s,4)
– Executing [[email protected]:4] GotoIf(“SIP/8678-04c994b8”, “1?skipblkvm”) in new stack
– Goto (macro-hangupcall,s,7)
– Executing [[email protected]:7] GotoIf(“SIP/8678-04c994b8”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,9)
– Executing [[email protected]:9] Hangup(“SIP/8678-04c994b8”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 9) exited non-zero on ‘SIP/8678-04c994b8’ in macro ‘hangupcall’
== Spawn extension (macro-outisbusy, s, 3) exited non-zero on ‘SIP/8678-04c994b8’ in macro ‘outisbusy’
== Spawn extension (from-internal, 7039361212, 5) exited non-zero on ‘SIP/8678-04c994b8’

I’ve tracked it down to macro-dialout-trunk in extensions_additional.conf where I found the following. The transfers are returning dial status s-ANSWER which isn’t handled. Any ideas on how this should be fixed or if it is a bug?

exten => s,n,Goto(s-${DIALSTATUS},1)
exten => s,n(chanfull),Noop(max channels used up)
exten => s-BUSY,1,Noop(Dial failed due to trunk reporting BUSY - giving up)
exten => s-BUSY,n,Playtones(busy)
exten => s-BUSY,n,Busy(20)
exten => s-NOANSWER,1,Noop(Dial failed due to trunk reporting NOANSWER - giving up)
exten => s-NOANSWER,n,Playtones(congestion)
exten => s-NOANSWER,n,Congestion(20)
exten => s-CANCEL,1,Noop(Dial failed due to trunk reporting CANCEL - giving up)
exten => s-CANCEL,n,Playtones(congestion)
exten => s-CANCEL,n,Congestion(20)
exten => s-CHANUNAVAIL,1,GotoIf($[“x${OUTFAIL_${ARG1}}” = “x”]?noreport)
exten => s-CHANUNAVAIL,n,AGI(${OUTFAIL_${ARG1}})
exten => s-CHANUNAVAIL,n(noreport),Noop(TRUNK Dial failed due to ${DIALSTATUS} (hangupcause: ${HANGUPCAUSE}) - failing through to other trunks)
exten => s-.,1,GotoIf($["x${OUTFAIL${ARG1}}" = “x”]?noreport)
exten => s-.,n,AGI(${OUTFAIL${ARG1}})
exten => _s-.,n(noreport),Noop(TRUNK Dial failed due to ${DIALSTATUS} - failing through to other trunks)

For now I just copied the macro to to extensions_override_freepbx.conf and added in the below

exten => s-ANSWER,1,Noop(Dial completed with trunk reporting ANSWER - hanging up)
exten => s-ANSWER,n,Macro(hangupcall,)