Set custom Hangup Cause

Hello, to all, I want to changed asterisk hangup caused, for all hangup I want to it will return 503 to the caller party, below is my dial-plan & sip debug log please check if I am correct, if not please guide me.

exten => h,1,Hangup(41)
exten => h,n,NoOp(Dial Status is {DIALSTATUS}) exten => h,n,NoOp(Hangup cause is {HANGUPCAUSE})

    -- Executing [2347062681248@simpro:417] NoOp("SIP/Georgia-Carrier-00001128", "--Condition Hangup 503 Error Code--") in new stack
    -- Executing [2347062681248@simpro:418] Hangup("SIP/Georgia-Carrier-00001128", "41") in new stack
  == Spawn extension (simpro, 2347062681248, 418) exited non-zero on 'SIP/Georgia-Carrier-00001128'
    -- Executing [h@simpro:1] NoOp("SIP/Georgia-Carrier-00001128", "Dial Status is ") in new stack
    -- Executing [h@simpro:2] NoOp("SIP/Georgia-Carrier-00001128", "Hangup cause is 41") in new stack
Scheduling destruction of SIP dialog '' in 6400 ms (Method: INVITE)

<--- Reliably Transmitting (no NAT) to --->
SIP/2.0 603 Declined
Via: SIP/2.0/UDP;branch=z9hG4bK-J1059-daf4-bfjhcehe;
From: "16502851001"<>;tag=265165689J62M
To: <sip:2347062681248@>;tag=as6b377320
CSeq: 100447231 INVITE
Server: SimPro-v3
Supported: replaces, timer
Content-Length: 0


<--- SIP read from --->
ACK sip:2347062681248@ SIP/2.0
Via: SIP/2.0/UDP;branch=z9hG4bK-J1059-daf4-bfjhcehe
From: "16502851001"<>;tag=265165689J62M
To: <sip:2347062681248@>;tag=as6b377320
CSeq: 100447231 ACK
Max-Forwards: 70
Content-Length: 0


I want for any reason of hangup asterisk will return 503

41 503 NORMAL_TEMPORARY_FAILURE temporary failure [Q.850]

This cause indicates that the network is not functioning correctly and that the condition is not likely to last a long period of time; e.g. the user may wish to try another call attempt almost immediately.

as you can see I am still getting SIP/2.0 603 Declined please help me

Although the ISDN interworking isn’t really there for your intended purposes, but rather to give a reasonable approximation of the ISDN clearing cause, have you tried the other codes in that translate to 503.

Failing that look for the switch that does the translation, in the source code. In earlier versions, it is in hanugp_cause2sip() in chan_sip.c, but that file has been restructure and split, since.