Last active
August 7, 2024 19:51
-
-
Save lgaetz/480582a1827cc98db1ee539c249f074b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[send-sip-response-code] | |
; Context to send a specific SIP response code and terminate the channel | |
; Create Custom Destination in FreePBX with a dial string of the format | |
; send-sip-response-code,404,1 | |
; substitute the appropriate response code in place of the 404 | |
; Reference: https://wiki.asterisk.org/wiki/display/AST/Hangup+Cause+Mappings | |
; | |
; latest version: https://gist.github.com/lgaetz/480582a1827cc98db1ee539c249f074b | |
; | |
; License GPL/2 | |
; | |
; History 2019-10-08 First attempt supports 404, 480 and 486 | |
; 2023-04-14 added 501 | |
exten => 404,1,NoOp(Entering user defined context send-sip-response-code in extensions_custom.conf) | |
exten => 404,n,NoOp(Sending SIP 404 Not Found) | |
exten => 404,n,hangup(1) | |
exten => 480,1,NoOp(Entering user defined context send-sip-response-code in extensions_custom.conf) | |
exten => 480,n,NoOp(Sending SIP 480 Temporarily Unavailable) | |
exten => 480,n,hangup(19) | |
exten => 486,1,NoOp(Entering user defined context send-sip-response-code in extensions_custom.conf) | |
exten => 486,n,NoOp(Sending SIP 486 Busy) | |
exten => 486,n,hangup(17) | |
exten => 501,1,NoOp(Entering user defined context send-sip-response-code in extensions_custom.conf) | |
exten => 501,n,NoOp(Sending SIP 501 Busy) | |
exten => 501,n,hangup(29) | |
; end context send-sip-response-code |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Improvements from isaacgross1 on this thread
https://community.freepbx.org/t/freepbx-reject-calls-without-actually-answering-the-trunk/99416/12?u=lgaetz