<extension name="agent_status" number="*22" context="global" continue="false" app_uuid="2eb032c5-c79d-4096-ac90-8a47fe40f411" global="true" order="200">
	<condition field="destination_number" expression="^\*22$" break="on-true">
		<action application="set" data="agent_id=${sip_from_user}" enabled="true"/>
		<action application="set" data="agent_authorized=true" enabled="false"/>
		<action application="lua" data="app.lua agent_status" enabled="true"/>
	</condition>
	<condition field="destination_number" expression="^(?:agent\+|\*22)(.+)$">
		<action application="set" data="agent_id=$1" enabled="true"/>
		<action application="set" data="agent_name=$1" enabled="false"/>
		<action application="set" data="agent_authorized=true" enabled="false"/>
		<action application="lua" data="app.lua agent_status" enabled="true"/>
	</condition>
</extension>

