[SR-Users] JSON-RPC dgram_socket just part of the output

Ilie Soltanici iliusha.md at gmail.com
Thu Aug 25 15:48:36 CEST 2022


Hello,

No, in Wireshark I also see just a part of the output, which is not the
full JSON object, so the problem is somewhere in Kamailio.
You can try to replicate this by yourself when will have a chance. The
version I'm using is: version: kamailio 5.6.0 (x86_64/linux) b552a2

Thanks.

On Thu, 25 Aug 2022 at 14:13, Henning Westerholt <hw at gilawa.com> wrote:

> Hello,
>
>
>
> if you see in wireshark that all data gets delivered from Kamailio, maybe
> it’s a problem with the “nc” client?
>
>
>
> Cheers,
>
>
>
> Henning
>
>
>
> --
>
> Henning Westerholt – https://skalatan.de/blog/
>
> Kamailio services – https://gilawa.com
>
>
>
> *From:* Ilie Soltanici <iliusha.md at gmail.com>
> *Sent:* Thursday, August 25, 2022 1:12 PM
> *To:* Henning Westerholt <hw at gilawa.com>; Henning Westerholt <
> hw at gilawa.com>
> *Cc:* Kamailio (SER) - Users Mailing List <sr-users at lists.kamailio.org>
> *Subject:* Re: [SR-Users] JSON-RPC dgram_socket just part of the output
>
>
>
> @Henning Westerholt <hw at skalatan.de> ,
>
>
>
> Not sure that it's related to the UDP fragmentation because in Wireshark I
> can see some packets coming from the server, yes they are fragmented but I
> can't understand why just part of them arrive at the client.
>
>
>
>
>
> In the Kamailio logs there are no warnings or errors, just some debug
> messages:
>
>
>
> ```
>
> Aug 25 09:48:49 svr[25699]: DEBUG: ctl [io_listener.c:518]:
> handle_stream_read(): bytes processed: 40
> Aug 25 09:48:49 svr[25699]: DEBUG: ctl [io_listener.c:495]:
> handle_stream_read(): handle_stream read: eof on
> /var/run/kamailio/kamailio_ctl
> Aug 25 09:48:49 svr[25699]: DEBUG: ctl [../../core/io_wait.h:600]:
> io_watch_del(): DBG: io_watch_del (0x7f0a6b972340, 22, -1, 0x10) fd_no=4
> called
> Aug 25 09:48:50 svr[25699]: DEBUG: ctl [../../core/io_wait.h:375]:
> io_watch_add(): processing io_watch_add(0x7f0a6b972340, 22, 3, 0x1f0f350) -
> fd_no=3
> Aug 25 09:48:50 svr[25699]: DEBUG: ctl [io_listener.c:442]:
> handle_new_connect(): handle_stream read: new connection (1) on
> /var/run/kamailio/kamailio_ctl
> Aug 25 09:48:50 svr[25699]: DEBUG: ctl [io_listener.c:498]:
> handle_stream_read(): bytes read: 18
> Aug 25 09:48:50 svr[25699]: DEBUG: ctl [io_listener.c:518]:
> handle_stream_read(): bytes processed: 18
> Aug 25 09:48:50 svr[25699]: DEBUG: ctl [io_listener.c:498]:
> handle_stream_read(): bytes read: 18
> Aug 25 09:48:50 svr[25699]: DEBUG: ctl [io_listener.c:518]:
> handle_stream_read(): bytes processed: 18
> Aug 25 09:48:50 svr[25699]: DEBUG: ctl [io_listener.c:498]:
> handle_stream_read(): bytes read: 21
> Aug 25 09:48:50 svr[25699]: DEBUG: ctl [io_listener.c:518]:
> handle_stream_read(): bytes processed: 21
> Aug 25 09:48:50 svr[25699]: DEBUG: ctl [io_listener.c:498]:
> handle_stream_read(): bytes read: 21
> Aug 25 09:48:50 svr[25699]: DEBUG: ctl [io_listener.c:518]:
> handle_stream_read(): bytes processed: 21
> Aug 25 09:48:50 svr[25699]: DEBUG: ctl [io_listener.c:498]:
> handle_stream_read(): bytes read: 25
> Aug 25 09:48:50 svr[25699]: DEBUG: ctl [io_listener.c:518]:
> handle_stream_read(): bytes processed: 25
> Aug 25 09:48:50 svr[25699]: DEBUG: ctl [io_listener.c:495]:
> handle_stream_read(): handle_stream read: eof on
> /var/run/kamailio/kamailio_ctl
> Aug 25 09:48:50 svr[25699]: DEBUG: ctl [../../core/io_wait.h:600]:
> io_watch_del(): DBG: io_watch_del (0x7f0a6b972340, 22, -1, 0x10) fd_no=4
> called
>
> ```
>
>
>
> Thanks.
>
>
>
> On Thu, 25 Aug 2022 at 07:43, Henning Westerholt <hw at gilawa.com> wrote:
>
> Hello,
>
>
>
> any errors in the log when you execute the command? Maybe its related to
> fragmentation of the UDP packet?
>
>
>
> Cheers,
>
>
>
> Henning
>
>
>
> --
>
> Henning Westerholt – https://skalatan.de/blog/
>
> Kamailio services – https://gilawa.com
>
>
>
> *From:* sr-users <sr-users-bounces at lists.kamailio.org> *On Behalf Of *Ilie
> Soltanici
> *Sent:* Thursday, August 25, 2022 2:13 AM
> *To:* Kamailio (SER) - Users Mailing List <sr-users at lists.kamailio.org>
> *Subject:* [SR-Users] JSON-RPC dgram_socket just part of the output
>
>
>
> Hello,
>
>
>
> I'm trying to get the dispatcher status from kamailio through the UDP
> datagram but for some reason, it is getting just part of the output. Is
> there any buffer that I have to increase to get the complete output?
>
>
>
> command used:
>
> ```
>
> echo '{"jsonrpc": "2.0", "method": "dispatcher.list", "reply_name":
> "kamailio_reply_fifo", "id": 1}' | nc -u 192.168.1.1 8090
>
> ```
>
>
>
> kamailio related config:
>
> modparam("jsonrpcs", "fifo_name", "/tmp/kamailio_request.fifo")
>
> modparam("jsonrpcs", "transport", 6)
>
> modparam("jsonrpcs", "fifo_mode", 0600)
>
> modparam("jsonrpcs", "fifo_user", "kamailio")
>
> modparam("jsonrpcs", "dgram_socket", "udp:MY_INTERNAL_IP_ADDR:8090")
>
> modparam("jsonrpcs", "dgram_timeout", 2000)
>
> modparam("jsonrpcs", "pretty_format", 1)
>
>
>
> output:
>
>
>
> Thanks
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20220825/d52e6cf1/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 250327 bytes
Desc: not available
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20220825/d52e6cf1/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 131222 bytes
Desc: not available
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20220825/d52e6cf1/attachment-0001.png>


More information about the sr-users mailing list