Call Waiting Playback Sound

Iif extension A and B are on a call, a call from extension C to either A or B results in extension C hearing a normal ringback sound instead of a call waiting sound. But i want extension C will hear a custom sound file.

How to do that?

Is call waiting happening in the phone or Asterisk? Please provide a lot more detail, e.g. channel technologies.

Suppose i have three SIP peers registered in three ip phone set. When peer A and B are in a call, in that time if peer C tries to call either peer A or B the call get rejected due to the default call limit set to 1. So what i did is add call-limit=2 for each sip peer in the sip.conf file. Now C can call either A or B when they are in a call. So now the called party (i.e. peer A or B) can see there is another call for him/her because they hear a beep sound as well as incoming call information on the display of the IP Phone but the calling party (i.e. peer C) can’t understand that the called party is already in a call because he/she hear normal ring sound. But if the calling party (i.e. peer C) can hear a custom sound file it would be great.

That’s because the called phone is handling the situation and Asterisk has no knowledge of it.

I haven’t used the call completion options in Asterisk although I suspect that, if you use them, the called phone will be unaware of the call, but you could investigate them.

You could use queues, but the called party will definitely be unaware of the new call.

Or you can explicitly handle the failure in the dialplan, but you will also have a problem letting the called party know

Use Queue or check device state before dialing to the remote device if busy, feed the dial command with the m ( class ) option

Thanks @ambiorixg12 i have solved the problem.
Here is the code if any one needed

 exten => _34XX,1,Set(devst=${DEVICE_STATE(SIP/${EXTEN})})
same => n,ExecIf($["${devst}" = "INUSE"]?Dial(SIP/${EXTEN},,m(callwaiting)):Dial(SIP/${EXTEN}))
same => n,Hangup
1 Like