Re: В базу данные не записываются (func_odbc)
Добавлено: 27 янв 2014, 16:48
Русский форум Asterisk сообщества
https://forum.asterisk.ru/
Не поняла вас, ссылка перенаправляет меня на первую страницуgoto viewtopic.php?f=5&t=3945#p44337
Код: Выделить всё
exten => 1,n,Set(GET_RATE(${EXTEN})\,${DIALEDTIME}\,${CALLERID}\,${ORIG_DID}\,${UNIQUEID},\${EXTEN}))
Код: Выделить всё
exten => 1,n,Set(GET_RATE()=${EXTEN})\,${DIALEDTIME}\,${CALLERID}\,${ORIG_DID}\,${UNIQUEID},\${EXTEN})
Код: Выделить всё
exten => 1,n,Set(GET_RATE(1)=${EXTEN})\,${DIALEDTIME}\,${CALLERID}\,${ORIG_DID}\,${UNIQUEID},\${EXTEN})
Код: Выделить всё
Verbosity is at least 3
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
-- Executing [1121@from-internal:1] Playback("SIP/300-00000000", "Welcome") in new stack
-- Executing [1121@from-internal:2] Set("SIP/300-00000000", "ORIG_DID=1121") in new stack
-- Executing [1121@from-internal:3] BackGround("SIP/300-00000000", "enter-phone-number10") in new stack
-- <SIP/300-00000000> Playing 'enter-phone-number10.gsm' (language 'RU')
== CDR updated on SIP/300-00000000
-- Executing [2@from-internal:1] NoOp("SIP/300-00000000", "selected 2") in new stack
-- Executing [2@from-internal:2] Playback("SIP/300-00000000", "bad") in new stack
-- <SIP/300-00000000> Playing 'bad.gsm' (language 'RU')
-- Executing [2@from-internal:3] Set("SIP/300-00000000", "E=2") in new stack
-- Executing [2@from-internal:4] NoOp("SIP/300-00000000", "E is equal to 2") in new stack
-- Executing [2@from-internal:5] Set("SIP/300-00000000", "GET_RATE()=2\,27-01-2014 07:36:21\,300\,1121\,1390829773.0\,2") in new stack
-- Executing [2@from-internal:6] Hangup("SIP/300-00000000", "") in new stack
== Spawn extension (from-internal, 2, 6) exited non-zero on 'SIP/300-00000000'
-- Executing [h@from-internal:1] Macro("SIP/300-00000000", "hangupcall") in new stack
-- Executing [s@macro-hangupcall:1] GotoIf("SIP/300-00000000", "1?endmixmoncheck") in new stack
-- Goto (macro-hangupcall,s,9)
-- Executing [s@macro-hangupcall:9] NoOp("SIP/300-00000000", "End of MIXMON check") in new stack
-- Executing [s@macro-hangupcall:10] GotoIf("SIP/300-00000000", "1?nomeetmemon") in new stack
-- Goto (macro-hangupcall,s,28)
-- Executing [s@macro-hangupcall:28] NoOp("SIP/300-00000000", "End of MEETME check") in new stack
-- Executing [s@macro-hangupcall:29] GotoIf("SIP/300-00000000", "1?noautomon") in new stack
-- Goto (macro-hangupcall,s,34)
-- Executing [s@macro-hangupcall:34] NoOp("SIP/300-00000000", "TOUCH_MONITOR_OUTPUT=") in new stack
-- Executing [s@macro-hangupcall:35] GotoIf("SIP/300-00000000", "1?noautomon2") in new stack
-- Goto (macro-hangupcall,s,41)
-- Executing [s@macro-hangupcall:41] NoOp("SIP/300-00000000", "MONITOR_FILENAME=") in new stack
-- Executing [s@macro-hangupcall:42] GotoIf("SIP/300-00000000", "1?skiprg") in new stack
-- Goto (macro-hangupcall,s,45)
-- Executing [s@macro-hangupcall:45] GotoIf("SIP/300-00000000", "1?skipblkvm") in new stack
-- Goto (macro-hangupcall,s,48)
-- Executing [s@macro-hangupcall:48] GotoIf("SIP/300-00000000", "1?theend") in new stack
-- Goto (macro-hangupcall,s,50)
-- Executing [s@macro-hangupcall:50] AGI("SIP/300-00000000", "hangup.agi") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/hangup.agi
-- <SIP/300-00000000>AGI Script hangup.agi completed, returning 0
-- Executing [s@macro-hangupcall:51] Hangup("SIP/300-00000000", "") in new stack
== Spawn extension (macro-hangupcall, s, 51) exited non-zero on 'SIP/300-00000000' in macro 'hangupcall'
== Spawn extension (from-internal, h, 1) exited non-zero on 'SIP/300-00000000'
Код: Выделить всё
[RATE]
prefix=GET
dsn=asterisk
writesql=INSERT INTO count_rating(extension,calldate,callerid,first_dest,uniqueid,rating) VALUES ('${VAL1}','${VAL2}','${VAL3}','${VAL4}','{VAL5},'${VAL6}')
Код: Выделить всё
odbc write GET_RATE extensions 1,01-01-201406:55:58,300,1121,456666355545,1
INSERT INTO count_rating(extension,calldate,callerid,first_dest,uniqueid,rating) VALUES('1','01-01-201406:55:58','300','1121,'456666355545','1')