Olivier
2017-Dec-14 15:28 UTC
[asterisk-users] Explain HangupCauseClear() and HANGUPCAUSE_KEYS behaviour
Hello, I'm giving HangupCauseClear() a try on a Debian Stretch / Asterisk 13.18.3 stack. My dialplan is: exten = 1234,1,Set(CHANNEL(hangup-handler-push)=myhandler,s,1) same = n,Dial(SIP/foo/1234) same = n,Gosub(myhandler,s,1) same = n,HangupCauseClear() same = n,Dial(SIP/bar/1234) [myhandler] exten = s,1,Set(HKEYS=${HANGUPCAUSE_KEYS()}) ... foo trunk is configured to reject calls. bar trunk is configured toaccept calls. I would expect ${HANGUPCAUSE_KEYS()} to return values that directly relate to lastest call and forget whatever concerns previous calls. It seems: - on first call, HANGUPCAUSE_KEYS() returns an empty value, - on second call, HANGUPCAUSE_KEYS() returns two values, Is my expectation correct ? Best regards -------------- next part -------------- An HTML attachment was scrubbed... URL: <lists.digium.com/pipermail/asterisk-users/attachments/20171214/0fbbf70a/attachment.html>