Play Sound on Outgoing calls if busy

Hello all,

I have 4 pstn lines connected to my asterisk box(v1.4) configured by asterisk-gui. Everything is working fine but whenever all 4 lines are busy and user tries to call, it disconnect automatically. Now I want to play a voice in outgoing calls if all lines are busy before it hangup. I was googling about this issue since few days but still haven’t got any luck. Any idea would be very helpful.

This is how my extension.conf file look like.

Thank You

Insert a line that runs the Playback application before the the two Hangup lines (same extension and priority n).

Also, replace the 1-out line with one that runs Playback, and, optionally append a priority n line which runs Hangup.

I suspect only the 1-out changes are needed, but I would need to see much more of your configuration to be sure.

Note that this doesn’t distinguish between different failure reasons.

Also, if this is code from the GUI, it is broken, in that it fails to distinguish between hangup causes. Retrying some hangup causes will result in multiple missed calls at the destination number. This only applies if ARG2 is non-empty, which means that there is a alternative route, as well as alternative circuits on the primary route.

Hello david,
Thanks for your reply. I did like you said but still can’t figure it out.

Here is what I did and my full extension.conf file look like.

Thank You

Do I read you correctly? 4 POTS lines, 5th caller gets dropped? This would be your provider, no?

I have 4 PSTN lines connected. They are divided into two dialplan ‘link1’ and ‘link2’(two lines for each dialplan). Half users are assigned link1 and half users are assigned link2. Users using ‘link1’ dialplan can make outgoing calls for upto 2 lines, so whenever third user of ‘link1’ dialplan tries to call it hangups. Same for link2 also. I just want to play a sound file named “outgoing” before it hangup when third user tries to call.

I am not sure it is the proper way to configure, but that’s what I have done. I hope you understand what I am up to.

You need to set console verbosity to at least 3, so that you can see what dialplan is actually being executed.

Although Background will probably work, it is the wrong application. For one thing, anything that looks like DTMF will cause the message to terminate. Playback is the right one here.

Hello david,

I changed background application to Playback and its working fine now.

Thanks for your help.