PJSIP Logger not working for the new commands

Hello,
I don’t know if I’m doing something wrong, but some pjsip logger commands not work for me:

CLI> pjsip set logger host 10.1.96.0/255.255.255.0
PJSIP Logging Enabled for host:
[2020-07-21 11:12:08] ERROR[128421]: netsock2.c:96 ast_sockaddr_stringify_fmt: getnameinfo(): ai_family not supported

CLI> pjsip set logger on 10.1.96.0/255.255.255.0
Usage: pjsip set logger {on|off|host <name/subnet>|add <name/subnet>|verbose <on/off>|pcap }
Enables or disabling logging of SIP packets
read on ports bound to PJSIP transports either
globally or enables logging for an individual
host.

CLI> pjsip set logger on 10.1.96.0/255.255.255.0 add
Usage: pjsip set logger {on|off|host <name/subnet>|add <name/subnet>|verbose <on/off>|pcap }
Enables or disabling logging of SIP packets
read on ports bound to PJSIP transports either
globally or enables logging for an individual
host.

CLI> pjsip set logger pcap /tmp/packets.cap

the packets.pcap file is always empty:

-rw-r–r-- 1 asterisk asterisk 0 Jul 21 11:14 packets.cap

I’m using Asterisk 16.12.0 from sources.

Regards
Any hint

The pcap has to be configured before turning logging on. If you do that first and then enable logging, does it work?

As well the getnameinfo is just a cosmetic thing, an issue should be filed for it[1].

[1] https://issues.asterisk.org/jira

After logging on the pjsip logger, the file begin to fill.

I don’t understood if the second and third command have to work or not.

Thank’s

Regards

on the Pcap file all SIP messages came from Asterisk have IP 0.0.0.0 like this:

Captura de Pantalla 2020-07-22 a la(s) 10.20.47

Yes, the packet headers are constructed and it is not precisely known the target at the point they are constructed and keeping track of stuff was too complicated. Packets are also all UDP, even if using TCP/TLS. The logging is strictly of SIP traffic, and through examining the SIP traffic itself you can determine the target and transport.

This is not raw on the wire capture.

Thank you for the clarification

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.