freeswitchforum.com

Форум поддержки FreeSWITCH

FreeSWITCH is a registered trademark of Anthony Minessale. Official FreeSWITCH site.

Текущее время: 15 дек 2018 11:39

Часовой пояс: UTC + 4 часа




Начать новую тему Ответить на тему  [ Сообщений: 3 ] 
Автор Сообщение
СообщениеДобавлено: 29 ноя 2018 11:58 

Зарегистрирован: 17 окт 2018 21:32
Сообщения: 7
Доброго дня!
Вопрос в следующем: не работает перехват только внешних городских звонков. Лог перехвата выложу ниже..


Настройка directory:

<include>
<user id="776">
<params>
<param name="password" value="$${default_password}"/>
<param name="vm-password" value="776"/>
</params>
<variables>
<variable name="toll_allow" value="domestic,international,local"/>
<variable name="accountcode" value="776"/>
<variable name="user_context" value="outbound"/>
<!-- <variable name="effective_caller_id_name" value="776"/> -->
<variable name="effective_caller_id_number" value="776"/>
<variable name="outbound_caller_id_name" value="$${outbound_caller_name}"/>
<variable name="outbound_caller_id_number" value="$${outbound_caller_id}"/>
<variable name="callgroup" value="IT"/>
</variables>
</user>
</include>

Настройка исходящего dialplan/outbound.:

<!-- GROUP PICKUP -->

<extension name="group-intercept">
<condition field="destination_number" expression="^\**$">
<action application="set" data="intercept_unanswered_only=true"/>
<action application="set" data="called_party_callgroup=${user_data(${username}@${domain_name} var callgroup)}"/>
<action application="answer"/>
<action application="intercept" data="${db(select/last_dial/${called_party_callgroup}/${uuid})}"/>
<action application="sleep" data="2000"/>
</condition>
</extension>

<!-- LOCAL CALLS -->

<extension name="local_calls">
<condition field="destination_number" expression="^([1-9]\d\d)$">
<!-- call_Pickup --> <action application="set" data="called_party_callgroup=${user_data($1@${domain_name} var callgroup)}"/>
<!-- call_Pickup --> <action application="db" data="insert/last_dial/${called_party_callgroup}/${uuid}"/>
<action application="bridge" data="sofia/internal/$1%$${domain}"/>
</condition>
</extension>

Настройка входящего inbound:

<!-- LOCAL CALLS -->

<extension name="100-999">
<condition field="destination_number" expression="^([1-9]\d\d)$">
<!-- call_Pickup --> <action application="set" data="called_party_callgroup=${user_data($1@${domain_name} var callgroup)}"/>
<!-- call_Pickup --> <action application="db" data="insert/last_dial/${called_party_callgroup}/${uuid}"/>
<action application="bridge" data="sofia/internal/$1%$${domain}"/>
</condition>
</extension>


<!-- PSTN -IN- CALLS -->

<extension name="PSTN-trunk">
<condition field="destination_number" expression="^4770$">
<!-- call_Pickup --> <action application="set" data="called_party_callgroup=${user_data($1@${domain_name} var callgroup)}"/>
<!-- call_Pickup --> <action application="db" data="insert/last_dial/${called_party_callgroup}/${uuid}"/>
<action application="bridge" data="sofia/internal/776%$${domain}"/>
</condition>
</extension>




ЛОГ перехвата (номер 779 входит в группу) :

2018-11-29 08:47:29.092353 [INFO] mod_dialplan_xml.c:637 Processing IT Dept.03 <779>->** in context outbound
Dialplan: sofia/internal/779@192.168.100.252 parsing [outbound->test_bridging_conference] continue=false
Dialplan: sofia/internal/779@192.168.100.252 Regex (FAIL) [test_bridging_conference] destination_number(**) =~ /^(999)$/ break=on-false
Dialplan: sofia/internal/779@192.168.100.252 parsing [outbound->global] continue=true
Dialplan: sofia/internal/779@192.168.100.252 Regex (FAIL) [global] ${call_debug}(false) =~ /^true$/ break=never
Dialplan: sofia/internal/779@192.168.100.252 Absolute Condition [global]
Dialplan: sofia/internal/779@192.168.100.252 Action hash(insert/${domain_name}-spymap/${caller_id_number}/${uuid})
Dialplan: sofia/internal/779@192.168.100.252 Action hash(insert/${domain_name}-spymap/${destination_number}/${uuid})
Dialplan: sofia/internal/779@192.168.100.252 Action hash(insert/${domain_name}-last_dial/${caller_id_number}/${destination_number})
Dialplan: sofia/internal/779@192.168.100.252 Action hash(insert/${domain_name}-last_dial/global/${uuid})
Dialplan: sofia/internal/779@192.168.100.252 Action export(RFC2822_DATE=${strftime(%a, %d %b %Y %T %z)})
Dialplan: sofia/internal/779@192.168.100.252 parsing [outbound->eavesdrop] continue=false
Dialplan: sofia/internal/779@192.168.100.252 Regex (FAIL) [eavesdrop] destination_number(**) =~ /^88(\d{3})$|^\*0(.*)$/ break=on-false
Dialplan: sofia/internal/779@192.168.100.252 parsing [outbound->group-intercept] continue=false
Dialplan: sofia/internal/779@192.168.100.252 Regex (PASS) [group-intercept] destination_number(**) =~ /^\**$/ break=on-false
Dialplan: sofia/internal/779@192.168.100.252 Action set(intercept_unanswered_only=true)
Dialplan: sofia/internal/779@192.168.100.252 Action set(called_party_callgroup=${user_data(${username}@${domain_name} var callgroup)})
Dialplan: sofia/internal/779@192.168.100.252 Action answer()
Dialplan: sofia/internal/779@192.168.100.252 Action intercept(${db(select/last_dial/${called_party_callgroup}/${uuid})})
Dialplan: sofia/internal/779@192.168.100.252 Action sleep(2000)
2018-11-29 08:47:29.092353 [DEBUG] switch_core_state_machine.c:286 (sofia/internal/779@192.168.100.252) State Change CS_ROUTING -> CS_EXECUTE
2018-11-29 08:47:29.092353 [DEBUG] switch_core_state_machine.c:643 (sofia/internal/779@192.168.100.252) State ROUTING going to sleep
2018-11-29 08:47:29.092353 [DEBUG] switch_core_state_machine.c:584 (sofia/internal/779@192.168.100.252) Running State Change CS_EXECUTE (Cur 3 Tot 140)
2018-11-29 08:47:29.092353 [DEBUG] switch_core_state_machine.c:650 (sofia/internal/779@192.168.100.252) State EXECUTE
2018-11-29 08:47:29.092353 [DEBUG] mod_sofia.c:198 sofia/internal/779@192.168.100.252 SOFIA EXECUTE
2018-11-29 08:47:29.092353 [DEBUG] switch_core_state_machine.c:328 sofia/internal/779@192.168.100.252 Standard EXECUTE
EXECUTE sofia/internal/779@192.168.100.252 hash(insert/192.168.100.252-spymap/779/46ea3a7d-cecd-420c-bad5-995b03b97927)
EXECUTE sofia/internal/779@192.168.100.252 hash(insert/192.168.100.252-spymap/**/46ea3a7d-cecd-420c-bad5-995b03b97927)
EXECUTE sofia/internal/779@192.168.100.252 hash(insert/192.168.100.252-last_dial/779/**)
EXECUTE sofia/internal/779@192.168.100.252 hash(insert/192.168.100.252-last_dial/global/46ea3a7d-cecd-420c-bad5-995b03b97927)
EXECUTE sofia/internal/779@192.168.100.252 export(RFC2822_DATE=Thu, 29 Nov 2018 08:47:29 +0300)
2018-11-29 08:47:29.092353 [DEBUG] switch_channel.c:1296 EXPORT (export_vars) [RFC2822_DATE]=[Thu, 29 Nov 2018 08:47:29 +0300]
EXECUTE sofia/internal/779@192.168.100.252 set(intercept_unanswered_only=true)
2018-11-29 08:47:29.092353 [DEBUG] mod_dptools.c:1548 SET sofia/internal/779@192.168.100.252 [intercept_unanswered_only]=[true]
EXECUTE sofia/internal/779@192.168.100.252 set(called_party_callgroup=IT)
2018-11-29 08:47:29.092353 [DEBUG] mod_dptools.c:1548 SET sofia/internal/779@192.168.100.252 [called_party_callgroup]=[IT]
EXECUTE sofia/internal/779@192.168.100.252 answer()
2018-11-29 08:47:29.092353 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [PCMU:0:8000:20:64000:1]/[opus:116:48000:20:0:1]
2018-11-29 08:47:29.092353 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [PCMU:0:8000:20:64000:1]/[G722:9:8000:20:64000:1]
2018-11-29 08:47:29.092353 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [PCMU:0:8000:20:64000:1]/[PCMU:0:8000:20:64000:1]
2018-11-29 08:47:29.092353 [DEBUG] switch_core_media.c:4504 Audio Codec Compare [PCMU:0:8000:20:64000:1] ++++ is saved as a match
2018-11-29 08:47:29.092353 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [PCMU:0:8000:20:64000:1]/[PCMA:8:8000:20:64000:1]
2018-11-29 08:47:29.092353 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [PCMA:8:8000:20:64000:1]/[opus:116:48000:20:0:1]
2018-11-29 08:47:29.092353 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [PCMA:8:8000:20:64000:1]/[G722:9:8000:20:64000:1]
2018-11-29 08:47:29.092353 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [PCMA:8:8000:20:64000:1]/[PCMU:0:8000:20:64000:1]
2018-11-29 08:47:29.092353 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [PCMA:8:8000:20:64000:1]/[PCMA:8:8000:20:64000:1]
2018-11-29 08:47:29.092353 [DEBUG] switch_core_media.c:4504 Audio Codec Compare [PCMA:8:8000:20:64000:1] ++++ is saved as a match
2018-11-29 08:47:29.092353 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [G723:4:8000:20:6300:1]/[opus:116:48000:20:0:1]
2018-11-29 08:47:29.092353 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [G723:4:8000:20:6300:1]/[G722:9:8000:20:64000:1]
2018-11-29 08:47:29.092353 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [G723:4:8000:20:6300:1]/[PCMU:0:8000:20:64000:1]
2018-11-29 08:47:29.092353 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [G723:4:8000:20:6300:1]/[PCMA:8:8000:20:64000:1]
2018-11-29 08:47:29.092353 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [G729:18:8000:20:8000:1]/[opus:116:48000:20:0:1]
2018-11-29 08:47:29.092353 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [G729:18:8000:20:8000:1]/[G722:9:8000:20:64000:1]
2018-11-29 08:47:29.092353 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [G729:18:8000:20:8000:1]/[PCMU:0:8000:20:64000:1]
2018-11-29 08:47:29.092353 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [G729:18:8000:20:8000:1]/[PCMA:8:8000:20:64000:1]
2018-11-29 08:47:29.092353 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [G722:9:8000:20:64000:1]/[opus:116:48000:20:0:1]
2018-11-29 08:47:29.092353 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [G722:9:8000:20:64000:1]/[G722:9:8000:20:64000:1]
2018-11-29 08:47:29.092353 [DEBUG] switch_core_media.c:4504 Audio Codec Compare [G722:9:8000:20:64000:1] ++++ is saved as a match
2018-11-29 08:47:29.092353 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [G722:9:8000:20:64000:1]/[PCMU:0:8000:20:64000:1]
2018-11-29 08:47:29.092353 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [G722:9:8000:20:64000:1]/[PCMA:8:8000:20:64000:1]
2018-11-29 08:47:29.092353 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [iLBC:97:8000:20:0:1]/[opus:116:48000:20:0:1]
2018-11-29 08:47:29.092353 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [iLBC:97:8000:20:0:1]/[G722:9:8000:20:64000:1]
2018-11-29 08:47:29.092353 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [iLBC:97:8000:20:0:1]/[PCMU:0:8000:20:64000:1]
2018-11-29 08:47:29.092353 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [iLBC:97:8000:20:0:1]/[PCMA:8:8000:20:64000:1]
2018-11-29 08:47:29.092353 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [G726-32:2:8000:20:0:1]/[opus:116:48000:20:0:1]
2018-11-29 08:47:29.092353 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [G726-32:2:8000:20:0:1]/[G722:9:8000:20:64000:1]
2018-11-29 08:47:29.092353 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [G726-32:2:8000:20:0:1]/[PCMU:0:8000:20:64000:1]
2018-11-29 08:47:29.092353 [DEBUG] switch_core_media.c:4449 Audio Codec Compare [G726-32:2:8000:20:0:1]/[PCMA:8:8000:20:64000:1]
2018-11-29 08:47:29.092353 [DEBUG] switch_core_media.c:4365 Set telephone-event payload to 101@8000
2018-11-29 08:47:29.092353 [DEBUG] switch_core_media.c:3061 Set Codec sofia/internal/779@192.168.100.252 PCMU/8000 20 ms 160 samples 64000 bits 1 channels
2018-11-29 08:47:29.092353 [DEBUG] switch_core_codec.c:111 sofia/internal/779@192.168.100.252 Original read codec set to PCMU:0
2018-11-29 08:47:29.092353 [DEBUG] switch_core_media.c:4708 Set telephone-event payload to 101@8000
2018-11-29 08:47:29.092353 [DEBUG] switch_core_media.c:4767 sofia/internal/779@192.168.100.252 Set 2833 dtmf send payload to 101 recv payload to 101
2018-11-29 08:47:29.092353 [DEBUG] switch_core_media.c:6878 AUDIO RTP [sofia/internal/779@192.168.100.252] 192.168.100.252 port 20648 -> 192.168.40.41 port 5016 codec: 0 ms: 20
2018-11-29 08:47:29.092353 [DEBUG] switch_rtp.c:4137 Starting timer [soft] 160 bytes per 20ms
2018-11-29 08:47:29.092353 [DEBUG] switch_core_media.c:7180 sofia/internal/779@192.168.100.252 Set 2833 dtmf send payload to 101
2018-11-29 08:47:29.092353 [DEBUG] switch_core_media.c:7187 sofia/internal/779@192.168.100.252 Set 2833 dtmf receive payload to 101
2018-11-29 08:47:29.092353 [DEBUG] switch_core_media.c:7210 sofia/internal/779@192.168.100.252 Set rtp dtmf delay to 40
2018-11-29 08:47:29.092353 [NOTICE] sofia_media.c:92 Pre-Answer sofia/internal/779@192.168.100.252!
2018-11-29 08:47:29.092353 [DEBUG] switch_channel.c:3474 (sofia/internal/779@192.168.100.252) Callstate Change RINGING -> EARLY
2018-11-29 08:47:29.092353 [DEBUG] switch_core_media.c:6861 Audio params are unchanged for sofia/internal/779@192.168.100.252.
2018-11-29 08:47:29.092353 [DEBUG] mod_sofia.c:850 Local SDP sofia/internal/779@192.168.100.252:
v=0
o=FreeSWITCH 1543449801 1543449802 IN IP4 192.168.100.252
s=FreeSWITCH
c=IN IP4 192.168.100.252
t=0 0
m=audio 20648 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv

2018-11-29 08:47:29.092353 [DEBUG] sofia.c:7084 Channel sofia/internal/779@192.168.100.252 entering state [completed][200]
2018-11-29 08:47:29.092353 [NOTICE] mod_dptools.c:1312 Channel [sofia/internal/779@192.168.100.252] has been answered
2018-11-29 08:47:29.131937 [DEBUG] switch_channel.c:3773 (sofia/internal/779@192.168.100.252) Callstate Change EARLY -> ACTIVE
EXECUTE sofia/internal/779@192.168.100.252 intercept(9d919b0e-d21e-4e3f-97f3-ae522a5fdfd0)
2018-11-29 08:47:29.131937 [DEBUG] switch_ivr_bridge.c:2093 no uuid 9d919b0e-d21e-4e3f-97f3-ae522a5fdfd0
EXECUTE sofia/internal/779@192.168.100.252 sleep(2000)
2018-11-29 08:47:29.251413 [DEBUG] sofia.c:7084 Channel sofia/internal/779@192.168.100.252 entering state [ready][200]
2018-11-29 08:47:29.511466 [DEBUG] switch_rtp.c:7308 Correct audio ip/port confirmed.
2018-11-29 08:47:31.151443 [NOTICE] switch_core_state_machine.c:385 sofia/internal/779@192.168.100.252 has executed the last dialplan instruction, hanging up.
2018-11-29 08:47:31.151443 [NOTICE] switch_core_state_machine.c:387 Hangup sofia/internal/779@192.168.100.252 [CS_EXECUTE] [NORMAL_CLEARING]
2018-11-29 08:47:31.151443 [DEBUG] switch_core_state_machine.c:6
50 (sofia/internal/779@192.168.100.252) State EXECUTE going to sleep
2018-11-29 08:47:31.151443 [DEBUG] switch_core_state_machine.c:584 (sofia/internal/779@192.168.100.252) Running State Change CS_HANGUP (Cur 3 Tot 140)
2018-11-29 08:47:31.151443 [DEBUG] switch_core_state_machine.c:850 (sofia/internal/779@192.168.100.252) Callstate Change ACTIVE -> HANGUP
2018-11-29 08:47:31.151443 [DEBUG] switch_core_state_machine.c:852 (sofia/internal/779@192.168.100.252) State HANGUP
2018-11-29 08:47:31.151443 [DEBUG] mod_sofia.c:438 Channel sofia/internal/779@192.168.100.252 hanging up, cause: NORMAL_CLEARING
2018-11-29 08:47:31.151443 [DEBUG] mod_sofia.c:491 Sending BYE to sofia/internal/779@192.168.100.252
2018-11-29 08:47:31.151443 [DEBUG] switch_core_state_machine.c:60 sofia/internal/779@192.168.100.252 Standard HANGUP, cause: NORMAL_CLEARING
2018-11-29 08:47:31.151443 [DEBUG] switch_core_state_machine.c:852 (sofia/internal/779@192.168.100.252) State HANGUP going to sleep
2018-11-29 08:47:31.151443 [DEBUG] switch_core_state_machine.c:619 (sofia/internal/779@192.168.100.252) State Change CS_HANGUP -> CS_REPORTING
2018-11-29 08:47:31.151443 [DEBUG] switch_core_state_machine.c:584 (sofia/internal/779@192.168.100.252) Running State Change CS_REPORTING (Cur 3 Tot 140)
2018-11-29 08:47:31.151443 [DEBUG] switch_core_state_machine.c:938 (sofia/internal/779@192.168.100.252) State REPORTING
2018-11-29 08:47:31.151443 [DEBUG] switch_core_state_machine.c:174 sofia/internal/779@192.168.100.252 Standard REPORTING, cause: NORMAL_CLEARING
2018-11-29 08:47:31.151443 [DEBUG] switch_core_state_machine.c:938 (sofia/internal/779@192.168.100.252) State REPORTING going to sleep
2018-11-29 08:47:31.151443 [DEBUG] switch_core_state_machine.c:610 (sofia/internal/779@192.168.100.252) State Change CS_REPORTING -> CS_DESTROY
2018-11-29 08:47:31.151443 [DEBUG] switch_core_session.c:1665 Session 140 (sofia/internal/779@192.168.100.252) Locked, Waiting on external entities
2018-11-29 08:47:31.151443 [NOTICE] switch_core_session.c:1683 Session 140 (sofia/internal/779@192.168.100.252) Ended
2018-11-29 08:47:31.151443 [NOTICE] switch_core_session.c:1687 Close Channel sofia/internal/779@192.168.100.252 [CS_DESTROY]
2018-11-29 08:47:31.151443 [DEBUG] switch_core_state_machine.c:741 (sofia/internal/779@192.168.100.252) Running State Change CS_DESTROY (Cur 2 Tot 140)
2018-11-29 08:47:31.151443 [DEBUG] switch_core_state_machine.c:751 (sofia/internal/779@192.168.100.252) State DESTROY
2018-11-29 08:47:31.151443 [DEBUG] mod_sofia.c:343 sofia/internal/779@192.168.100.252 SOFIA DESTROY
2018-11-29 08:47:31.151443 [DEBUG] switch_core_state_machine.c:181 sofia/internal/779@192.168.100.252 Standard DESTROY
2018-11-29 08:47:31.151443 [DEBUG] switch_core_state_machine.c:751 (sofia/internal/779@192.168.100.252) State DESTROY going to sleep


Вернуться к началу
 Профиль  
 
СообщениеДобавлено: 29 ноя 2018 12:35 

Зарегистрирован: 17 окт 2018 21:32
Сообщения: 7
я так понимаю что все проблемы начинаются после строчки:
2018-11-29 08:47:29.131937 [DEBUG] switch_ivr_bridge.c:2093 no uuid 9d919b0e-d21e-4e3f-97f3-ae522a5fdfd0


Вернуться к началу
 Профиль  
 
СообщениеДобавлено: 30 ноя 2018 12:35 
FreeSWITCH_GuRu

Зарегистрирован: 22 авг 2012 09:52
Сообщения: 1531
видимо из-за того что
Код:
<action application="intercept" data="${db(select/last_dial/${called_party_callgroup}/${uuid})}"/>
в ${uuid} будет содержаться совсем другой id канала

_________________
Мобильные РФ 1.2 руб./мин. + НДС с посекундной тарификацией, CLI
Telegram: @rostel


Вернуться к началу
 Профиль  
 
Показать сообщения за:  Поле сортировки  
Начать новую тему Ответить на тему  [ Сообщений: 3 ] 

Часовой пояс: UTC + 4 часа


Кто сейчас на конференции

Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 2


Вы не можете начинать темы
Вы не можете отвечать на сообщения
Вы не можете редактировать свои сообщения
Вы не можете удалять свои сообщения
Вы не можете добавлять вложения

Найти:
Перейти:  
cron
Powered by phpBB® Forum Software © phpBB Group
Русская поддержка phpBB