Hello,
I test the evapi modules function , but not full operation ,only receive not send to client
I capture the important setup parameters are as follows:
debug=3
loadmodule "evapi.so"
#----- evapi params ----- #
modparam("evapi", "netstring_format", 0)
modparam("evapi", "workers", 4)
event_route[evapi:connection-new] {
evapi_relay("{ \"event\": \"test\",\n \"data\": { \"fU\": \"fU\" }\n}");
xlog("L_WARN", "new connection from $evapi(srcaddr):$evapi(srcport)\n");
}
scene :
One client connected kamailio server x.x.x.x:8448 use nc tools , I get garbled ,
kamailioserver not sent to me client , Because this is the right format to display josn ?
sh-4.2# nc -n x.x.x.x 8448 ;
øX±š^C
any suggestions or missing something ?
my syslog :
Mar 28 14:31:37 SIP /home/pkg/kamailio-4.2.3/sbin/kamailio[297164]: DEBUG: evapi [evapi_dispatch.c:385]: evapi_accept_client(): new connection - pos[0] from: [x.x.x.x:56215]
Mar 28 14:31:37 SIP /home/pkg/kamailio-4.2.3/sbin/kamailio[297164]: DEBUG: evapi [evapi_dispatch.c:531]: evapi_relay(): relaying event data [{ "event": "test",#012 "data": { "fU": "fU" }#012}]
Mar 28 14:31:37 SIP /home/pkg/kamailio-4.2.3/sbin/kamailio[297164]: DEBUG: evapi [evapi_dispatch.c:561]: evapi_relay(): sent [0x7f939ab158f8] [{ "event": "test",#012 "data": { "fU": "fU" }#012}] (44)
Mar 28 14:31:37 SIP /home/pkg/kamailio-4.2.3/sbin/kamailio[297164]: WARNING: <script>: new connection from x.x.x.x:56215
kamailio server :
root@SIP:/etc/init.d# dpkg -l | grep libev-dev
ii libev-dev 1:4.11-1 amd64 static library, header files, and docs for libev
root@SIP:/etc/init.d# uname -a
Linux SIP 3.2.0-4-amd64 #1 SMP Debian 3.2.46-1+deb7u1 x86_64 GNU/Linux
root@SIP:/home/pkg/kamailio-4.2.3/sbin# ./kamailio -V
version: kamailio 4.2.3 (x86_64/linux)
flags: STATS: Off, USE_TCP, USE_TLS, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, F_MALLOC, DBG_F_MALLOC, 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 on 15:13:09 Mar 27 2015 with gcc 4.7.2
download :