SIP response codes

When I call through trunk and the called party is busy or no answer, I want setup, that pbx will play to me prompt, which I´ll set.
I want setup behaviour of my pbx when pbx get sip codes from sip trunk provider. Hangup cause codes.
For example: When pbx recieve hangup cause code 1, pbx will play prompt or something else, what I´ll set.
How can I do it?

There is basic support for this using Settings → Route Congestion Messages. There you can choose recordings for route and trunk failures, but not all hangup causes are represented.

How can I specify Route Congestion Messages for non-represented hangup causes?

I’m finding the subject confusing. Hangup cause codes are not SIP response codes, and “1” is not a possible SIP response code, as all such codes are three digits long.

Hangup cause codes come from three sources. Firstly some operations don’t actually attempt a SIP call, in which case they are generated by Asterisk, based on the type of failure. Second, if there is a Reason header, with a Q.850 code in it, they are taken from that code. Third, in the absence of such a header, they are looked up based on the SIP response code, using a table similar to that in RFC 3398 - Integrated Services Digital Network (ISDN) User Part (ISUP) to Session Initiation Protocol (SIP) Mapping although there may be some differences.

Because of the second case, there are a very large number of hangup cause codes that could be received.