[SR-Users] no event received for call disconnection

Aleksandar Sosic alex.sosic at timenet.it
Mon Oct 30 17:29:18 CET 2017


Hi Everyone,

we're trying to implement cgrates in our kamailio nodes.
Everything is working fine except for the fact that kamailio is not
signaling the call end to cgrates for prepaid users... The versions,
logs and confs are:

```
# kamailio -v
version: kamailio 5.0.3 (x86_64/linux)
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS,
DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC,
Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX,
FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR,
USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16,
MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown
compiled with gcc 5.3.1
```

```
# cgr-engine --version
CGRateS 0.9.1~rc8 git+15a0793 (2017-10-23T12:15:40+02:00)
```

The kamailio conf regarding our problem is:
```
# Inform CGRateS about CALL_END (stop debit loops, perform accounting
if desired in this way)
route[CGR_CALL_END] {
  if $sht(cgrconn=>cgr) == $null {
    xlog("Charging controller unreachable");
    exit;
  }
  $var(callDur) = $TS - $dlg(start_ts);
  evapi_relay("{\"event\":\"CGR_CALL_END\",
    \"callid\":\"$dlg(callid)\",
    \"from_tag\":\"$dlg(from_tag)\",
    \"cgr_reqtype\":\"$dlg_var(cgrReqType)\",
    \"cgr_tenant\":\"$dlg_var(cgrTenant)\",
    \"cgr_account\":\"$dlg_var(cgrAccount)\",
    \"cgr_destination\":\"$dlg_var(cgrDestination)\",
    \"cgr_answertime\":\"$dlg(start_ts)\",
    \"cgr_duration\":\"$var(callDur)\",
    \"cgr_supplier\":\"$dlg_var(cgrSupplier)\",
    \"cgr_disconnectcause\":\"$T_reply_code\"}");
}
```

The kamailio logs:

```
17(114) ERROR: evapi [evapi_dispatch.c:707]: _evapi_relay(): failed to
pass the pointer to evapi dispatcher
17(114) ERROR: evapi [evapi_mod.c:261]: w_evapi_relay(): failed to
relay event: {"event":"CGR_CALL_END",
"callid":"6gJ-ynyLm0-vS7StVQA3nMjwJ.YY257z",
"from_tag":"Qf6tsQP.Js66FFOdCzv6QlEXomggf3gf",
"cgr_reqtype":"*prepaid",
"cgr_tenant":"evox.it",
"cgr_account":"0409828030",
"cgr_destination":"0039040123123",
"cgr_answertime":"1509379822",
"cgr_duration":"27",
"cgr_supplier":"*any",
"cgr_disconnectcause":"0"}
17(114) ERROR: evapi [evapi_dispatch.c:707]: _evapi_relay(): failed to
pass the pointer to evapi dispatcher
17(114) ERROR: evapi [evapi_mod.c:261]: w_evapi_relay(): failed to
relay event: {"event":"CGR_CALL_END",
"callid":"6gJ-ynyLm0-vS7StVQA3nMjwJ.YY257z",
"from_tag":"Qf6tsQP.Js66FFOdCzv6QlEXomggf3gf",
"cgr_reqtype":"*prepaid",
"cgr_tenant":"evox.it",
"cgr_account":"0409828030",
"cgr_destination":"0039040123123",
"cgr_answertime":"1509379822",
"cgr_duration":"27",
"cgr_supplier":"*any",
"cgr_disconnectcause":"0"}
```

Thanks for your help,
--
Aleksandar Sosic
mail: alex.sosic at timenet.it
skype: alex.sosic
cell: +385 91 2505 146



More information about the sr-users mailing list