Код: Выделить всё
<extension name="внутренние-номера">
<condition field="destination_number" expression="^(\d{3}|\D{3,})$" require-nested="false" break="never">
<action application="set" data="dialed_extension=${destination_number}"/>
<action application="bind_meta_app" data="0 ab s execute_extension::att_xfer XML domainname"/>
<action application="bind_meta_app" data="1 ab s execute_extension::att_xfer2mobile XML domainname"/>
<action application="set" data="default_language=ru"/>
<action application="set" data="ringback=${ru-ring}"/>
<action application="set" data="transfer_ringback=/opt/freeswitch-1.2/sounds/company-sounds/holdmusic2.wav"/>
<action application="set" data="call_timeout=60"/>
<!-- <action application="set" data="sip_exclude_contact=${network_addr}"/> -->
<action application="set" data="hangup_after_bridge=true"/>
<action application="set" data="continue_on_fail=NORMAL_TEMPORARY_FAILURE,USER_BUSY,NO_ANSWER,TIMEOUT,USER_NOT_REGISTERED"/>
<!-- <action application="set" data="continue_on_fail=true"/> -->
<action application="hash" data="insert/${domain_name}-call_return/${dialed_extension}/${caller_id_number}"/>
<action application="hash" data="insert/${domain_name}-last_dial_ext/${dialed_extension}/${uuid}"/>
<action application="set" data="called_party_callgroup=${user_data(${dialed_extension}@${domain_name} var callgroup)}"/>
<action application="hash" data="insert/${domain_name}-last_dial_ext/${called_party_callgroup}/${uuid}"/>
<action application="hash" data="insert/${domain_name}-last_dial_ext/global/${uuid}"/>
<action application="hash" data="insert/${domain_name}-last_dial/${called_party_callgroup}/${uuid}"/>
<action application="bridge" data="user/${dialed_extension}@${domain_name}"/>
<action application="lua" data="mobile-redirector.lua get ${user_data(${dialed_extension}@${domain_name} attr id)}@${domain_name}"/>
<action application="log" data="info enabled=${cond(${enabled} == 1 ? true : false)} ${enabled}"/>
<!-- <condition field="${cond(${enabled} == 1 ? true : false)}" expression="^true$">-->
<action application="bridge" data="sofia/gateway/infolink-unlim/${forward_to}"/>
<!-- </condition>-->
</condition>
</extension>
Работает. Раскоментирую condition, не работает, has executed the last dialplan instruction, hanging up.
С inline переменные enabled, forward_to пустые.
Если напишу
Код: Выделить всё
<condition field="${enabled}" expression="^1$">
то так-же has executed the last dialplan instruction, hanging up.