Esempio n. 1
0
func (kev KamEvent) AsStoredCdr(timezone string) *engine.StoredCdr {
	storCdr := new(engine.StoredCdr)
	storCdr.CgrId = kev.GetCgrId(timezone)
	storCdr.TOR = utils.VOICE
	storCdr.AccId = kev.GetUUID()
	storCdr.CdrHost = kev.GetOriginatorIP(utils.META_DEFAULT)
	storCdr.CdrSource = kev.GetCdrSource()
	storCdr.ReqType = kev.GetReqType(utils.META_DEFAULT)
	storCdr.Direction = kev.GetDirection(utils.META_DEFAULT)
	storCdr.Tenant = kev.GetTenant(utils.META_DEFAULT)
	storCdr.Category = kev.GetCategory(utils.META_DEFAULT)
	storCdr.Account = kev.GetAccount(utils.META_DEFAULT)
	storCdr.Subject = kev.GetSubject(utils.META_DEFAULT)
	storCdr.Destination = kev.GetDestination(utils.META_DEFAULT)
	storCdr.SetupTime, _ = kev.GetSetupTime(utils.META_DEFAULT, timezone)
	storCdr.AnswerTime, _ = kev.GetAnswerTime(utils.META_DEFAULT, timezone)
	storCdr.Usage, _ = kev.GetDuration(utils.META_DEFAULT)
	storCdr.Pdd, _ = kev.GetPdd(utils.META_DEFAULT)
	storCdr.Supplier = kev.GetSupplier(utils.META_DEFAULT)
	storCdr.DisconnectCause = kev.GetDisconnectCause(utils.META_DEFAULT)
	storCdr.ExtraFields = kev.GetExtraFields()
	storCdr.Cost = -1

	return storCdr
}