make asterisk hangup when callee play audio

Commercial and business-oriented Asterisk discussion.

Moderator: Moderator

make asterisk hangup when callee play audio

Postby bridge1 » Mon May 26, 2014 6:39 pm


I have asterisk 1.6 running on Ubuntu 12.04 and I use it for termination.
Some dialed numbers are very expensive and I do not want asterisk to dial them. when asterisk dial such numbers, an audio file plays warning the caller about the cost and then it ring the number. The charge starts if I continue and the callee answer. I want asterisk to hangup when it hears this audio file. The audio file is played by the mobile operator and it could be differentiated from normal numbers answer. The time period the file is heard is short as compared to normal answer and there is no answer sent back so there are no charge. Similar to audio played when the number is out of reach.

Posts: 2
Joined: Mon May 26, 2014 5:41 pm

Re: make asterisk hangup when callee play audio

Postby sparktechs » Tue May 27, 2014 11:25 pm

Hello bridge1,

We can probably help you out,but I need to discuss it with you in detail.

Please add me on skype . My id is spark.subhish

Subhish N
Posts: 7
Joined: Fri May 23, 2014 3:17 am

Re: make asterisk hangup when callee play audio

Postby meightee » Fri May 30, 2014 6:29 am

Dont want to steal the bread out of someones mouth....

But this is so simple, would feel like an **s not to say anything.

Have you looked at the progress command....?

Would do just what you want.
Posts: 44
Joined: Fri Aug 29, 2008 5:46 am

Re: make asterisk hangup when callee play audio

Postby david55 » Mon Jun 02, 2014 10:51 am

Progress will cause the caller to know that they are incurring big charges, but the OP wants the call to be rejected by the machine. That is difficult unless there is some characteristic of the announcement that makes it easy to detect with a machine. Even then, you are probably going to have to write your signal processing code to recognise that.

The easiest solution is to detect the problem destination numbers before even starting the call to the service provider.
Moves Like Spencer
Posts: 12570
Joined: Fri Sep 26, 2008 5:03 am

Return to Asterisk Biz & Jobs

Who is online

Users browsing this forum: No registered users and 1 guest