I wants to get the dial status of the call. I make the following things for making an outgoing call.

I created follwoing call file name

Channel: DAHDI/g0/8938838993
Callerid: 8938838993
Context: call_out
Extension: s
priority: 1

and here is my extensions.conf file


exten => s,1,NoOp(Dial Status : ${DIALSTATUS})
exten => s,n,Goto(s-${DIALSTATUS},1)

exten => s-NOANSWER,1,Hangup()
exten => s-ANSWER,1,Dial(SIP/1000)

As per above dial plan, DIALSTATUS is coming blank. Can anyone guide me how to get the DIALSTATUS or where I have to make the changes to get the DIALSTATUS.

Thanks in Advance


The DIALSTATUS of the outgoing call is always ANSWERED in that context, so there is no point in Asterisk saving it.

Why do you want this, and why can’t you use CDRs to get the information (noting that thare have been problems with CDRs and Originate and that unanswered calls don’t necessarily get CDRs logged, by default)?

If you really need to capture it in the dialplan, you will need to Originate (including call files) to a Local channel.

Also, what is the application that has triggered all these questions about call files and Originate? I think I should have asked this before, because most of the purposes for which people use this, particularly without AMI, are ones for which I would not like to be on the receiving end, and most people wouldn’t. That tends to mean that people developing them are expected to pay full commercial costs for the knowledge they need.