Why SET CONTEXT returns 0?

The ‘set context’ AGI command always returns a hardcoded 0:

        ast_channel_context_set(chan, argv[2]);
        ast_agi_send(agi->fd, chan, "200 result=0\n");

while the ‘set variable’ AGI command always returns a hardcoded 1:

        pbx_builtin_setvar_helper(chan, argv[2], argv[3]);
        ast_agi_send(agi->fd, chan, "200 result=1\n");

This seems inconsistent :slight_smile:

Any clues on these design decisions?

Nope. It’s many many years old, and may not have even really been a conscious decision at the time.