<h3>Description</h3>
<p>Hi everyone.<br>
I integrate Kamailio with CGRateS and found a strange behaviour.<br>
I made a call using Jitsi from 1001 to 1003 (configured before in CGRateS to disconnect after 12 seconds).<br>
The call is disconnected correctly but from Kamailio got 3 CGR_CALL_END events with the same data<br>
which in CGRateS generate an error because from these events CGRateS generate 3 cdrs and all 3 with the same unique key.<br>
Is this a bug or is something wrong with the config?</p>
<p>Kamailio config : <a href="https://github.com/cgrates/cgrates/tree/master/data/tutorials/kamevapi/kamailio/etc/kamailio">https://github.com/cgrates/cgrates/tree/master/data/tutorials/kamevapi/kamailio/etc/kamailio</a></p>
<h3>NGREP Events between CGRateS and Kamailio</h3>
<p>T 2018/04/24 07:55:14.200094 127.0.0.1:8448 -> 127.0.0.1:36774 [AP]<br>
269:{"event":"CGR_AUTH_REQUEST",<br>
.."tr_index":"12566",<br>
.."tr_label":"1148670067",<br>
.."cgr_subsystems":"*attributes;*resources;*accounts;*suppliers",<br>
.."RequestType":"*prepaid",<br>
.."Tenant":"cgrates.org",<br>
.."Account":"1001",<br>
.."Destination":"1003",<br>
.."SetupTime":"1524570914"},</p>
<h2></h2>
<p>T 2018/04/24 07:55:14.227815 127.0.0.1:36774 -> 127.0.0.1:8448 [AP]<br>
214:{"Event":"CGR_AUTH_REPLY","TransactionIndex":"12566","TransactionLabel":"1148670067","Attributes":"","ResourceAllocation":"SPECIAL_1003","MaxUsage":13,"Suppliers":"supplier2,supplier1","ThresholdHits":0,"Error":""},</p>
<h2></h2>
<p>T 2018/04/24 07:55:17.538695 127.0.0.1:8448 -> 127.0.0.1:36774 [AP]<br>
306:{"event":"CGR_CALL_START",<br>
.."h_entry":"226",<br>
.."h_id":"8446",<br>
.."cgr_subsystems":"*resources;*accounts",<br>
.."OriginID":"f1c3db6e9aea754291eed5cdc944cdd2@0:0:0:0:0:0:0:0;2fc2c199",<br>
.."RequestType":"*prepaid",<br>
.."Tenant":"cgrates.org",<br>
.."Account":"1001",<br>
.."Destination":"1003",<br>
.."AnswerTime":"1524570917"},</p>
<h2></h2>
<p>T 2018/04/24 07:55:29.546055 127.0.0.1:36774 -> 127.0.0.1:8448 [AP]<br>
99:{"Event":"CGR_SESSION_DISCONNECT","HashEntry":"226","HashId":"8446","Reason":"INSUFFICIENT_CREDIT"},</p>
<h2></h2>
<p>T 2018/04/24 07:55:29.546285 127.0.0.1:8448 -> 127.0.0.1:36774 [AP]<br>
285:{"event":"CGR_CALL_END",<br>
.."cgr_subsystems":"*resources;*accounts",<br>
.."OriginID":"f1c3db6e9aea754291eed5cdc944cdd2@0:0:0:0:0:0:0:0;2fc2c199",<br>
.."RequestType":"*prepaid",<br>
.."Tenant":"cgrates.org",<br>
.."Account":"1001",<br>
.."Destination":"1003",<br>
.."AnswerTime":"1524570917",<br>
.."Usage":"12"},</p>
<h2></h2>
<p>T 2018/04/24 07:55:29.546561 127.0.0.1:8448 -> 127.0.0.1:36774 [AP]<br>
285:{"event":"CGR_CALL_END",<br>
.."cgr_subsystems":"*resources;*accounts",<br>
.."OriginID":"f1c3db6e9aea754291eed5cdc944cdd2@0:0:0:0:0:0:0:0;2fc2c199",<br>
.."RequestType":"*prepaid",<br>
.."Tenant":"cgrates.org",<br>
.."Account":"1001",<br>
.."Destination":"1003",<br>
.."AnswerTime":"1524570917",<br>
.."Usage":"12"},</p>
<h2></h2>
<p>T 2018/04/24 07:55:29.546664 127.0.0.1:8448 -> 127.0.0.1:36774 [AP]<br>
285:{"event":"CGR_CALL_END",<br>
.."cgr_subsystems":"*resources;*accounts",<br>
.."OriginID":"f1c3db6e9aea754291eed5cdc944cdd2@0:0:0:0:0:0:0:0;2fc2c199",<br>
.."RequestType":"*prepaid",<br>
.."Tenant":"cgrates.org",<br>
.."Account":"1001",<br>
.."Destination":"1003",<br>
.."AnswerTime":"1524570917",<br>
.."Usage":"12"},</p>
<h1></h1>
<h3>Additional Information</h3>
<pre><code>kamailio -V
version: kamailio 5.1.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 4.9.2
</code></pre>
<ul>
<li><strong>Operating System</strong>:</li>
</ul>
<pre><code>root@teo:/home/teo# cat /etc/debian_version
8.10
</code></pre>
<p>Thank you in advance<br>
TeoV</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/1512">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AF36ZY2fSybsUIe6rRmaZ3Pqdmxtpd4uks5tsFENgaJpZM4TjLKV">mute the thread</a>.<img src="https://github.com/notifications/beacon/AF36ZQHDbdNuDbAgQoJOj3LdG97x9pngks5tsFENgaJpZM4TjLKV.gif" height="1" width="1" alt="" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
<link itemprop="url" href="https://github.com/kamailio/kamailio/issues/1512"></link>
<meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/kamailio/kamailio","title":"kamailio/kamailio","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/kamailio/kamailio"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"EVAPI generating disconnect event 3 times (#1512)"}],"action":{"name":"View Issue","url":"https://github.com/kamailio/kamailio/issues/1512"}}}</script>