You don’t want _X. in from-internal, that will be unpredictable. Use the dialplan hooks described here: