Okay, so using the group functionality. I would suggest providing console output so we can see exactly where the logic is executed and on what channels and when.
Executing [3113@internal:1] Set(“PJSIP/3116-000000d9”, “GROUP()=call_count”) in new stack
– Executing [3113@internal:2] NoOp(“PJSIP/3116-000000d9”, “Numero totale di chiamate:1”) in new stack
– Executing [3113@internal:3] GotoIf(“PJSIP/3116-000000d9”, “1?continue:BUSY”) in new stack
– Goto (internal,3113,4)
– Executing [3113@internal:4] NoOp(“PJSIP/3116-000000d9”, “”) in new stack
– Executing [3113@internal:5] GotoIf(“PJSIP/3116-000000d9”, “0?:nodeviata”) in new stack
– Goto (internal,3113,11)
– Executing [3113@internal:11] Dial(“PJSIP/3116-000000d9”, “PJSIP/3113,60”) in new stack
– Called PJSIP/3113
– PJSIP/3113-000000da is ringing
– PJSIP/3113-000000da answered PJSIP/3116-000000d9
Channel PJSIP/3113-000000df joined ‘simple_bridge’ basic-bridge <777fe5a5-6767-43ca-a25e-1972bc72be6b>
– Channel PJSIP/3116-000000de joined ‘simple_bridge’ basic-bridge <777fe5a5-6767-43ca-a25e-1972bc72be6b>
Transfer 3113 TO 3117
Started music on hold, class ‘default’, on channel ‘PJSIP/3116-000000de’
– Stopped music on hold on PJSIP/3116-000000de
– Channel PJSIP/3116-000000de left ‘simple_bridge’ basic-bridge <777fe5a5-6767-43ca-a25e-1972bc72be6b>
– Channel PJSIP/3113-000000df left ‘simple_bridge’ basic-bridge <777fe5a5-6767-43ca-a25e-1972bc72be6b>
– Executing [3117@operatori:1] GotoIf(“PJSIP/3116-000000de”, “0?:call”) in new stack
– Goto (operatori,3117,3)
– Executing [3117@operatori:3] Goto(“PJSIP/3116-000000de”, “internal,3117,1”) in new stack
– Goto (internal,3117,1)
– Executing [3117@internal:1] Set(“PJSIP/3116-000000de”, “GROUP()=call_count”) in new stack
– Executing [3117@internal:2] NoOp(“PJSIP/3116-000000de”, “Numero totale di chiamate:1”) in new stack
– Executing [3117@internal:3] GotoIf(“PJSIP/3116-000000de”, “1?continue:BUSY”) in new stack
– Goto (internal,3117,4)
– Executing [3117@internal:4] NoOp(“PJSIP/3116-000000de”, “”) in new stack
– Executing [3117@internal:5] GotoIf(“PJSIP/3116-000000de”, “0?:nodeviata”) in new stack
– Goto (internal,3117,11)
– Executing [3117@internal:11] Dial(“PJSIP/3116-000000de”, “PJSIP/3117,60”) in new stack
– Called PJSIP/3117
– PJSIP/3117-000000e0 is ringing
– PJSIP/3117-000000e0 answered PJSIP/3116-000000de
– Channel PJSIP/3117-000000e0 joined ‘simple_bridge’ basic-bridge <73c2e1ef-cd80-4bc1-bc99-f727c0df0f06>
– Channel PJSIP/3116-000000de joined ‘simple_bridge’ basic-bridge <73c2e1ef-cd80-4bc1-bc99-f727c0df0f06>
Call to trasferred 3115 TO 3113
Executing [3113@operatori:1] GotoIf(“PJSIP/3115-000000e7”, “0?:call”) in new stack
– Goto (operatori,3113,3)
– Executing [3113@operatori:3] Goto(“PJSIP/3115-000000e7”, “internal,3113,1”) in new stack
– Goto (internal,3113,1)
– Executing [3113@internal:1] Set(“PJSIP/3115-000000e7”, “GROUP()=call_count”) in new stack
– Executing [3113@internal:2] NoOp(“PJSIP/3115-000000e7”, “Numero totale di chiamate:2”) in new stack
– Executing [3113@internal:3] GotoIf(“PJSIP/3115-000000e7”, “0?continue:BUSY”) in new stack
– Goto (internal,3113,13)
– Executing [3113@internal:13] Busy(“PJSIP/3115-000000e7”, “10”) in new stack
== Spawn extension (internal, 3113, 13) exited non-zero on ‘PJSIP/3115-000000e7’
You have many different endpoints involved here, and your descriptions for each don’t include all the involved endpoints so it’s a bit confusing. It’s also snippets so the complete execution of the channels is not present.
I would say that there are still two channels in the group. One of them is for sure “PJSIP/3115-000000e7”. Another may be a PJSIP/3116 channel.