Continue in dialplan after hangup in confbridge?

Hi,

The Confbridge app sets a variable CONFBRIDGE_RESULT. This should be set to HANGUP when the participant drops from the conference by hanging up. I need to test for this, but I can’t get the channel to continue in the dialplan.

How do I do this? (asterisk-13.8-cert2)

Thanks,
Antonio

You do this in de h extension of the context where the participant enters the conference.

It should look like this (not tested so there might be a typo

exten => h, 1, NoOp(“dialplan is in h extension”)
exten => h, n, GotoIf($[ “${CONFBRIDGE_RESULT}” : “1”]?HANGUP,h,ok)
exten => h,n, NoOp("value of CONFBRIDGE_RESULT is not HANGUP) ; or whatever you want to happen
exten => h,n,NoOp(the value is " ${CONFBRIDGE_RESULT})
exten => h,n, Goto(h,end)
exten => h,n(ok), NoOp("value of CONFBRIDGE_RESULT is HANGUP) ; or whatever you want to happen
exten => h,n(end), NoOp(“this is the end”)

I’d recommend using a Hangup Handler to run your code after the channel is hung up.

https://wiki.asterisk.org/wiki/display/AST/Hangup+Handlers

This is a working example. I will check out the Hangup Handler pointer. There were some typos in my first version. The NoOp lines are just to generate cli output and can be deleted.

exten => h,1, NoOp(“dialplan is in h extension”)
exten => h,n, GotoIf($[ “${CONFBRIDGE_RESULT}” : “HANGUP”]?ok)
exten => h,n, NoOp("value of CONFBRIDGE_RESULT is not HANGUP) ; or whatever you want to happen
exten => h,n, NoOp(the value is " ${CONFBRIDGE_RESULT})
exten => h,n, Goto(h,end)
exten => h,n(ok), NoOp("value of CONFBRIDGE_RESULT is HANGUP) ; or whatever you want to happen
exten => h,n(end),NoOp(“this is the end”)