How can I specify the SIP reject cause?

I am running an Asterisk 17.6.0, and I have a specific request to directly reject some calls with SIP 603 release cause.
I have the dialplan configure as:
exten => _01234X!,1,Hangup(21)
But, 21 is mapped to 401, 403, 407, 603 (according to Hangup Cause Mappings - Asterisk Project - Asterisk Project Wiki), and asterisk is actually returning 403.

How can I set it to return 603, or any other cause If needed?

Thank you,

I think the answer is that you will have to modify the source code and recompile.

However, it does look as though chan_sip will return 603 for an invalid hangup cause. It is not, however, designed to be capable of generating user defined ones, and I doubt that the above behaviour is guaranteed.

I don’t know my way around chan_pjsip well enough to give a quick answer for that.

This is not the sort of operation that Asterisk was intended to support. It basically starts from the position of trying to make everything look like ISDN, as it an ISDN switch if SIP bolted on.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.