[root@p441022 script]# go run fs.go
New event
Alt_Event_Type: "dialog"
Answer-State: "ringing"
Call-Direction: "inbound"
Caller-Ani: "119"
Caller-Caller-Id-Name: "asterisk"
Caller-Caller-Id-Number: "119"
Caller-Channel-Answered-Time: "0"
Caller-Channel-Bridged-Time: "0"
Caller-Channel-Created-Time: "1503328469691443"
Caller-Channel-Hangup-Time: "0"
Caller-Channel-Hold-Accum: "0"
Caller-Channel-Last-Hold: "0"
Caller-Channel-Name: "sofia/internal/119@test.fs"
Caller-Channel-Progress-Media-Time: "0"
Caller-Channel-Progress-Time: "0"
Caller-Channel-Resurrect-Time: "0"
Caller-Channel-Transfer-Time: "0"
Caller-Context: "test.fs_context"
Caller-Destination-Number: "87014677722"
Caller-Dialplan: "XML"
Caller-Direction: "inbound"
Caller-Logical-Direction: "inbound"
Caller-Network-Addr: "109.229.162.34"
Caller-Orig-Caller-Id-Name: "asterisk"
Caller-Orig-Caller-Id-Number: "119"
Caller-Privacy-Hide-Name: "false"
Caller-Privacy-Hide-Number: "false"
Caller-Profile-Created-Time: "1503328469691443"
Caller-Profile-Index: "1"
Caller-Screen-Bit: "true"
Caller-Source: "mod_sofia"
Caller-Unique-Id: "6da52804-8683-11e7-b562-eb4c28191d43"
Caller-Username: "119"
Channel-Call-State: "RINGING"
Channel-Call-Uuid: "6da52804-8683-11e7-b562-eb4c28191d43"
Channel-Hit-Dialplan: "true"
Channel-Name: "sofia/internal/119@test.fs"
Channel-Presence-Id: "119@test.fs"
Channel-State: "CS_ROUTING"
Channel-State-Number: "4"
Core-Uuid: "ebc70230-7c73-11e7-834a-eb4c28191d43"
Event-Calling-File: "switch_channel.c"
Event-Calling-Function: "switch_channel_perform_presence"
Event-Calling-Line-Number: "758"
Event-Date-Gmt: "Mon, 21 Aug 2017 15:14:29 GMT"
Event-Date-Local: "2017-08-21 21:14:29"
Event-Date-Timestamp: "1503328469711424"
Event-Name: "PRESENCE_IN"
Event-Sequence: "22906450"
Event_Count: "0"
Event_Type: "presence"
Freeswitch-Hostname: "p441022.kvmvps"
Freeswitch-Ipv4: "185.87.193.189"
Freeswitch-Ipv6: "fe80::200:ff:fe44:1022"
Freeswitch-Switchname: "p441022.kvmvps"
From: "119@test.fs"
Login: "src/switch_channel.c"
Presence-Call-Direction: "inbound"
Presence-Call-Info-State: "alerting"
Presence-Calling-File: "src/switch_core_state_machine.c"
Presence-Calling-Function: "check_presence"
Presence-Calling-Line: "412"
Proto: "any"
Rpid: "unknown"
Status: "CS_ROUTING"
Unique-Id: "6da52804-8683-11e7-b562-eb4c28191d43"
2017/08/21 21:14:29 json: cannot unmarshal array into Go value of type string
exit status 1
var (
err error
id int
client int
id_dispach int
db *sql.DB
interval_time_start time.Time
interval_time_end time.Time
current_time time.Time
)