Hello, i need a help, and i’m new about asterisk.
I’m running Asterisk 16 and would like to implement the feature of “Call Forward on busy”
What I want is just this: One extension (let’s us say 1111) if it doesn’t anwser or rejected, the call is forwarded to 3333.
i have tried this script but didin’t worked
exten => 1111,1,Dial(SIP/${EXTEN})
same => n,GotoIf($[“${DIALSTATUS}” = “BUSY”]?busy:unavail)
same => n(unavail),Dial(SIP/3333)
same => n,Hangup()
same => n(busy),Dial(SIP/3333)
same => n,Hangup()
How do I implement this on the extensions.conf file?
exten => 1111,1,Dial(SIP/${EXTEN})
same => n,Verbose($[“${DIALSTATUS}” = “BUSY”]?busy:unavail)
same => n(unavail),Dial(SIP/3333)
same => n,Hangup()
same => n(busy),Dial(SIP/3333)
same => n,Hangup()
In cases where DIALSTATUS are not set, that line will give a syntax error. It’s better to use "${DIALSTATUS}" instead, that would avoid errors getting logged all over the place.
You were told to use Noop (or Verbose) to see what the actual DIALSTATUS value was. No one told you to replace the GoTo, itself, with Verbose.
Please read through the sample file I referenced and try to understand how the examples work. There are many examples there of using Noop to display the values of variables, and if you cannot understand the process from that you really need to back off and study the examples until you do understand what they are doing, before you you try coding your own dialplan.