MQTT messages look just like asterisk’s database calls .
You can publish and subscribe to your broker in the dialplan with system calls.
Create a database family that matches your messages with values set to provide dialplan logic decisions on database calls matching subscriptions to the broker (analagously you can publish to the broker similarly on phone events for example have the lights flash red when your mother-in-law calls)