Subject: | StatelessProxy URI resolution failure message lacks context |
Date: | Mon, 20 Nov 2017 12:42:26 +0000 |
To: | "bug-Net-SIP [...] rt.cpan.org" <bug-Net-SIP [...] rt.cpan.org> |
From: | Richard Carver <richard.carver [...] cloudmont.co.uk> |
Net::SIP::StatelessProxy performs asynchronous DNS lookups and if the lookup fails the error can occur some time after the SIP message has already been logged as sent. In a busy system this can make it very difficult to work out which SIP message the resolve failure relates to. A step forward would be to log the DNS entry that failed to resolve. I have run with the below patch for the last few months and it is usually sufficient to allow me to diagnose the issue:
--- /usr/local/share/perl5/Net/SIP/StatelessProxy.pm.orig 2017-11-20 12:20:32.904627642 +0000
+++ /usr/local/share/perl5/Net/SIP/StatelessProxy.pm 2017-11-20 12:21:20.453962420 +0000
@@ -432,7 +432,7 @@
my $entry = shift;
if (@_) {
- DEBUG(10,"failed to resolve URI: @_");
+ DEBUG(10,"failed to resolve URI %s: @_", $entry->{nexthop});
return;
}