Change ISDN cause codes libpri/dahdi

I am having a problem with an ISDN ptmp span. When both B-channels are in calls and a third call comes in, asterisk with dahdi and libpri signals

Ext: 1 Cause: Circuit/channel congestion (34), class = Network Congestion (resource unavailable) (2) ]

to the calling telco using the D-channel.

This doesn’t generate a standard busy signal for the calling party. They hear whatever sound, announcement or even silence the telco of the caller has assigned for cause code 34. As many elderly people call this telephone system, a clear busy signal is mandatory because the current situation has already caused some confusion.

I asume that the correct code to send out would be 17 (BUSY)?

Is there a way to map CAUSES in dahdi/pri to others without recompiling the source?

In case I should recompile, I am unsure if altering libpri.h would be enough. All CAUSE codes are defined in that file, but I am not familiar enough with the source code to understand if this single change would be sufficient or could generate even worse trouble in the future?

libpri source is here: https://github.com/asterisk/libpri/blob/master/libpri.h

Any insight would be very nice. Thank you!

You should be able to map causes in the dialplan.

Hallo David, thanks for your answer. Could you hint me a bit more on what to look for?
In my understanding the calls never reach the dialplan, because they are rejected on the signaling level before a voice channel is created?

https://wiki.asterisk.org/wiki/display/AST/Asterisk+11+Application_Hangup

Solved.
The root problem was that “call waiting” was enabled for the line.
After contacting the telco and turning off CW for the line the problem went away
and a BUSY signal is played, when no B-chans are available.