Hello everybody,
I’m having a little trouble with my dialplan.
When a call can’t be established, I want to play an audio message.
Here is my dialplan :
[DialStatus] ; if a call can not be established
exten => n-CHANUNAVAIL,1,PlayBack(custom/bonjour)
same = n,wait(0.3)
same = n,PlayBack(custom/numeroinvalide)
same = n,wait(0.3)
same = n,PlayBack(custom/bonnejournee)
same = n,Hangup()
exten => n-CONGESTION,1,PlayBack(custom/bonjour)
same = n,wait(0.3)
same = n,PlayBack(custom/numeroinvalide)
same = n,wait(0.3)
same = n,PlayBack(custom/bonnejournee)
same = n,Hangup()
exten => n-BUSY,1,PlayBack(custom/bonjour)
same = n,wait(0.3)
same = n,PlayBack(custom/busy)
same = n,wait(0.3)
same = n,PlayBack(custom/renouvelerappelplustard)
same = n,wait(0.3)
same = n,PlayBack(custom/bonnejournee)
same = n,Hangup()
exten => n-NOANSWER,1,PlayBack(custom/bonjour)
same = n,wait(0.3)
same = n,PlayBack(custom/numeronerepondpas)
same = n,wait(0.3)
same = n,PlayBack(custom/renouvelerappelplustard)
same = n,wait(0.3)
same = n,PlayBack(custom/bonnejournee)
same = n,Hangup()
[call]
exten => _+.,1,Dial(PJSIP/${EXTEN}@trunk)
same = n,Goto(n-${DIALSTATUS},1)
include => DialStatus
It works, no problem. But I lose the called number in the CDR file or in CDR functions.
If the call can’t be established, the CDR return n-BUSY for example as called number.
Am I missing something to keep the called number in the CDR?
Thanks