Channel remove itself from a GROUP()

Good Morning!

Is it possible for a channel to remove itself from a group?

exten => s,1,Set(GROUP(foo)=bar)

Then later on in the dialplan, remove the channel from its group while the channel is still active.

I tried various things like just setting GROUP()=“”, etc, with no luck, am I missing something obvious?

Thanks for any advice!

Bill

can you try this Set(GROUP(foo)=), when you try to clear it
as you need to clear the “foo” group

exten => s,1,NoOp(${GROUP_LIST()})
same => n,Set(GROUP(foo)=)
same => n,NoOp(${GROUP_LIST()})

https://wiki.asterisk.org/wiki/display/AST/Asterisk+20+Function_GROUP