[SR-Users] no event received for call disconnection

Daniel-Constantin Mierla miconda at gmail.com
Mon Oct 30 17:57:18 CET 2017


Hello,


On 30.10.17 17:29, Aleksandar Sosic wrote:
> 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",
> [...]
does this happen on BYE or on dialog timeout?

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training, Nov 13-15, 2017, in Berlin - www.asipto.com
Kamailio World Conference - www.kamailioworld.com




More information about the sr-users mailing list