VIDEOCHAT  ::   FAQ  ::   Поиск  ::   Регистрация  ::   Вход

Диалплан выполняет не те команды

Проблемы Asterisk без вэб-оболочек и их решения

Модераторы: april22, Zavr2008

Ответить
goffman
Сообщения: 7
Зарегистрирован: 03 мар 2016, 23:31

Диалплан выполняет не те команды

Сообщение goffman »

Всем привет! Столкнулся со странным поведением астера. Ситуация следующая - есть один сервак с астером (13.7.0), на нем 70 номеров сип и 70 ivr-ов. Все они имеют +- одинаковую структуру, отличие в приветствии и в названиях головых файлов. Вот пример одного:
PRIME_BBCODE_SPOILER_SHOW PRIME_BBCODE_SPOILER:
[ivr_findessaywriter.com_C]
WaitExten(2)

exten => 127959,1,Answer()
exten => 127959,n,Background(/home/record/customer/Salvatore/1_findessaywriter_salvatore)
exten => 127959,n,Background(/home/record/customer/Salvatore/2_after-the-greeting_salvatore)
exten => 127959,n,WaitExten(5)
exten => 127959,n,Background(/home/record/customer/Salvatore/3_please-make-your-choice_salvatore)
exten => 127959,n,WaitExten(7)
exten => 127959,n,Background(/home/record/customer/Salvatore/4_after-the-greeting-again_salvatore)
exten => 127959,n,WaitExten(5)
exten => 127959,n,Goto(PleaseHold_support_Salvatore,127959,1)

exten => 1,1,Goto(existing_support_Salvatore,127959,1)
exten => 2,1,Goto(new_sale_Salvatore,127959,1)
exten => 3,1,Goto(other_sale_Salvatore,127959,1)
exten => #,1,Goto(repeat_Salvatore,127959,1)
exten => 0,1,Goto(voicemail,127959,1)

exten => i,1,Background(/home/record/customer/Salvatore/12_please-choose-a-valid-option_salvatore)
exten => i,2,WaitExten(7)
exten => i,3,Background(/home/record/customer/Salvatore/4_after-the-greeting-again_salvatore)
exten => i,4,WaitExten(5)
exten => i,5,Goto(PleaseHold_support_Salvatore,127959,1)

[repeat_Salvatore]
exten => 127959,1,Wait(2)
exten => 127959,n,Answer()
exten => 127959,n,Background(/home/record/customer/Salvatore/4_after-the-greeting-again_salvatore)
exten => 127959,n,WaitExten(5)
exten => 127959,n,Background(/home/record/customer/Salvatore/3_please-make-your-choice_salvatore)
exten => 127959,n,WaitExten(7)
exten => 127959,n,Background(/home/record/customer/Salvatore/4_after-the-greeting-again_salvatore)
exten => 127959,n,WaitExten(5)
exten => 127959,n,Goto(PleaseHold_support_Salvatore,127959,1)

exten => 1,1,Goto(existing_support_Salvatore,127959,1)
exten => 2,1,Goto(new_sale_Salvatore,127959,1)
exten => 3,1,Goto(other_sale_Salvatore,127959,1)

exten => i,1,Background(/home/record/customer/Salvatore/12_please-choose-a-valid-option_salvatore)
exten => i,2,WaitExten(7)
exten => i,3,Background(/home/record/customer/Salvatore/4_after-the-greeting-again_salvatore)
exten => i,4,WaitExten(5)
exten => i,5,Goto(PleaseHold_support_Salvatore,127959,1)

[existing_support_Salvatore]
exten => 127959,1,Wait(2)
exten => 127959,n,Answer()
exten => 127959,n,Background(/home/record/customer/Salvatore/5_existing-customer_salvatore)
exten => 127959,n,WaitExten(5)
exten => 127959,n,Background(/home/record/customer/Salvatore/3_please-make-your-choice_salvatore)
exten => 127959,n,WaitExten(7)
exten => 127959,n,Background(/home/record/customer/Salvatore/6_existing-customer-again_salvatore)
exten => 127959,n,WaitExten(5)
exten => 127959,n,Goto(PleaseHold_support_Salvatore,127959,1)

exten => 1,1,Goto(PleaseHold_sale_Salvatore,127959,1)
exten => 2,1,Goto(PleaseHold_support_Salvatore,127959,1)
exten => 3,1,Goto(PleaseHold_billing_Salvatore,127959,1)
exten => 4,1,Goto(PleaseHold_support_Salvatore,127959,1)
exten => 0,1,Goto(repeat_Salvatore,127959,1)
exten => #,1,Goto(existing_support_Salvatore,127959,1)

exten => i,1,Background(/home/record/customer/Salvatore/12_please-choose-a-valid-option_salvatore)
exten => i,2,WaitExten(7)
exten => i,3,Background(/home/record/customer/Salvatore/6_existing-customer-again_salvatore)
exten => i,4,WaitExten(5)
exten => i,5,Goto(PleaseHold_support_Salvatore,127959,1)

[new_sale_Salvatore]
exten => 127959,1,Goto(PleaseHold_sale_Salvatore,127959,1)

[other_sale_Salvatore]
exten => 127959,1,Goto(PleaseHold_sale_Salvatore,127959,1)

[PleaseHold_support_Salvatore]
exten => 127959,1,Set(VOLUME(TX)=0)
exten => 127959,n,Set(VOLUME(RX)=0)
exten => 127959,n,Background(/home/record/customer/Salvatore/7_please-hold-while-we-connect-you-to-the-next-available-operator_salvatore)
exten => 127959,n,Set(VOLUME(TX)=5)
exten => 127959,n,Set(VOLUME(RX)=5)
exten => 127959,n,Set(CALLERID(name)=SUPPORT-findessaywriter)
exten => 127959,n,Queue(support,twW,,,15,,recording,support,${CALLERID(num)})
exten => 127959,n,Set(VOLUME(TX)=0)
exten => 127959,n,Set(VOLUME(RX)=0)
exten => 127959,n,Background(/home/record/customer/Salvatore/8_thank-you-for-holding--one-of-the-company-representatives-will-be-with-you-shortly_salvatore)
exten => 127959,n,Set(VOLUME(TX)=5)
exten => 127959,n,Set(VOLUME(RX)=5)
exten => 127959,n,Set(CALLERID(name)=SUPPORT-findessaywriter)
exten => 127959,n,Queue(support,twW,,,30,,recording,support,${CALLERID(num)})
exten => 127959,n,Set(VOLUME(TX)=0)
exten => 127959,n,Set(VOLUME(RX)=0)
exten => 127959,n,Background(/home/record/customer/Salvatore/9_due-to-the-high-volume-of-incoming-requests-all-operators-are-busy-at-the-moment_salvatore)
exten => 127959,n,Set(VOLUME(TX)=5)
exten => 127959,n,Set(VOLUME(RX)=5)
exten => 127959,n,Set(CALLERID(name)=SUPPORT-findessaywriter)
exten => 127959,n,Queue(support,twW,,,30,,recording,support,${CALLERID(num)})
exten => 127959,n,Set(VOLUME(TX)=0)
exten => 127959,n,Set(VOLUME(RX)=0)
exten => 127959,n,Background(/home/record/customer/Salvatore/10_unfortunately-we-are-not-able-to-process-your-inquiry_salvatore)
exten => 127959,n,VoiceMail(777@default,s)
exten => 127959,n,HangUp()

[PleaseHold_sale_Salvatore]
exten => 127959,1,Set(VOLUME(TX)=0)
exten => 127959,n,Set(VOLUME(RX)=0)
exten => 127959,n,Background(/home/record/customer/Salvatore/7_please-hold-while-we-connect-you-to-the-next-available-operator_salvatore)
exten => 127959,n,Set(VOLUME(TX)=5)
exten => 127959,n,Set(VOLUME(RX)=5)
exten => 127959,n,Set(CALLERID(name)=SALE-findessaywriter)
exten => 127959,n,Queue(sale,twW,,,15,,recording,sale,${CALLERID(num)})
exten => 127959,n,Set(VOLUME(TX)=0)
exten => 127959,n,Set(VOLUME(RX)=0)
exten => 127959,n,Background(/home/record/customer/Salvatore/8_thank-you-for-holding--one-of-the-company-representatives-will-be-with-you-shortly_salvatore)
exten => 127959,n,Set(VOLUME(TX)=5)
exten => 127959,n,Set(VOLUME(RX)=5)
exten => 127959,n,Set(CALLERID(name)=SALE-findessaywriter)
exten => 127959,n,Queue(support,twW,,,30,,recording,support,${CALLERID(num)})
exten => 127959,n,Set(VOLUME(TX)=0)
exten => 127959,n,Set(VOLUME(RX)=0)
exten => 127959,n,Background(/home/record/customer/Salvatore/9_due-to-the-high-volume-of-incoming-requests-all-operators-are-busy-at-the-moment_salvatore)
exten => 127959,n,Set(VOLUME(TX)=5)
exten => 127959,n,Set(VOLUME(RX)=5)
exten => 127959,n,Set(CALLERID(name)=SALE-findessaywriter)
exten => 127959,n,Queue(support,twW,,,30,,recording,support,${CALLERID(num)})
exten => 127959,n,Set(VOLUME(TX)=0)
exten => 127959,n,Set(VOLUME(RX)=0)
exten => 127959,n,Background(/home/record/customer/Salvatore/10_unfortunately-we-are-not-able-to-process-your-inquiry_salvatore)
exten => 127959,n,VoiceMail(777@default,s)
exten => 127959,n,HangUp()

[PleaseHold_billing_Salvatore]
exten => 127959,1,Set(VOLUME(TX)=0)
exten => 127959,n,Set(VOLUME(RX)=0)
exten => 127959,n,Background(/home/record/customer/Salvatore/7_please-hold-while-we-connect-you-to-the-next-available-operator_salvatore)
exten => 127959,n,Set(VOLUME(TX)=5)
exten => 127959,n,Set(VOLUME(RX)=5)
exten => 127959,n,Set(CALLERID(name)=BILLING-findessaywriter)
exten => 127959,n,Queue(billing_s,twW,,,15,,recording,billing_s,${CALLERID(num)})
exten => 127959,n,Set(VOLUME(TX)=0)
exten => 127959,n,Set(VOLUME(RX)=0)
exten => 127959,n,Background(/home/record/customer/Salvatore/8_thank-you-for-holding--one-of-the-company-representatives-will-be-with-you-shortly_salvatore)
exten => 127959,n,Set(VOLUME(TX)=5)
exten => 127959,n,Set(VOLUME(RX)=5)
exten => 127959,n,Set(CALLERID(name)=BILLING-findessaywriter)
exten => 127959,n,Queue(billing_s,twW,,,30,,recording,billing_s,${CALLERID(num)})
exten => 127959,n,Set(VOLUME(TX)=0)
exten => 127959,n,Set(VOLUME(RX)=0)
exten => 127959,n,Background(/home/record/customer/Salvatore/9_due-to-the-high-volume-of-incoming-requests-all-operators-are-busy-at-the-moment_salvatore)
exten => 127959,n,Set(VOLUME(TX)=5)
exten => 127959,n,Set(VOLUME(RX)=5)
exten => 127959,n,Set(CALLERID(name)=BILLING-findessaywriter)
exten => 127959,n,Queue(billing_s,twW,,,30,,recording,billing_s,${CALLERID(num)})
exten => 127959,n,Set(VOLUME(TX)=0)
exten => 127959,n,Set(VOLUME(RX)=0)
exten => 127959,n,Background(/home/record/customer/Salvatore/10_unfortunately-we-are-not-able-to-process-your-inquiry_salvatore)
exten => 127959,n,VoiceMail(777@default,s)
exten => 127959,n,HangUp()

[voicemail]
exten => 127959,1,Background(/home/record/customer/Salvatore/10_unfortunately-we-are-not-able-to-process-your-inquiry_salvatore)
exten => 127959,n,VoiceMail(777@default,s)
в качестве экстеншинов указаны номера транков, чтоб была уникальность в их нумерации. Проблема при переходе по пунктам меню. Вот кусок лога:
PRIME_BBCODE_SPOILER_SHOW PRIME_BBCODE_SPOILER:
Executing [s@incoming:16] Goto("SIP/phone.122091-00000001", "ivr_findessaywriter.com_C,127959,1") in new stack
-- Goto (ivr_findessaywriter.com_C,127959,1)
-- Executing [127959@ivr_findessaywriter.com_C:1] Answer("SIP/phone.122091-00000001", "") in new stack
-- Executing [127959@ivr_findessaywriter.com_C:2] BackGround("SIP/phone.122091-00000001", "/home/record/customer/Salvatore/1_findessaywriter_salvatore") in new stack
-- <SIP/phone.122091-00000001> Playing '/home/record/customer/Salvatore/1_findessaywriter_salvatore.ulaw' (language 'en')
> 0x7f9a2001a710 -- Probation passed - setting RTP source address to 72.1.47.174:39054
-- Executing [1@ivr_findessaywriter.com_C:1] Goto("SIP/phone.122091-00000001", "existing_support_Salvatore,127959,1") in new stack
-- Goto (existing_support_Salvatore,127959,1)
-- Executing [127959@existing_support_Salvatore:1] Wait("SIP/phone.122091-00000001", "2") in new stack
-- Executing [127959@existing_support_Salvatore:2] Answer("SIP/phone.122091-00000001", "") in new stack
-- Executing [127959@existing_support_Salvatore:3] BackGround("SIP/phone.122091-00000001", "/home/record/customer/Salvatore/5_existing-customer_salvatore") in new stack
-- <SIP/phone.122091-00000001> Playing '/home/record/customer/Salvatore/5_existing-customer_salvatore.ulaw' (language 'en')
-- Executing [2@existing_support_Salvatore:1] Goto("SIP/phone.122091-00000001", "PleaseHold_support_Salvatore,94231,1") in new stack
-- Goto (PleaseHold_support_Salvatore,94231,1)
-- Executing [94231@PleaseHold_support_Salvatore:1] Set("SIP/phone.122091-00000001", "VOLUME(TX)=0") in new stack
-- Executing [94231@PleaseHold_support_Salvatore:2] Set("SIP/phone.122091-00000001", "VOLUME(RX)=0") in new stack
-- Executing [94231@PleaseHold_support_Salvatore:3] BackGround("SIP/phone.122091-00000001", "/home/record/customer/Salvatore/7_please-hold-while-we-connect-you-to-the-next-available-operator_salvatore") in new stack
тут видно, что после нажатия "2" вызов переходит в сосершенно другой ivr Goto("SIP/phone.122091-00000001", "PleaseHold_support_Salvatore,94231,1"). От чего может быть такое поведение? Буду благодарен за любую помощь.
ded
Сообщения: 15628
Зарегистрирован: 26 авг 2010, 19:00

Re: Диалплан выполняет не те команды

Сообщение ded »

С точки зрения логики: чем отличаются контексты (кроме названия))?
[new_sale_Salvatore]
exten => 127959,1,Goto(PleaseHold_sale_Salvatore,127959,1)

[other_sale_Salvatore]
exten => 127959,1,Goto(PleaseHold_sale_Salvatore,127959,1)

У вас очень развесистая логика ветвления. Вы её для себя разрисуйте в виде блок-схемы, и проверяйте пошагово.
В командной строке проверяйте переходы командами
CLI> dialplan show 2@ivr_findessaywriter.com_C
и так далее.
goffman
Сообщения: 7
Зарегистрирован: 03 мар 2016, 23:31

Re: Диалплан выполняет не те команды

Сообщение goffman »

В этом плане согласен. Тут еще есть что оптимизировать. Уже обрисовал себе столько схем, и перепроверил все уйму раз.
goffman
Сообщения: 7
Зарегистрирован: 03 мар 2016, 23:31

Re: Диалплан выполняет не те команды

Сообщение goffman »

astr*CLI> dialplan show 2@ivr_findessaywriter.com_C
[ Context 'ivr_findessaywriter.com_C' created by 'pbx_config' ]
'2' => 1. Goto(new_sale_Salvatore,127959,1) [pbx_config]

-= 1 extension (1 priority) in 1 context. =-
astr*CLI> dialplan show 2@existing_support_Salvatore
[ Context 'existing_support_Salvatore' created by 'pbx_config' ]
'2' => 1. Goto(PleaseHold_support_Salvatore,94231,1) [pbx_config]
в общем все просто и сложно одновременно. астер хочет уникальность в определения контекстов.
Ответить
© 2008 — 2025 Asterisk.ru
Digium, Asterisk and AsteriskNOW are registered trademarks of Digium, Inc.
Design and development by PostMet-Netzwerk GmbH