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 1 11(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 -> 1 2(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 8 2(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-dev ii libev-dev 1:4.15-3 amd64
# uname -a Linux cgrates 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt25-2+deb8u3 (2016-07-02) x86_64 GNU/Linux
# kamailio -V version: kamailio 4.4.2 (x86_64/linux) 384e90 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 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: 384e90 compiled 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
Hi, Use "ngrep -t -W byline port 8448" to sniff the port and see if it helps.
regards Ganesh Kumar
On 8/19/16, Efelin Novak efelin.novak@gmail.com wrote:
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 1 11(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 -> 1 2(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 8 2(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-dev ii libev-dev 1:4.15-3 amd64
# uname -a Linux cgrates 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt25-2+deb8u3 (2016-07-02) x86_64 GNU/Linux
# kamailio -V version: kamailio 4.4.2 (x86_64/linux) 384e90 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 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: 384e90 compiled 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
Hi,
thanks for a reply. Command "ngrep -d any -t -W byline port 8448" prints
#####
when CGRateS and telnet connect (TCP handshakes) and stays quiet during the rest of the test. When I type something into telnet, I can see incoming packets:
T 2016/08/22 09:18:21.115922 192.168.30.1:46378 -> 192.168.30.29:8448 [AP] efelin.
Unfortunetely I am no closer to resolving my issue.
Netstat shows:
root@cgrates:/usr/share/cgrates/tutorials/kamevapi/cgrates/etc/init.d# netstat -tlpnueea | grep kamailio tcp 0 0 0.0.0.0:8448 0.0.0.0:* LISTEN 0 78179 14540/kamailio tcp 0 0 192.168.30.29:5060 0.0.0.0:* LISTEN 0 78149 14548/kamailio tcp 0 0 127.0.0.1:8448 127.0.0.1:51976 ESTABLISHED 0 78552 14540/kamailio tcp 0 0 192.168.30.29:8448 192.168.30.1:46432 ESTABLISHED 0 78493 14540/kamailio udp 0 0 192.168.30.29:5060 0.0.0.0:* 0 78147 14529/kamailio
Thanks.
Jan
2016-08-20 4:22 GMT+02:00 Infinicalls Infinicalls infinicalls@gmail.com:
Hi, Use "ngrep -t -W byline port 8448" to sniff the port and see if it helps.
regards Ganesh Kumar
On 8/19/16, Efelin Novak efelin.novak@gmail.com wrote:
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 1 11(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 -> 1 2(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 8 2(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-dev ii libev-dev 1:4.15-3 amd64
# uname -a Linux cgrates 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt25-2+deb8u3 (2016-07-02) x86_64 GNU/Linux
# kamailio -V version: kamailio 4.4.2 (x86_64/linux) 384e90 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 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: 384e90 compiled 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
Hello,
did you get the event_route[evapi:connection-new] executed when you opened the connection towards evapi?
Cheers, Daniel
On 22/08/16 09:26, Efelin Novak wrote:
Hi,
thanks for a reply. Command "ngrep -d any -t -W byline port 8448" prints
#####
when CGRateS and telnet connect (TCP handshakes) and stays quiet during the rest of the test. When I type something into telnet, I can see incoming packets:
T 2016/08/22 09:18:21.115922 192.168.30.1:46378 http://192.168.30.1:46378 -> 192.168.30.29:8448 http://192.168.30.29:8448 [AP] efelin.
Unfortunetely I am no closer to resolving my issue.
Netstat shows:
root@cgrates:/usr/share/cgrates/tutorials/kamevapi/cgrates/etc/init.d# netstat -tlpnueea | grep kamailio tcp 0 0 0.0.0.0:8448 http://0.0.0.0:8448 0.0.0.0:* LISTEN 0 78179 14540/kamailio tcp 0 0 192.168.30.29:5060 http://192.168.30.29:5060 0.0.0.0:* LISTEN 0 78149 14548/kamailio tcp 0 0 127.0.0.1:8448 http://127.0.0.1:8448 127.0.0.1:51976 http://127.0.0.1:51976 ESTABLISHED 0 78552 14540/kamailio tcp 0 0 192.168.30.29:8448 http://192.168.30.29:8448 192.168.30.1:46432 http://192.168.30.1:46432 ESTABLISHED 0 78493 14540/kamailio udp 0 0 192.168.30.29:5060 http://192.168.30.29:5060 0.0.0.0:* 0 78147 14529/kamailio
Thanks.
Jan
2016-08-20 4:22 GMT+02:00 Infinicalls Infinicalls <infinicalls@gmail.com mailto:infinicalls@gmail.com>:
Hi, Use "ngrep -t -W byline port 8448" to sniff the port and see if it helps. regards Ganesh Kumar On 8/19/16, Efelin Novak <efelin.novak@gmail.com <mailto:efelin.novak@gmail.com>> wrote: > 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 <http://192.168.30.1:40312>] > 11(12205) INFO: <script>: Starting Evapi connector srcaddr 192.168.30.1 > srcport 40312 condix 1 > 11(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 <http://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 -> 1 > 2(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 <http://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 <http://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 8 > 2(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-dev > ii libev-dev 1:4.15-3 amd64 > > # uname -a > Linux cgrates 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt25-2+deb8u3 > (2016-07-02) x86_64 GNU/Linux > > # kamailio -V > version: kamailio 4.4.2 (x86_64/linux) 384e90 > 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 > 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: 384e90 > compiled 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 <mailto:sr-users@lists.sip-router.org> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users <http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users>
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
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
On 19/08/16 18:45, Efelin Novak wrote:
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 http://192.168.30.1:40312] 11(12205) INFO: <script>: Starting Evapi connector srcaddr 192.168.30.1 srcport 40312 condix 1 11(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 http://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 -> 1 2(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 http://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 http://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 8 2(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-dev ii libev-dev 1:4.15-3 amd64
# uname -a Linux cgrates 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt25-2+deb8u3 (2016-07-02) x86_64 GNU/Linux
# kamailio -V version: kamailio 4.4.2 (x86_64/linux) 384e90 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 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: 384e90 compiled 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
Hi Daniel,
kamctl ps:
root@cgrates:/usr/share/cgrates/tutorials/kamevapi/cgrates/etc/init.d# kamctl ps Process:: ID=0 PID=14529 Type=main process - attendant Process:: ID=1 PID=14530 Type=udp receiver child=0 sock=192.168.30.29:5060 Process:: ID=2 PID=14531 Type=udp receiver child=1 sock=192.168.30.29:5060 Process:: ID=3 PID=14532 Type=udp receiver child=2 sock=192.168.30.29:5060 Process:: ID=4 PID=14533 Type=udp receiver child=3 sock=192.168.30.29:5060 Process:: ID=5 PID=14534 Type=slow timer Process:: ID=6 PID=14535 Type=timer Process:: ID=7 PID=14536 Type=secondary timer Process:: ID=8 PID=14537 Type=MI FIFO Process:: ID=9 PID=14538 Type=ctl handler Process:: ID=10 PID=14539 Type=TIMER NH Process:: ID=11 PID=14540 Type=EvAPI Dispatcher Process:: ID=12 PID=14541 Type=EvAPI Worker Process:: ID=13 PID=14542 Type=EvAPI Worker Process:: ID=14 PID=14543 Type=Dialog Clean Timer Process:: ID=15 PID=14544 Type=tcp receiver (generic) child=0 Process:: ID=16 PID=14545 Type=tcp receiver (generic) child=1 Process:: ID=17 PID=14546 Type=tcp receiver (generic) child=2 Process:: ID=18 PID=14547 Type=tcp receiver (generic) child=3 Process:: ID=19 PID=14548 Type=tcp main process
When I connect to evapi using telnet, I receive NO answer:
root@PC:~$ telnet 192.168.30.29 8448 Trying 192.168.30.29... Connected to 192.168.30.29. Escape character is '^]'.
However it reacts on my netstring messages and executes the event_route[evapi:message-received].
Thanks for a reply.
Jan
2016-08-22 9:25 GMT+02:00 Daniel-Constantin Mierla miconda@gmail.com:
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
On 19/08/16 18:45, Efelin Novak wrote:
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 1 11(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 -> 1 2(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 8 2(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-dev ii libev-dev 1:4.15-3 amd64
# uname -a Linux cgrates 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt25-2+deb8u3 (2016-07-02) x86_64 GNU/Linux
# kamailio -V version: kamailio 4.4.2 (x86_64/linux) 384e90 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 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: 384e90 compiled 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 listsr-users@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierlahttp://www.asipto.com - http://www.kamailio.orghttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
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
On 22/08/16 09:31, Efelin Novak wrote:
[...]
When I connect to evapi using telnet, I receive NO answer:
root@PC:~$ telnet 192.168.30.29 8448 Trying 192.168.30.29... Connected to 192.168.30.29. Escape character is '^]'.
However it reacts on my netstring messages and executes the event_route[evapi:message-received].
To clarify -- do you have event_route[evapi:connection-new] {...} block defined in your config and it is not executed?
Cheers, Daniel
Hi Daniel,
sorry for not being clear.
I have all three evapi event routes in my config. When I telnet to port 8448, xlog shows that evapi:connection-new is exectued. When I send 6:efelin, to telnet, the evapi:message-received is executed. When I close the telnet session, the evapi:connection-closed is executed. This works just fine. However, when I execute evapi_async_relay or evapi_relay nothing is sent to my telnet session or CGRateS application (This was also observed by ngrep and tcpdump).
My configuration is default from CGRateS: https://github.com/cgrates/cgrates/tree/master/data/tutorials/kamevapi/kamai... (kamailio.cfg and included kamailio-cgrates.cfg) with few xlogs for further debuging +
modparam("evapi", "workers", 2) modparam("evapi", "bind_addr", "0.0.0.0:8448")
I have just downloaded the fresh config in order to evade some typo, but the problem persists.
Thanks
Jan
2016-08-22 9:35 GMT+02:00 Daniel-Constantin Mierla miconda@gmail.com:
On 22/08/16 09:31, Efelin Novak wrote:
[...]
When I connect to evapi using telnet, I receive NO answer:
root@PC:~$ telnet 192.168.30.29 8448 Trying 192.168.30.29... Connected to 192.168.30.29. Escape character is '^]'.
However it reacts on my netstring messages and executes the event_route[evapi:message-received].
To clarify -- do you have event_route[evapi:connection-new] {...} block defined in your config and it is not executed?
Cheers, Daniel
-- Daniel-Constantin Mierlahttp://www.asipto.com - http://www.kamailio.orghttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda