Why Asterisk detect busy if not busy?

This dialplan fail, my phone “sound” for one second and then fail go to busy state and voicemail start

exten = 001,1,NoOp()
same => n,Verbose(2, Chiamata in entrata da "${CALLERID(num)}")
same => n,Set(CALLERID(num)=${CALLERID(num):3})
same => n,Set(CDR(original_dst)=${PHONEEXTNUMBER})
same => n,Dial(dahdi/1},20,tTkK)
same => n,GotoIf($["${DIALSTATUS}" = "BUSY"]?busy:unavail)                              
same => n(unavail),VoiceMail(001@interni,u)
same => n,Hangup()                                                                      ;chiude
same => n(busy),VoiceMail(001@interni,b)                                            ;voicemail per busy
same => n,Hangup()

If I remove the voicemail part works fine (so I can exclude dahdi problems)

exten = 001,1,NoOp()
same => n,Verbose(2, Chiamata in entrata da "${CALLERID(num)}")
same => n,Set(CALLERID(num)=${CALLERID(num):3})
same => n,Set(CDR(original_dst)=${PHONEEXTNUMBER})
same => n,Dial(dahdi/1},20,tTkK)
same => n,Hangup()

Any idea about this?

I see this error in asterisk console

Unable to create channel of type ‘dahdi’ (cause 17 - User busy)

It happen even I remove the voicemail part, dahdi report busy but is not busy (because the phone ring)!

Solution found. I change the order of load module (wctdm first wctdm24xxp second) then I set my “sip context” as this


[telecom]
exten => _XXXXX.,1,NoOp()
same => n,Set(CALLERID(number)=12345678)
same => n,Dial(PJSIP/${EXTEN}@tim-uscita,30,tTkK)
same => n,Hangup()

exten = +12345678,1,Answer()
same => n,Verbose(2, Chiamata in entrata da "${CALLERID(num)}")
same => n,Set(CALLERID(num)=${CALLERID(num):3})
same => n,Set(CDR(original_dst)=${PHONEEXTNUMBER})
same => n,Dial(${TELEFONOANALOGICO1}&${TELEFONOANALOGICO2}&${TELEFONOANALOGICO5}&${TELEFONOSIP1},20,tTkK)
same => n,GotoIf($["${DIALSTATUS}" = "BUSY"]?busy:unavail)                              ;se è occupato invia a busy altrimenti unavail
same => n(unavail),VoiceMail(12345678@interni,u)                                         ;voicemail, argomento mailbox@contesto
same => n,Hangup()                                                                      ;chiude
same => n(busy),VoiceMail(12345678@interni,b)                                            ;voicemail per busy
same => n,Hangup()