Dialing external number: originate and disconnected numbers

Hello!

Our configuration: SIP - Asterisk 1.4 - Digium TE207 - E1 (PSTN).

We have a dialer application that uses Originate to dial cellular phones. If the number we dialed is disconnected, cellular network plays inband audio message: “The number you have dialed is switched off or out of the coverage, please call later…”. That audio message can be quite long and Originate command hangs on the line until the message is over and only then hangs up and returns originate failure.

Is there any way to make Originate to hang up immediately if the dialed number is disconnected? The reason is not to waste time on listening operator’s message and continue work with the next number.

Thank you in advance!

If the far end is returning answer supervision and playing in-band audio, you don’t have many options to automatically detect the condition.

You could try running some answering machine detection on the outbound call. I use it all the time and it works pretty well.

voip-info.org/wiki/index.php … sk+cmd+AMD

Sorry, I’m not sure what answer supervision is.

[quote=“g2010”]
You could try running some answering machine detection on the outbound call. I use it all the time and it works pretty well.[/quote]
According to the documentation AMD should be called after the outbound call has been answered. But it doesn’t happen if we dial to the disconnected number. In that case PSTN plays inbound audio message while the call state is “Dialing” and hangs up.

Probably there is another solution?

Can you detect ringing from the carrier on a successful attempt?