Hello,
did you get the evapi message on your application or telnet connection?
Can you give the output of:
kamctl ps
to see if the evapi processes are running?
Cheers,
Daniel
Hi folks,
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.
Taken steps:
I start kamailio with debug=3.
I start:CGRates (on the kamailio machine)telnet 192.168.30.29 8448 (from my PC)tcpdump port 8448 -A -s0 -i any (on the kamailio machine)
Telnet command successfully connects to kamailio. Kamailio yells:
root@cgrates:/opt/kamailio/src/kamailio-4.4/kamailio# 11(12205) DEBUG: evapi [evapi_dispatch.c:453]: evapi_accept_client(): new connection - pos[1] from: [192.168.30.1:40312]11(12205) INFO: <script>: Starting Evapi connector srcaddr 192.168.30.1 srcport 40312 condix 111(12205) DEBUG: htable [ht_var.c:90]: pv_set_ht_cell(): set value for $sht(cgrconn=>cgr)
A similar message is printed when CGRateS connects in.
Afterwards I make a call to Kamailio. INVITE is routed to a following command:
evapi_async_relay("{\"event\":\"CGR_AUTH_REQUEST\",\"tr_index\":\"$T(id_index)\",\"tr_label\":\"$T(id_label)\",\"cgr_reqtype\":\"$dlg_var(cgrReqType)\",\"cgr_tenant\":\"$dlg_var(cgrTenant)\",\"cgr_account\":\"$dlg_var(cgrAccount)\",\"cgr_destination\":\"$dlg_var(cgrDestination)\",\"cgr_setuptime\":\"$TS\",\"cgr_computelcr\":\"true\"}");
Now the kamailio writes:
...2(12196) DEBUG: dialog [dlg_var.c:260]: print_lists(): Dialog var-list (0x7f196d1c5248):2(12196) DEBUG: dialog [dlg_var.c:265]: print_lists(): cgrDestination=1002 (flags 1)2(12196) DEBUG: dialog [dlg_var.c:265]: print_lists(): cgrAccount=1001 (flags 1)2(12196) DEBUG: dialog [dlg_var.c:265]: print_lists(): cgrTenant=cgrates.org (flags 1)2(12196) DEBUG: dialog [dlg_var.c:265]: print_lists(): cgrReqType=*prepaid (flags 1)2(12196) DEBUG: dialog [dlg_hash.c:922]: dlg_unref(): unref dlg 0x7f196d1c4c08 with 1 -> 12(12196) DEBUG: evapi [evapi_dispatch.c:603]: evapi_relay(): relaying event data [{"event":"CGR_AUTH_REQUEST","tr_index":"59559","tr_label":"1886589610","cgr_reqtype":"*prepaid","cgr_tenant":"cgrates.org","cgr_account":"1001","cgr_destination":"1002","cgr_setuptime":"1471623526","cgr_computelcr":"true"}] (246)2(12196) DEBUG: evapi [evapi_dispatch.c:628]: evapi_relay(): sending [0x7f196d1c88b8] [246:{"event":"CGR_AUTH_REQUEST","tr_index":"59559","tr_label":"1886589610","cgr_reqtype":"*prepaid","cgr_tenant":"cgrates.org","cgr_account":"1001","cgr_destination":"1002","cgr_setuptime":"1471623526","cgr_computelcr":"true"},] (251)2(12196) DEBUG: evapi [evapi_dispatch.c:630]: evapi_relay(): Len of write is 82(12196) INFO: <script>: suspended transaction: 59559 / 1886589610...
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).
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]
Versions:
# dpkg -l | grep libev-devii libev-dev 1:4.15-3 amd64
# uname -aLinux cgrates 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt25-2+deb8u3 (2016-07-02) x86_64 GNU/Linux
# kamailio -Vversion: kamailio 4.4.2 (x86_64/linux) 384e90flags: 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_RESADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MBpoll method support: poll, epoll_lt, epoll_et, sigio_rt, select.id: 384e90compiled on 12:04:04 Aug 19 2016 with gcc 4.9.2
I wasn't able to find anything that might block the connection. Can anyone point me to, how to debug this issue further?
Thanks for any advice.
Kind regards
Jan Muranyi
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierla http://www.asipto.com - http://www.kamailio.org http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda