Клиент звонит менеджеру на рабочий телефон, если менеджер не отвечает в течении 15сек. идет перенаправление на мобильный номер менеджера.
Опирался на эту информацию<include>
<user id="100">
<params>
<param name="password" value="$${default_password}"/>
<param name="vm-password" value="100"/>
</params>
<variables>
<variable name="toll_allow" value="test,international"/>
<variable name="accountcode" value="100"/>
<variable name="user_context" value="default"/>
<variable name="effective_caller_id_name" value="100"/>
<variable name="effective_caller_id_number" value="100"/>
<variable name="outbound_caller_id_name" value="89083243244"/>
<variable name="outbound_caller_id_number" value="89083243244"/>
<!-- <variable name="mobile_number" value="89083243244"/> -->
</variables>
</user>
</include>
<extension name="test">
<condition field="destination_number" expression="^(100)$">
<!--<action application="bridge" data="{leg_timeout=15}user/$1@${domain_name}"/> -->
<!-- <action application="set" data="hangup_after_bridge=true"/> -->
<action application="set" data="effective_caller_id_name=${user_data($1@${domain_name} var outbound_caller_id_name)}"/>
<action application="set" data="effective_caller_id_number=${user_data($1@${domain_number} var outbound_caller_id_number)}"/>
<!-- <action application="transfer" data="${user_data $1 var mobile_number} XML default"/>-->
<action application="bridge" data="sofia/gateway/gw-ross/$1"/>
</condition>
</extension>
Лог
Dialplan: sofia/internal/007@192.168.2.27 Action set(effective_caller_id_name=${user_data(100@${domain_name} var outbound_caller_id_name)})
Dialplan: sofia/internal/007@192.168.2.27 Action set(effective_caller_id_number=${user_data(100@${domain_number} var outbound_caller_id_number)})
Dialplan: sofia/internal/007@192.168.2.27 Action bridge(sofia/gateway/gw-ross/100)
2018-12-20 16:14:54.347261 [DEBUG] switch_core_state_machine.c:286 (sofia/internal/007@192.168.2.27) State Change CS_ROUTING -> CS_EXECUTE
2018-12-20 16:14:54.347261 [DEBUG] switch_core_state_machine.c:643 (sofia/internal/007@192.168.2.27) State ROUTING going to sleep
2018-12-20 16:14:54.347261 [DEBUG] switch_core_state_machine.c:584 (sofia/internal/007@192.168.2.27) Running State Change CS_EXECUTE (Cur 9 Tot 55391)
2018-12-20 16:14:54.347261 [DEBUG] switch_core_state_machine.c:650 (sofia/internal/007@192.168.2.27) State EXECUTE
2018-12-20 16:14:54.347261 [DEBUG] mod_sofia.c:198 sofia/internal/007@192.168.2.27 SOFIA EXECUTE
2018-12-20 16:14:54.347261 [DEBUG] switch_core_state_machine.c:328 sofia/internal/007@192.168.2.27 Standard EXECUTE
EXECUTE sofia/internal/007@192.168.2.27 set(open=true)
2018-12-20 16:14:54.347261 [DEBUG] mod_dptools.c:1548 SET sofia/internal/007@192.168.2.27 [open]=[true]
EXECUTE sofia/internal/007@192.168.2.27 hash(insert/192.168.2.27-spymap/007/7a68043c-0448-11e9-9f1a-55dc8a9745a6)
EXECUTE sofia/internal/007@192.168.2.27 hash(insert/192.168.2.27-last_dial/007/100)
EXECUTE sofia/internal/007@192.168.2.27 hash(insert/192.168.2.27-last_dial/global/7a68043c-0448-11e9-9f1a-55dc8a9745a6)
EXECUTE sofia/internal/007@192.168.2.27 set(domain_name=192.168.2.27)
2018-12-20 16:14:54.347261 [DEBUG] mod_dptools.c:1548 SET sofia/internal/007@192.168.2.27 [domain_name]=[192.168.2.27]
EXECUTE sofia/internal/007@192.168.2.27 export(RFC2822_DATE=Thu, 20 Dec 2018 16:14:54 +0500)
2018-12-20 16:14:54.347261 [DEBUG] switch_channel.c:1296 EXPORT (export_vars) [RFC2822_DATE]=[Thu, 20 Dec 2018 16:14:54 +0500]
EXECUTE sofia/internal/007@192.168.2.27 set(effective_caller_id_name=89083243244)
2018-12-20 16:14:54.347261 [DEBUG] mod_dptools.c:1548 SET sofia/internal/007@192.168.2.27 [effective_caller_id_name]=[89083243244]
EXECUTE sofia/internal/007@192.168.2.27 set(effective_caller_id_number=)
2018-12-20 16:14:54.347261 [DEBUG] mod_dptools.c:1548 SET sofia/internal/007@192.168.2.27 [effective_caller_id_number]=[UNDEF]
EXECUTE sofia/internal/007@192.168.2.27 bridge(sofia/gateway/gw-ross/100)
Почему id_name видит а id_number нет?