Last active
December 9, 2020 20:20
-
-
Save mdavey/fe11f42fd0ac9d5265f8 to your computer and use it in GitHub Desktop.
Simple hangup detection (Asterisk)
This file contains 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
; Detect which party hungup an Asterisk call | |
; If we (the caller) hangup after Dial() we jump directly to h | |
; Because of the 'g' option if the other party hangs up we continue on | |
exten => s,1,Set(whoHungUp=CALLER) | |
exten => s,n,Dial(IAX2/provider/${number},,g) | |
exten => s,n,Set(whoHungUp=OTHERPARTY) | |
exten => s,n,Hangup | |
exten => h,1,NoOp(whoHungUp ${whoHungUp}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment