<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>Hello,</p>
    <p>did you get the evapi message on your application or telnet
      connection?</p>
    <p>Can you give the output of:</p>
    <p>kamctl ps</p>
    <p>to see if the evapi processes are running?</p>
    <p>Cheers,<br>
      Daniel<br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 19/08/16 18:45, Efelin Novak wrote:<br>
    </div>
    <blockquote
cite="mid:CABKTgArRKjGEq-gcvLDXFeb3E5Uthf0KBRkdRSxjXZyoJvPjSA@mail.gmail.com"
      type="cite">
      <div dir="ltr">Hi folks,
        <div><br>
        </div>
        <div>I came into a problem with evapi module, while I was trying
          to make the CGRateS tutorial work. It does not send any
          messages at all.</div>
        <div><br>
        </div>
        <div>Taken steps:</div>
        <div><br>
        </div>
        <div>I start kamailio with debug=3.</div>
        <div><br>
        </div>
        <div>I start:</div>
        <div>  CGRates (on the kamailio machine)</div>
        <div>  telnet 192.168.30.29 8448 (from my PC)</div>
        <div>  tcpdump port 8448 -A -s0 -i any (on the kamailio machine)</div>
        <div><br>
        </div>
        <div>Telnet command successfully connects to kamailio. Kamailio
          yells:</div>
        <div><br>
        </div>
        <div>
          <div><a class="moz-txt-link-abbreviated" href="mailto:root@cgrates:/opt/kamailio/src/kamailio-4.4/kamailio#">root@cgrates:/opt/kamailio/src/kamailio-4.4/kamailio#</a>
            11(12205) DEBUG: evapi [evapi_dispatch.c:453]:
            evapi_accept_client(): new connection - pos[1] from: [<a
              moz-do-not-send="true" href="http://192.168.30.1:40312">192.168.30.1:40312</a>]</div>
          <div>11(12205) INFO: <script>: Starting Evapi connector
            srcaddr 192.168.30.1 srcport  40312 condix 1</div>
          <div>11(12205) DEBUG: htable [ht_var.c:90]: pv_set_ht_cell():
            set value for $sht(cgrconn=>cgr)</div>
        </div>
        <div><br>
        </div>
        <div>A similar message is printed when CGRateS connects in.</div>
        <div><br>
        </div>
        <div>Afterwards I make a call to Kamailio. INVITE is routed to a
          following command:</div>
        <div><br>
        </div>
        <div>
          <div>evapi_async_relay("{\"event\":\"CGR_AUTH_REQUEST\",</div>
          <div>                \"tr_index\":\"$T(id_index)\",</div>
          <div>                \"tr_label\":\"$T(id_label)\",</div>
          <div>                \"cgr_reqtype\":\"$dlg_var(cgrReqType)\",</div>
          <div>                \"cgr_tenant\":\"$dlg_var(cgrTenant)\",</div>
          <div>                \"cgr_account\":\"$dlg_var(cgrAccount)\",</div>
          <div>               
            \"cgr_destination\":\"$dlg_var(cgrDestination)\",</div>
          <div>                \"cgr_setuptime\":\"$TS\",</div>
          <div>                \"cgr_computelcr\":\"true\"}");</div>
        </div>
        <div><br>
        </div>
        <div>Now the kamailio writes:</div>
        <div><br>
        </div>
        <div>.</div>
        <div>.</div>
        <div>.</div>
        <div>
          <div> 2(12196) DEBUG: dialog [dlg_var.c:260]: print_lists():
            Dialog var-list (0x7f196d1c5248):</div>
          <div> 2(12196) DEBUG: dialog [dlg_var.c:265]: print_lists():
            cgrDestination=1002 (flags 1)</div>
          <div> 2(12196) DEBUG: dialog [dlg_var.c:265]: print_lists():
            cgrAccount=1001 (flags 1)</div>
          <div> 2(12196) DEBUG: dialog [dlg_var.c:265]: print_lists():
            cgrTenant=<a moz-do-not-send="true"
              href="http://cgrates.org">cgrates.org</a> (flags 1)</div>
          <div> 2(12196) DEBUG: dialog [dlg_var.c:265]: print_lists():
            cgrReqType=*prepaid (flags 1)</div>
          <div> 2(12196) DEBUG: dialog [dlg_hash.c:922]: dlg_unref():
            unref dlg 0x7f196d1c4c08 with 1 -> 1</div>
          <div> 2(12196) DEBUG: evapi [evapi_dispatch.c:603]:
            evapi_relay(): relaying event data
            [{"event":"CGR_AUTH_REQUEST",</div>
          <div><span class="" style="white-space:pre">          </span>"tr_index":"59559",</div>
          <div><span class="" style="white-space:pre">          </span>"tr_label":"1886589610",</div>
          <div><span class="" style="white-space:pre">          </span>"cgr_reqtype":"*prepaid",</div>
          <div><span class="" style="white-space:pre">          </span>"cgr_tenant":"<a
              moz-do-not-send="true" href="http://cgrates.org">cgrates.org</a>",</div>
          <div><span class="" style="white-space:pre">          </span>"cgr_account":"1001",</div>
          <div><span class="" style="white-space:pre">          </span>"cgr_destination":"1002",</div>
          <div><span class="" style="white-space:pre">          </span>"cgr_setuptime":"1471623526",</div>
          <div><span class="" style="white-space:pre">          </span>"cgr_computelcr":"true"}]
            (246)</div>
          <div> 2(12196) DEBUG: evapi [evapi_dispatch.c:628]:
            evapi_relay(): sending [0x7f196d1c88b8]
            [246:{"event":"CGR_AUTH_REQUEST",</div>
          <div><span class="" style="white-space:pre">          </span>"tr_index":"59559",</div>
          <div><span class="" style="white-space:pre">          </span>"tr_label":"1886589610",</div>
          <div><span class="" style="white-space:pre">          </span>"cgr_reqtype":"*prepaid",</div>
          <div><span class="" style="white-space:pre">          </span>"cgr_tenant":"<a
              moz-do-not-send="true" href="http://cgrates.org">cgrates.org</a>",</div>
          <div><span class="" style="white-space:pre">          </span>"cgr_account":"1001",</div>
          <div><span class="" style="white-space:pre">          </span>"cgr_destination":"1002",</div>
          <div><span class="" style="white-space:pre">          </span>"cgr_setuptime":"1471623526",</div>
          <div><span class="" style="white-space:pre">          </span>"cgr_computelcr":"true"},]
            (251)</div>
          <div> 2(12196) DEBUG: evapi [evapi_dispatch.c:630]:
            evapi_relay(): Len of write is 8</div>
          <div> 2(12196) INFO: <script>: suspended transaction:
            59559 / 1886589610</div>
        </div>
        <div>.</div>
        <div>.</div>
        <div>.</div>
        <div><br>
        </div>
        <div>However no reply from CGRateS comes, tcpdump is quiet (no
          message was sent or received), as well as my testing telnet
          session (nothing is received).</div>
        <div><br>
        </div>
        <div>The network doesn't seems to be the issue, as when I write
          "6:Efelin," to the telnet session, kamailio executes the route
          event_route[evapi:message-received]</div>
        <div><br>
        </div>
        <div>Versions:</div>
        <div><br>
        </div>
        <div>
          <div># dpkg -l | grep libev-dev</div>
          <div>ii  libev-dev                      1:4.15-3              
                 amd64</div>
        </div>
        <div><br>
        </div>
        <div>
          <div># uname -a</div>
          <div>Linux cgrates 3.16.0-4-amd64 #1 SMP Debian
            3.16.7-ckt25-2+deb8u3 (2016-07-02) x86_64 GNU/Linux</div>
        </div>
        <div><br>
        </div>
        <div># kamailio -V</div>
        <div>version: kamailio 4.4.2 (x86_64/linux) 384e90</div>
        <div>flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS,
          USE_RAW_SOCKS, 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</div>
        <div>ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144,
          MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT
          PKG_SIZE 8MB</div>
        <div>poll method support: poll, epoll_lt, epoll_et, sigio_rt,
          select.</div>
        <div>id: 384e90 </div>
        <div>compiled on 12:04:04 Aug 19 2016 with gcc 4.9.2</div>
        <div><br>
        </div>
        <div>I wasn't able to find anything that might block the
          connection. Can anyone point me to, how to debug this issue
          further?</div>
        <div><br>
        </div>
        <div>Thanks for any advice.</div>
        <div><br>
        </div>
        <div>Kind regards</div>
        <div><br>
        </div>
        <div>Jan Muranyi</div>
        <div><br>
        </div>
        <div><br>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a> - <a class="moz-txt-link-freetext" href="http://www.kamailio.org">http://www.kamailio.org</a>
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a></pre>
  </body>
</html>