Adding static field values for multiple mediation in configuration, fmt on sources

This commit is contained in:
DanB
2013-12-27 20:02:47 +01:00
parent 7f8f981085
commit 4eee6ddd0e
17 changed files with 189 additions and 146 deletions

View File

@@ -690,11 +690,7 @@ func (self *SQLStorage) LogError(uuid, source, runid, errstr string) (err error)
func (self *SQLStorage) SetCdr(cdr utils.RawCDR) (err error) {
// map[account:1001 direction:out orig_ip:172.16.1.1 tor:call accid:accid23 answer_time:2013-02-03 19:54:00 cdrsource:freeswitch_csv destination:+4986517174963 duration:62 reqtype:prepaid subject:1001 supplier:supplier1 tenant:cgrates.org]
startTime, err := cdr.GetAnswerTime()
if err != nil {
Logger.Info(err.Error())
return err
}
startTime, _ := cdr.GetAnswerTime() // Ignore errors, we want to store the cdr no matter what
_, err = self.Db.Exec(fmt.Sprintf("INSERT INTO %s VALUES (NULL,'%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s', %d)",
utils.TBL_CDRS_PRIMARY,
cdr.GetCgrId(),