How to put dial b function in AGI

SipAddHeader questions should be considered academic, as you should not be using chan_sip. However, the way it works, it doesn’t need to be run on the B side channel, as it sets inheritable channel variables, which pass through to the B side when Dial creates the channel. That won’t work for the chan_pjsip equivalent.

Personally I wouldn’t make AGI my primary driver for control flow, and would use it to augment dialplan, not the other way round.