Сообщений: 32
|
CID в статистике
Итак, есть AsteriskNOW - там FreePBX, если кто не знает...
К этой штуке прикручена по PRI станция Nec.
* подключен к городской сети по SIP. Nec подключен медью СО к ПТС...
Сейчас звонки в город через 9.
Суть вопроса.
Если в город (или еще куда) звонит абонент Asterisk, то в статистике в поле SRC пишется номер экстеншена Asterisk'a.
Если в город (или еще куда) звонит абонент NEC, то в поле SRC в статистике пишется CID транка.
В FreePBX в настройках транка поставлено "Force Trunk CID", ибо если этого не делать, то ругается комстар, что в их билинг прилетел четырехзначный номер...
Внимание, вопрос: как победить статистику?
Да, в extensions_custom.conf про звонки с NEC в город написано:
exten => _9.,1,Goto(from-internal,${EXTEN},1)
Логи:
Звонок абонента Asterisk'a
-- Executing [9XXXXXXX@from-internal:1] Macro("SIP/AAAA-00000147", "user-callerid|SKIPTTL|") in new stack
-- Executing [s@macro-user-callerid:1] Set("SIP/AAAA-00000147", "AMPUSER=AAAA") in new stack
-- Executing [s@macro-user-callerid:2] GotoIf("SIP/AAAA-00000147", "0?report") in new stack
-- Executing [s@macro-user-callerid:3] ExecIf("SIP/AAAA-00000147", "1|Set|REALCALLERIDNUM=AAAA") in new stack
-- Executing [s@macro-user-callerid:4] Set("SIP/AAAA-00000147", "AMPUSER=AAAA") in new stack
-- Executing [s@macro-user-callerid:5] Set("SIP/AAAA-00000147", "AMPUSERCIDNAME=Konstantin Maslennikov") in new stack
-- Executing [s@macro-user-callerid:6] GotoIf("SIP/AAAA-00000147", "0?report") in new stack
>> Executing [s@macro-user-callerid:7] Set("SIP/AAAA-00000147", "AMPUSERCID=AAAA") in new stack
>> Executing [s@macro-user-callerid:8] Set("SIP/AAAA-00000147", "CALLERID(all)="Konstantin Maslennikov" <AAAA>") in new stack
>> Executing [s@macro-user-callerid:9] ExecIf("SIP/AAAA-00000147", "1|Set|CHANNEL(language)=ru") in new stack
-- Executing [s@macro-user-callerid:10] GotoIf("SIP/AAAA-00000147", "1?continue") in new stack
-- Goto (macro-user-callerid,s,19)
-- Executing [s@macro-user-callerid:19] NoOp("SIP/AAAA-00000147", "Using CallerID "Konstantin Maslennikov" <AAAA>") in new stack
-- Executing [9XXXXXXX@from-internal:2] Set("SIP/AAAA-00000147", "_NODEST=") in new stack
-- Executing [9XXXXXXX@from-internal:3] Macro("SIP/AAAA--00000147", "record-enable|AAAA|OUT|") in new stack
-- Executing [s@macro-record-enable:1] GotoIf("SIP/AAAA-00000147", "1?check") in new stack
-- Goto (macro-record-enable,s,4)
-- Executing [s@macro-record-enable:4] ExecIf("SIP/AAAA-00000147", "0|MacroExit|") in new stack
>> Executing [s@macro-record-enable:5] GotoIf("SIP/AAAA-00000147", "0?Group:OUT") in new stack
-- Goto (macro-record-enable,s,15)
>> Executing [s@macro-record-enable:15] GotoIf("SIP/AAAA-00000147", "0?IN") in new stack
>> Executing [s@macro-record-enable:16] ExecIf("SIP/AAAA-00000147", "1|MacroExit|") in new stack
-- Executing [9XXXXXXX@from-internal:4] Macro("SIP/AAAA-00000147", "dialout-trunk|1|XXXXXXX||") in new stack
-- Executing [s@macro-dialout-trunk:1] Set("SIP/AAAA-00000147", "DIAL_TRUNK=1") in new stack
-- Executing [s@macro-dialout-trunk:2] GosubIf("SIP/AAAA-00000147", "0?sub-pincheck|s|1") in new stack
-- Executing [s@macro-dialout-trunk:3] GotoIf("SIP/AAAA-00000147", "0?disabletrunk|1") in new stack
-- Executing [s@macro-dialout-trunk:4] Set("SIP/AAAA-00000147", "DIAL_NUMBER=XXXXXXX") in new stack
-- Executing [s@macro-dialout-trunk:5] Set("SIP/AAAA-00000147", "DIAL_TRUNK_OPTIONS=tr") in new stack
-- Executing [s@macro-dialout-trunk:6] Set("SIP/AAAA-00000147", "OUTBOUND_GROUP=OUT_1") in new stack
-- Executing [s@macro-dialout-trunk:7] GotoIf("SIP/AAAA-00000147", "1?nomax") in new stack
-- Goto (macro-dialout-trunk,s,9)
-- Executing [s@macro-dialout-trunk:9] GotoIf("SIP/AAAA-00000147", "0?skipoutcid") in new stack
-- Executing [s@macro-dialout-trunk:10] Set("SIP/AAAA-00000147", "DIAL_TRUNK_OPTIONS=") in new stack
-- Executing [s@macro-dialout-trunk:11] Macro("SIP/AAAA-00000147", "outbound-callerid|1") in new stack
-- Executing [s@macro-outbound-callerid:1] ExecIf("SIP/AAAA-00000147", "0|SetCallerPres|") in new stack
-- Executing [s@macro-outbound-callerid:2] ExecIf("SIP/AAAA-00000147", "0|Set|REALCALLERIDNUM=AAAA") in new stack
-- Executing [s@macro-outbound-callerid:3] GotoIf("SIP/AAAA-00000147", "1?normcid") in new stack
-- Goto (macro-outbound-callerid,s,6)
-- Executing [s@macro-outbound-callerid:6] Set("SIP/AAAA-00000147", "USEROUTCID=812BBBBBBB") in new stack
-- Executing [s@macro-outbound-callerid:7] Set("SIP/AAAA-00000147", "EMERGENCYCID=") in new stack
-- Executing [s@macro-outbound-callerid:8] Set("SIP/AAAA-00000147", "TRUNKOUTCID=812YYYYYYY") in new stack
-- Executing [s@macro-outbound-callerid:9] GotoIf("SIP/AAAA-00000147", "1?trunkcid") in new stack
-- Goto (macro-outbound-callerid,s,12)
-- Executing [s@macro-outbound-callerid:12] ExecIf("SIP/AAAA-00000147", "1|Set|CALLERID(all)=812YYYYYYY") in new stack
-- Executing [s@macro-outbound-callerid:13] ExecIf("SIP/AAAA-00000147", "1|Set|CALLERID(all)=812BBBBBBB") in new stack
-- Executing [s@macro-outbound-callerid:14] ExecIf("SIP/AAAA-00000147", "1|Set|CALLERID(all)=812YYYYYYY") in new stack
-- Executing [s@macro-outbound-callerid:15] ExecIf("SIP/AAAA-00000147", "0|SetCallerPres|prohib_passed_screen") in new stack
-- Executing [s@macro-dialout-trunk:12] ExecIf("SIP/AAAA-00000147", "0|AGI|fixlocalprefix") in new stack
-- Executing [s@macro-dialout-trunk:13] Set("SIP/AAAA-00000147", "OUTNUM=XXXXXXX") in new stack
-- Executing [s@macro-dialout-trunk:14] Set("SIP/AAAA-00000147", "custom=SIP/COMSTAR") in new stack
-- Executing [s@macro-dialout-trunk:15] ExecIf("SIP/AAAA-00000147", "0|Set|DIAL_TRUNK_OPTIONS=M(setmusic^)") in new stack
-- Executing [s@macro-dialout-trunk:16] Macro("SIP/AAAA-00000147", "dialout-trunk-predial-hook|") in new stack
-- Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit("SIP/AAAA-00000147", "") in new stack
-- Executing [s@macro-dialout-trunk:17] GotoIf("SIP/AAAA-00000147", "0?bypass|1") in new stack
-- Executing [s@macro-dialout-trunk:18] GotoIf("SIP/AAAA-00000147", "0?customtrunk") in new stack
-- Executing [s@macro-dialout-trunk:19] Dial("SIP/AAAA-00000147", "SIP/COMSTAR/XXXXXXX|300|") in new stack
-- Called COMSTAR/XXXXXXX
-- SIP/COMSTAR-00000148 is making progress passing it to SIP/AAAA-00000147
Звонок абонента NEC
-- Accepting call from 'ZZZZ' to '9XXXXXXX' on channel 0/30, span 1
-- Executing [9XXXXXXX@from-trunk:1] Goto("DAHDI/30-1", "from-internal|9XXXXXXX|1") in new stack
-- Goto (from-internal,9XXXXXXX,1)
-- Executing [9XXXXXXX@from-internal:1] Macro("DAHDI/30-1", "user-callerid|SKIPTTL|") in new stack
-- Executing [s@macro-user-callerid:1] Set("DAHDI/30-1", "AMPUSER=ZZZZ") in new stack
-- Executing [s@macro-user-callerid:2] GotoIf("DAHDI/30-1", "0?report") in new stack
-- Executing [s@macro-user-callerid:3] ExecIf("DAHDI/30-1", "1|Set|REALCALLERIDNUM=ZZZZ") in new stack
>- Executing [s@macro-user-callerid:4] Set("DAHDI/30-1", "AMPUSER=") in new stack
>- Executing [s@macro-user-callerid:5] Set("DAHDI/30-1", "AMPUSERCIDNAME=") in new stack
-- Executing [s@macro-user-callerid:6] GotoIf("DAHDI/30-1", "1?report") in new stack
-- Goto (macro-user-callerid,s,10)
-- Executing [s@macro-user-callerid:10] GotoIf("DAHDI/30-1", "1?continue") in new stack
-- Goto (macro-user-callerid,s,19)
-- Executing [s@macro-user-callerid:19] NoOp("DAHDI/30-1", "Using CallerID "" <ZZZZ>") in new stack
-- Executing [9XXXXXXX@from-internal:2] Set("DAHDI/30-1", "_NODEST=") in new stack
-- Executing [9XXXXXXX@from-internal:3] Macro("DAHDI/30-1", "record-enable||OUT|") in new stack
-- Executing [s@macro-record-enable:1] GotoIf("DAHDI/30-1", "1?check") in new stack
-- Goto (macro-record-enable,s,4)
-- Executing [s@macro-record-enable:4] ExecIf("DAHDI/30-1", "1|MacroExit|") in new stack
-- Executing [9XXXXXXX@from-internal:4] Macro("DAHDI/30-1", "dialout-trunk|1|XXXXXXX||") in new stack
-- Executing [s@macro-dialout-trunk:1] Set("DAHDI/30-1", "DIAL_TRUNK=1") in new stack
-- Executing [s@macro-dialout-trunk:2] GosubIf("DAHDI/30-1", "0?sub-pincheck|s|1") in new stack
-- Executing [s@macro-dialout-trunk:3] GotoIf("DAHDI/30-1", "0?disabletrunk|1") in new stack
-- Executing [s@macro-dialout-trunk:4] Set("DAHDI/30-1", "DIAL_NUMBER=XXXXXXX") in new stack
-- Executing [s@macro-dialout-trunk:5] Set("DAHDI/30-1", "DIAL_TRUNK_OPTIONS=tr") in new stack
-- Executing [s@macro-dialout-trunk:6] Set("DAHDI/30-1", "OUTBOUND_GROUP=OUT_1") in new stack
-- Executing [s@macro-dialout-trunk:7] GotoIf("DAHDI/30-1", "1?nomax") in new stack
-- Goto (macro-dialout-trunk,s,9)
-- Executing [s@macro-dialout-trunk:9] GotoIf("DAHDI/30-1", "0?skipoutcid") in new stack
-- Executing [s@macro-dialout-trunk:10] Set("DAHDI/30-1", "DIAL_TRUNK_OPTIONS=") in new stack
-- Executing [s@macro-dialout-trunk:11] Macro("DAHDI/30-1", "outbound-callerid|1") in new stack
-- Executing [s@macro-outbound-callerid:1] ExecIf("DAHDI/30-1", "0|SetCallerPres|") in new stack
-- Executing [s@macro-outbound-callerid:2] ExecIf("DAHDI/30-1", "0|Set|REALCALLERIDNUM=ZZZZ") in new stack
-- Executing [s@macro-outbound-callerid:3] GotoIf("DAHDI/30-1", "1?normcid") in new stack
-- Goto (macro-outbound-callerid,s,6)
-- Executing [s@macro-outbound-callerid:6] Set("DAHDI/30-1", "USEROUTCID=") in new stack
-- Executing [s@macro-outbound-callerid:7] Set("DAHDI/30-1", "EMERGENCYCID=") in new stack
-- Executing [s@macro-outbound-callerid:8] Set("DAHDI/30-1", "TRUNKOUTCID=812YYYYYYY") in new stack
-- Executing [s@macro-outbound-callerid:9] GotoIf("DAHDI/30-1", "1?trunkcid") in new stack
-- Goto (macro-outbound-callerid,s,12)
-- Executing [s@macro-outbound-callerid:12] ExecIf("DAHDI/30-1", "1|Set|CALLERID(all)=812YYYYYYY") in new stack
-- Executing [s@macro-outbound-callerid:13] ExecIf("DAHDI/30-1", "0|Set|CALLERID(all)=") in new stack
-- Executing [s@macro-outbound-callerid:14] ExecIf("DAHDI/30-1", "1|Set|CALLERID(all)=812YYYYYYY") in new stack
-- Executing [s@macro-outbound-callerid:15] ExecIf("DAHDI/30-1", "0|SetCallerPres|prohib_passed_screen") in new stack
-- Executing [s@macro-dialout-trunk:12] ExecIf("DAHDI/30-1", "0|AGI|fixlocalprefix") in new stack
-- Executing [s@macro-dialout-trunk:13] Set("DAHDI/30-1", "OUTNUM=XXXXXXX") in new stack
-- Executing [s@macro-dialout-trunk:14] Set("DAHDI/30-1", "custom=SIP/COMSTAR") in new stack
-- Executing [s@macro-dialout-trunk:15] ExecIf("DAHDI/30-1", "0|Set|DIAL_TRUNK_OPTIONS=M(setmusic^)") in new stack
-- Executing [s@macro-dialout-trunk:16] Macro("DAHDI/30-1", "dialout-trunk-predial-hook|") in new stack
-- Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit("DAHDI/30-1", "") in new stack
-- Executing [s@macro-dialout-trunk:17] GotoIf("DAHDI/30-1", "0?bypass|1") in new stack
-- Executing [s@macro-dialout-trunk:18] GotoIf("DAHDI/30-1", "0?customtrunk") in new stack
-- Executing [s@macro-dialout-trunk:19] Dial("DAHDI/30-1", "SIP/COMSTAR/XXXXXXX|300|") in new stack
-- Called COMSTAR/XXXXXXX
-- SIP/COMSTAR-00000149 is making progress passing it to DAHDI/30-1
Значками > и >> пометил явные различия...
|