Need to send SIP408 (or 480) on No Answer on Incomming Calls

Hi,

Our SIP provider requires us to send a SIP408 or a SIP 480 out when the called extension is not answering.

I’ve tried a lot of settings in freePBX, but non of them have shown the desired result. In the extension itself I tried setting the optional destinations for No Answer to:
Terminate Call - Hangup (results in SIP 603)
Terminate Call - Congestion (results in SIP 487)
Unavailable Voicemail if enabled and disabled the VM (results in SIP 503)

I have also installed the “Trunk Failure Handling”, but I get the impression this is only working on outbound calls.

Is it possible to return 408 or 480 back to the caller when the called extension is not answering?

I found a way…

in /etc/asterisk/extensions_additional.conf there is a section macro-exten-vm.
in here the default hangup cause is Congestion.

I’ve added 3 rules;
exten => s-NOANSWER,1,GotoIf($["${IVR_RETVM}"=“RETURN” & “${IVR_CONTEXT}”!=""]?exit,1)
exten => s-NOANSWER,n,Playtones(congestion)
exten => s-NOANSWER,n,Hangup(18)

Now I do get a correct disconnect reason…

The only thing is… in the header of this file it says;
; Do NOT edit this file as it is auto-generated by FreePBX.

Is there a way for me to make this solution more permanent?

sure, just use extensions_custom.conf instead.