Updated Kamailio tests

This commit is contained in:
Tripon Alexandru-Ionut
2019-07-02 16:51:51 +03:00
committed by Dan Christian Bogos
parent 8300ebca9f
commit a49a91d03c

View File

@@ -46,15 +46,20 @@ func TestNewKamEvent(t *testing.T) {
"cgr_supplier":"supplier2",
"cgr_disconnectcause": "200",
"cgr_pdd": "4"}`
eKamEv := KamEvent{"event": "CGR_CALL_END",
"callid": "46c01a5c249b469e76333fc6bfa87f6a@0:0:0:0:0:0:0:0",
"from_tag": "bf71ad59", "to_tag": "7351fecf",
"cgr_reqtype": utils.META_POSTPAID, "cgr_account": "1001",
"cgr_destination": "1002", "cgr_answertime": "1419839310",
"cgr_duration": "3", "cgr_pdd": "4",
eKamEv := KamEvent{
"event": "CGR_CALL_END",
"callid": "46c01a5c249b469e76333fc6bfa87f6a@0:0:0:0:0:0:0:0",
"from_tag": "bf71ad59",
"to_tag": "7351fecf",
"cgr_reqtype": utils.META_POSTPAID,
"cgr_account": "1001",
"cgr_destination": "1002",
"cgr_answertime": "1419839310",
"cgr_duration": "3",
"cgr_pdd": "4",
utils.CGR_SUPPLIER: "supplier2",
utils.CGR_DISCONNECT_CAUSE: "200",
utils.CGROriginHost: utils.KamailioAgent,
utils.OriginHost: utils.KamailioAgent,
}
if kamEv, err := NewKamEvent([]byte(evStr), utils.KamailioAgent, ""); err != nil {
t.Error(err)