Dialplan: [xyz] exten => 100,1,Macro(stddial,SIP/xyz010001) exten => 650,1,Macro(stddial,SIP/poly_650_01) exten => 101,1,Macro(stddial,SIP/xyz010101) exten => 1100,1,Macro(stddial,SIP/xyz110001) exten => 1122,1,Macro(stddial,SIP/xyz112201) [macro-stddial] exten => s,1,GotoIf($[${ISNULL(${BLINDTRANSFER})}]?noxfer:+1) exten => s,n,ForkCDR exten => s,n,Set(CDR(userfield)="xfer=1") exten => s,n,Goto(dial) exten => s,n(noxfer),Set(CDR(userfield)="xfer=0") exten => s,n(dial),Dial(${ARG1},15) exten => s,n,Hangup Scenario: 1122 calls 101, 101 answers and blind transfers to 1100 SVN-branch-1.4-r118858: -- Executing [101@xyz:1] Macro("SIP/xyz112201-081ebc00", "stddial|SIP/xyz010101") in new stack -- Executing [s@macro-stddial:1] GotoIf("SIP/xyz112201-081ebc00", "1?noxfer:+1") in new stack -- Goto (macro-stddial,s,5) -- Executing [s@macro-stddial:5] Set("SIP/xyz112201-081ebc00", "CDR(userfield)="xfer=0"") in new stack -- Executing [s@macro-stddial:6] Dial("SIP/xyz112201-081ebc00", "SIP/xyz010101|15") in new stack -- Called xyz010101 -- SIP/xyz010101-081efb78 is ringing -- SIP/xyz010101-081efb78 answered SIP/xyz112201-081ebc00 -- Packet2Packet bridging SIP/xyz112201-081ebc00 and SIP/xyz010101-081efb78 -- Started music on hold, class 'xyz', on channel 'SIP/xyz112201-081ebc00' -- Stopped music on hold on SIP/xyz112201-081ebc00 == Spawn extension (xyz, 1100, 0) exited non-zero on 'SIP/xyz112201-081ebc00' -- Executing [1100@xyz:1] Macro("SIP/xyz112201-081ebc00", "stddial|SIP/xyz110001") in new stack -- Executing [s@macro-stddial:1] GotoIf("SIP/xyz112201-081ebc00", "0?noxfer:+1") in new stack -- Goto (macro-stddial,s,2) -- Executing [s@macro-stddial:2] ForkCDR("SIP/xyz112201-081ebc00", "") in new stack -- Executing [s@macro-stddial:3] Set("SIP/xyz112201-081ebc00", "CDR(userfield)="xfer=1"") in new stack -- Executing [s@macro-stddial:4] Goto("SIP/xyz112201-081ebc00", "dial") in new stack -- Goto (macro-stddial,s,6) -- Executing [s@macro-stddial:6] Dial("SIP/xyz112201-081ebc00", "SIP/xyz110001|15") in new stack -- Called xyz110001 -- Incoming call: Got SIP response 500 "Internal Server Error" back from 192.168.1.250 -- SIP/xyz110001-081e2080 is ringing -- SIP/xyz110001-081e2080 answered SIP/xyz112201-081ebc00 -- Packet2Packet bridging SIP/xyz112201-081ebc00 and SIP/xyz110001-081e2080 == Spawn extension (macro-stddial, s, 6) exited non-zero on 'SIP/xyz112201-081ebc00' CDRs for SVN-branch-1.4-r118858: -[ RECORD 1 ]----------------------- acctid | 5597334 calldate | 2008-08-22 15:36:50-04 clid | "Michael" <1122> src | 1122 dst | 101 dcontext | xyz channel | SIP/xyz112201-081ebc00 dstchannel | SIP/xyz010101-081efb78 lastapp | ForkCDR lastdata | duration | 20 billsec | 17 disposition | ANSWERED amaflags | 3 accountcode | uniqueid | 1219433810.6 userfield | xfer=0 -[ RECORD 2 ]----------------------- acctid | 5597335 calldate | 2008-08-22 15:37:01-04 clid | "Michael" <1122> src | 1122 dst | 101 dcontext | xyz channel | SIP/xyz112201-081ebc00 dstchannel | SIP/xyz110001-081e2080 lastapp | Dial lastdata | SIP/xyz110001|15 duration | 9 billsec | 8 disposition | ANSWERED amaflags | 3 accountcode | uniqueid | 1219433810.6 userfield | xfer=1 SVN-branch-1.4-r139283: -- Executing [101@xyz:1] Macro("SIP/xyz112201-081deed8", "stddial|SIP/xyz010101") in new stack -- Executing [s@macro-stddial:1] GotoIf("SIP/xyz112201-081deed8", "1?noxfer:+1") in new stack -- Goto (macro-stddial,s,5) -- Executing [s@macro-stddial:5] Set("SIP/xyz112201-081deed8", "CDR(userfield)="xfer=0"") in new stack -- Executing [s@macro-stddial:6] Dial("SIP/xyz112201-081deed8", "SIP/xyz010101|15") in new stack -- Called xyz010101 -- SIP/xyz010101-081e4170 is ringing -- SIP/xyz010101-081e4170 answered SIP/xyz112201-081deed8 -- Packet2Packet bridging SIP/xyz112201-081deed8 and SIP/xyz010101-081e4170 webdevel*CLI> -- Started music on hold, class 'xyz', on channel 'SIP/xyz112201-081deed8' -- Stopped music on hold on SIP/xyz112201-081deed8 == Spawn extension (xyz, 1100, 0) exited non-zero on 'SIP/xyz112201-081deed8' -- Executing [1100@xyz:1] Macro("SIP/xyz112201-081deed8", "stddial|SIP/xyz110001") in new stack -- Executing [s@macro-stddial:1] GotoIf("SIP/xyz112201-081deed8", "0?noxfer:+1") in new stack -- Goto (macro-stddial,s,2) -- Executing [s@macro-stddial:2] ForkCDR("SIP/xyz112201-081deed8", "") in new stack -- Executing [s@macro-stddial:3] Set("SIP/xyz112201-081deed8", "CDR(userfield)="xfer=1"") in new stack -- Executing [s@macro-stddial:4] Goto("SIP/xyz112201-081deed8", "dial") in new stack -- Goto (macro-stddial,s,6) -- Executing [s@macro-stddial:6] Dial("SIP/xyz112201-081deed8", "SIP/xyz110001|15") in new stack -- Called xyz110001 -- Incoming call: Got SIP response 500 "Internal Server Error" back from 192.168.1.250 -- SIP/xyz110001-081eb290 is ringing -- SIP/xyz110001-081eb290 answered SIP/xyz112201-081deed8 -- Packet2Packet bridging SIP/xyz112201-081deed8 and SIP/xyz110001-081eb290 == Spawn extension (macro-stddial, s, 6) exited non-zero on 'SIP/xyz112201-081deed8' CDRs for SVN-branch-1.4-r139283: -[ RECORD 1 ]----------------------- acctid | 5597336 calldate | 2008-08-22 15:43:30-04 clid | "Michael" <1122> src | 1122 dst | 101 dcontext | xyz channel | SIP/xyz112201-081deed8 dstchannel | SIP/xyz010101-081e4170 lastapp | Dial lastdata | SIP/xyz010101|15 duration | 16 billsec | 12 disposition | ANSWERED amaflags | 3 accountcode | uniqueid | 1219434210.0 userfield | xfer=0 -[ RECORD 2 ]----------------------- acctid | 5597337 calldate | 2008-08-22 15:43:46-04 clid | "Michael" <1122> src | 1122 dst | 101 dcontext | xyz channel | SIP/xyz112201-081deed8 dstchannel | SIP/xyz010101-081e4170 lastapp | Dial lastdata | SIP/xyz110001|15 duration | 11 billsec | 10 disposition | NO ANSWER amaflags | 3 accountcode | uniqueid | 1219434210.0 userfield | xfer=0 These CDRs are screwed up. "xfer=1" didn't make it into the 2nd CDR. Also its disposition is "NO ANSWER", which is incorrect. dstchannel is wrong as well