Kill/substitue busy tone on SIP 480 response?

dial plan:
each extension:
exten => 200,n(intercom),Dial(SIP/200,20)
exten => 200,n,Hangup

and so on…

all ring if call to 500:
exten => 500,1,Dial(SIP/200&SIP/201&SIP/202,20)
exten => 500,2,Hangup

So i’m getting ring tone for 20 sec and very annoying busy tone (on door station) if no answer/no response (SIP 480 DIALSTATUS right?) which I need to kill or substitue with a custom sound.
Any idea how to do that?


try to Answer() before Hangup()

Or hangup with an explicit clearing cause that causes the door phone to generate a less objectional tone.

Answer() before hangup() meaning I can simulate ‘answer’?
like that?
exten => 500,1,Dial(SIP/200&SIP/201&SIP/202,20)
exten => 500,2,Answer()
exten => 500,3,Hangup

Or hangup with an explicit clearing cause that causes the door phone to generate a less objectional tone.
Sounds good but asterisk core I have is 1.6.1 - looks to me has to be 1.8 to read SIP codes in dialplan…


How is reading relevant. Hangup causes use ISDN cause codes, which are then mapped to SIP response codes. I suspect there are enough to cover the full tone repertoire of the phone, but you will probably find that there is nothing that is actually nice.

So that brings next question: if ISDN response code is map to SIP response code - the busy tone where is coming from: doorstation or SIP server (asterisk)? If asterisk is there is way to completely disable/delete tone file? I’m ok with not getting busy tone ever again from any device…

If you haven’t answered the call, the tone is generated in the SIP device, not by Asterisk. If you answer, I don’t think SIP allows you to do anything other than normally terminate the call, so answering and hanging up causes the call to be stopped dead, although the phone could conceivably do something as a result of failing to hang up the phone.

Ok, got it, but this is not what doorstation manufacture told me - they said tone comes from asterisk. So aswering it before hangup works with one exception when device is not registered. Is there is a way to check in the dialplan status of a device if is registered with SIP server?

I don’t understand how being registered makes any difference.

If you are accepting incoming calls from unregistered devices without static addresses, you need to review the setting of the allowguest option, as you may have a security issue.

I don’t think that’s the case. My impression was when there is no device to pickup the call (thus the need to check if at least one device is in the system) will still get 480 code and get bussy call, but I need to test that in the field next week…

I appreciate your help. Thanks

You mean the destination isn’t registered. That will generate a CHANUNAVAIL status, with cause code 20. However, Asterisk translates both that and no answer to 480.

I assume the SIPPEER function will tell you enough to work out whether a named device is registered.

The chanisavail application may also tell you.

That’s what I meant - destination unregistered and yes I’m getting code 20 - channel unavailable.
I’ll look into those two functions. Thanks