Сообщение
dos » 25 сен 2019, 15:03
при входящем на внешний номер уходим в данный стандартный контекст и устанавливаем переменные
[from-trunk]
exten => 780000000,1,SET(__FROM=${CALLERID(num)})
exten => 780000000,n,SET(__LINE=7897987987987)
exten => 780000000,n,SET(__BXDIAL=start)
далее стандартно по контексту
далее идет
[macro-dialout-one-predial-hook]
include => my-card
exten => s,1,SET(BXTYPEDIAL=ONEDIAL)
[card]
exten => s,n,GotoIf($["${CALL_ID}" = ""]?bitrixstart,1)
exten => s,n,ExecIf($["${BXTYPEDIAL}" = "RINGALL"]?AGI(bx/trunk.php,BXDIAL=SHOWCARD,CALL_ID=${CALL_ID},CASE=GROUP,EXTEN=${GROUPBX}))
exten => s,n,ExecIf($["${BXTYPEDIAL}" = "ONEDIAL"]?AGI(bx/trunk.php,BXDIAL=SHOWCARD,CALL_ID=${CALL_ID},CASE=EXTEN,EXTEN=${EXTTOCALL}))
exten => bitrixstart,1,GotoIf($["${BXTYPEDIAL}" = "ONEDIAL"]?bxstartexten,1)
exten => bitrixstart,n,GotoIf($["${BXTYPEDIAL}" = "RINGALL"]?bxstartgroup,1)
exten => bxstartexten,1,ExecIf($["${CRM_DIRECTION}" = "INBOUND" ]?AGI(bx/trunk.php,FROM=${FROM},TO=${EXTTOCALL},LINE=${LINE},BXDIAL=start,TYPE=2))
exten => bxstartexten,n,AGI(bx/trunk.php,BXDIAL=SHOWCARD,CALL_ID=${CALL_ID},CASE=EXTEN,EXTEN=${TOBX})
exten => bxstartgroup,1,ExecIf($["${CRM_DIRECTION}" = "INBOUND" ]?AGI(bx/trunk.php,BXDIAL=GETASSIGNEDBX,EXTEN=${NODEST}))
exten => bxstartgroup,n,ExecIf($["${CRM_DIRECTION}" = "INBOUND" ]?AGI(bx/trunk.php,FROM=${FROM},TO=${ASSIGNEDGROUPBX},LINE=${LINE},BXDIAL=start)
exten => bxstartgroup,n,AGI(bx/trunk.php,BXDIAL=SHOWCARD,CALL_ID=${CALL_ID},CASE=GROUP,EXTEN=${GROUPBX})
[2019-09-25 15:40:20] VERBOSE[11417][C-00000033] pbx.c: Executing [999@from-internal:1] GotoIf("SIP/120-0000006a", "1?ext-local,999,1:followme-che
[2019-09-25 15:40:20] VERBOSE[11417][C-00000033] pbx_builtins.c: Goto (ext-local,999,1)
[2019-09-25 15:40:20] VERBOSE[11417][C-00000033] pbx.c: Executing [999@ext-local:1] Set("SIP/120-0000006a", "__RINGTIMER=15") in new stack
[2019-09-25 15:40:20] VERBOSE[11417][C-00000033] pbx.c: Executing [999@ext-local:2] Macro("SIP/120-0000006a", "exten-vm,novm,999,0,0,0") in new st
[2019-09-25 15:40:20] VERBOSE[11417][C-00000033] pbx.c: Executing [s@macro-exten-vm:1] Macro("SIP/120-0000006a", "user-callerid,") in new stack
[2019-09-25 15:40:20] VERBOSE[11417][C-00000033] pbx.c: Executing [s@macro-user-callerid:1] Set("SIP/120-0000006a", "TOUCH_MONITOR=1569408020.112"
[2019-09-25 15:40:20] VERBOSE[11417][C-00000033] pbx.c: Executing [s@macro-user-callerid:2] Set("SIP/120-0000006a", "AMPUSER=120") in new stack
[2019-09-25 15:40:20] VERBOSE[11417][C-00000033] pbx.c: Executing [s@macro-user-callerid:3] GotoIf("SIP/120-0000006a", "0?report") in new stack
[2019-09-25 15:40:20] VERBOSE[11417][C-00000033] pbx.c: Executing [s@macro-user-callerid:4] ExecIf("SIP/120-0000006a", "1?Set(REALCALLERIDNUM=120)
[2019-09-25 15:40:20] VERBOSE[11417][C-00000033] pbx.c: Executing [s@macro-user-callerid:5] Set("SIP/120-0000006a", "AMPUSER=120") in new stack
[2019-09-25 15:40:20] VERBOSE[11417][C-00000033] pbx.c: Executing [s@macro-user-callerid:6] GotoIf("SIP/120-0000006a", "0?limit") in new stack
[2019-09-25 15:40:20] VERBOSE[11417][C-00000033] pbx.c: Executing [s@macro-user-callerid:7] Set("SIP/120-0000006a", "AMPUSERCIDNAME=Юниторг") in n
[2019-09-25 15:40:20] VERBOSE[11417][C-00000033] pbx.c: Executing [s@macro-user-callerid:8] ExecIf("SIP/120-0000006a", "0?Set(__CIDMASQUERADING=TR
[2019-09-25 15:40:20] VERBOSE[11417][C-00000033] pbx.c: Executing [s@macro-user-callerid:9] GotoIf("SIP/120-0000006a", "0?report") in new stack
[2019-09-25 15:40:20] VERBOSE[11417][C-00000033] pbx.c: Executing [s@macro-user-callerid:10] Set("SIP/120-0000006a", "AMPUSERCID=120") in new stac
[2019-09-25 15:40:20] VERBOSE[11417][C-00000033] pbx.c: Executing [s@macro-user-callerid:11] Set("SIP/120-0000006a", "__DIAL_OPTIONS=HhTtrU(bx-ans
[2019-09-25 15:40:20] VERBOSE[11417][C-00000033] pbx.c: Executing [s@macro-user-callerid:12] Set("SIP/120-0000006a", "CALLERID(all)="Юниторг" <120
[2019-09-25 15:40:20] VERBOSE[11417][C-00000033] pbx.c: Executing [s@macro-user-callerid:13] GotoIf("SIP/120-0000006a", "0?limit") in new stack
[2019-09-25 15:40:20] VERBOSE[11417][C-00000033] pbx.c: Executing [s@macro-user-callerid:14] ExecIf("SIP/120-0000006a", "0?Set(GROUP(concurrency_l
[2019-09-25 15:40:20] VERBOSE[11417][C-00000033] pbx.c: Executing [s@macro-user-callerid:15] ExecIf("SIP/120-0000006a", "1?Set(CHANNEL(language)=r
[2019-09-25 15:40:20] VERBOSE[11417][C-00000033] pbx.c: Executing [s@macro-user-callerid:16] NoOp("SIP/120-0000006a", "Macro Depth is 2") in new s
[2019-09-25 15:40:20] VERBOSE[11417][C-00000033] pbx.c: Executing [s@macro-user-callerid:17] GotoIf("SIP/120-0000006a", "1?report2:macroerror") in
[2019-09-25 15:40:20] VERBOSE[11417][C-00000033] pbx_builtins.c: Goto (macro-user-callerid,s,18)
[2019-09-25 15:40:20] VERBOSE[11417][C-00000033] pbx.c: Executing [s@macro-user-callerid:18] GotoIf("SIP/120-0000006a", "0?continue") in new stack
[2019-09-25 15:40:20] VERBOSE[11417][C-00000033] pbx.c: Executing [s@macro-user-callerid:19] ExecIf("SIP/120-0000006a", "1?Set(__CALLEE_ACCOUNCODE
[2019-09-25 15:40:20] VERBOSE[11417][C-00000033] pbx.c: Executing [s@macro-user-callerid:20] Set("SIP/120-0000006a", "__TTL=64") in new stack
[2019-09-25 15:40:20] VERBOSE[11417][C-00000033] pbx.c: Executing [s@macro-user-callerid:21] GotoIf("SIP/120-0000006a", "1?continue") in new stack
[2019-09-25 15:40:20] VERBOSE[11417][C-00000033] pbx_builtins.c: Goto (macro-user-callerid,s,37)
...............
[2019-09-25 15:40:21] VERBOSE[11417][C-00000033] pbx.c: Executing [s@macro-dialout-one-predial-hook:1] Set("SIP/120-0000006a", "BXTYPEDIAL=ONEDIAL
[2019-09-25 15:40:21] VERBOSE[11417][C-00000033] pbx.c: Executing [s@macro-dialout-one-predial-hook:2] GotoIf("SIP/120-0000006a", "1?bitrixstart,1
[2019-09-25 15:40:21] VERBOSE[11417][C-00000033] pbx_builtins.c: Goto (macro-dialout-one-predial-hook,bitrixstart,1)
[2019-09-25 15:40:21] VERBOSE[11417][C-00000033] pbx.c: Executing [bitrixstart@macro-dialout-one-predial-hook:1] GotoIf("SIP/120-0000006a", "1?bxs
[2019-09-25 15:40:21] VERBOSE[11417][C-00000033] pbx_builtins.c: Goto (macro-dialout-one-predial-hook,bxstartexten,1)
[2019-09-25 15:40:21] VERBOSE[11417][C-00000033] pbx.c: Executing [bxstartexten@macro-dialout-one-predial-hook:1] ExecIf("SIP/120-0000006a", "0?AG
[2019-09-25 15:40:21] VERBOSE[11417][C-00000033] pbx.c: Executing [bxstartexten@macro-dialout-one-predial-hook:2] AGI("SIP/120-0000006a", "bx/trun
[2019-09-25 15:40:21] VERBOSE[11417][C-00000033] res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/bx/trunk.php
[2019-09-25 15:40:21] VERBOSE[11418][C-00000033] app_mixmonitor.c: Begin MixMonitor Recording SIP/120-0000006a
[2019-09-25 15:40:21] VERBOSE[11417][C-00000033] res_agi.c: <SIP/120-0000006a>AGI Script bx/trunk.php completed, returning 0
[2019-09-25 15:40:21] VERBOSE[11417][C-00000033] pbx.c: Executing [s@macro-dial-one:52] ExecIf("SIP/120-0000006a", "0?Set(D_OPTIONS=HhtrU(bx-answe
[2019-09-25 15:40:21] VERBOSE[11417][C-00000033] pbx.c: Executing [s@macro-dial-one:53] NoOp("SIP/120-0000006a", "") in new stack
[2019-09-25 15:40:21] VERBOSE[11417][C-00000033] pbx.c: Executing [s@macro-dial-one:54] ExecIf("SIP/120-0000006a", "0?Set(D_OPTIONS=HhTtrU(bx-answ
[2019-09-25 15:40:21] VERBOSE[11417][C-00000033] pbx.c: Executing [s@macro-dial-one:55] Dial("SIP/120-0000006a", "SIP/999,,HhTtrU(bx-answer^s^1)Ib
[2019-09-25 15:40:21] VERBOSE[11417][C-00000033] netsock2.c: Using SIP RTP TOS bits 184
[2019-09-25 15:40:21] VERBOSE[11417][C-00000033] netsock2.c: Using SIP RTP CoS mark 5
[2019-09-25 15:40:21] VERBOSE[11417][C-00000033] app_stack.c: SIP/999-0000006b Internal Gosub(func-apply-sipheaders,s,1) start
[2019-09-25 15:40:21] VERBOSE[11417][C-00000033] pbx.c: Executing [s@func-apply-sipheaders:1] ExecIf("SIP/999-0000006b", "0?Set(CHANNEL(hangup_han
[2019-09-25 15:40:21] VERBOSE[11417][C-00000033] pbx.c: Executing [s@func-apply-sipheaders:2] NoOp("SIP/999-0000006b", "Applying SIP Headers to ch
[2019-09-25 15:40:21] VERBOSE[11417][C-00000033] pbx.c: Executing [s@func-apply-sipheaders:3] Set("SIP/999-0000006b", "TECH=SIP") in new stack
[2019-09-25 15:40:21] VERBOSE[11417][C-00000033] pbx.c: Executing [s@func-apply-sipheaders:4] Set("SIP/999-0000006b", "SIPHEADERKEYS=") in new sta
[2019-09-25 15:40:21] VERBOSE[11417][C-00000033] pbx.c: Executing [s@func-apply-sipheaders:5] While("SIP/999-0000006b", "0") in new stack
[2019-09-25 15:40:21] VERBOSE[11417][C-00000033] app_while.c: Jumping to priority 12
[2019-09-25 15:40:21] VERBOSE[11417][C-00000033] pbx.c: Executing [s@func-apply-sipheaders:13] Return("SIP/999-0000006b", "") in new stack
[2019-09-25 15:40:21] VERBOSE[11417][C-00000033] app_stack.c: Spawn extension (from-internal, 999, 1) exited non-zero on 'SIP/999-0000006b'
[2019-09-25 15:40:21] VERBOSE[11417][C-00000033] app_stack.c: SIP/999-0000006b Internal Gosub(func-apply-sipheaders,s,1) complete GOSUB_RETVAL=
[2019-09-25 15:40:21] VERBOSE[11417][C-00000033] app_dial.c: Called SIP/999
[2019-09-25 15:40:21] VERBOSE[11417][C-00000033] app_dial.c: Connected line update to SIP/120-0000006a prevented.
[2019-09-25 15:40:21] VERBOSE[11417][C-00000033] app_dial.c: SIP/999-0000006b is ringing
[2019-09-25 15:40:21] VERBOSE[11417][C-00000033] app_dial.c: SIP/999-0000006b is ringing
[2019-09-25 15:40:23] VERBOSE[11417][C-00000033] app_dial.c: Connected line update to SIP/120-0000006a prevented.
[2019-09-25 15:40:23] VERBOSE[11417][C-00000033] app_dial.c: SIP/999-0000006b answered SIP/120-0000006a
[2019-09-25 15:40:23] VERBOSE[11417][C-00000033] app_stack.c: SIP/999-0000006b Internal Gosub(bx-answer,s,1(s,1)) start
Поступил звонок на номе 8800
Установили переменные, передали оператору 101 или 120
Оператор 120 перенаправляет вызов менеджеру 999 с подтверждением и вот тут нужно с канала 8800 передать переменные (__LINE=7897987987987) ... на канал 999
Получается 120 ставит входящий на удержание, подтверждает перевод на 999 и переводит его. контексты стандартные кроме card
if("SIP/852-00000c5f", "1?AGI(bx/trunk.php,FROM=,TO=999,LINE=,BXDIAL=start,TYPE=2)") in new stack
это из контекста card при переводе внешнего звонка оператором к менеджеру. именно сюда не передаются переменные так как идет