Nik Kashi
Nik Kashi

Reputation: 4596

Find busy line while calling with Asterisk

I am using this code for making a call with Asterisk:

exec("DIAL", "DAHDI/g0/" + phoneNo + "," + timeOut + ",mg,");

But this snippet always return 0.
How can I find the phone line is busy or not answered?

Upvotes: 0

Views: 1417

Answers (2)

kuhajeyan
kuhajeyan

Reputation: 11017

For those who use Asterisk java

String status = channel.getVariable("DIALSTATUS");

status will give you status of dial, such as BUSY, NOANSWER described https://www.voip-info.org/wiki/view/Asterisk+variable+DIALSTATUS

Upvotes: 1

arheops
arheops

Reputation: 15247

First i have inform you that that line return 1 if dial can't be done(but yes, that is rare situation).

For result please check dial command page:

http://www.voip-info.org/wiki/view/Asterisk+cmd+Dial

It return DIALSTATUS dialplan variable.

http://www.voip-info.org/wiki/view/Asterisk+variable+DIALSTATUS

Upvotes: 1

Related Questions