From aa879382adf173c3814657a028554cf4e1f08b40 Mon Sep 17 00:00:00 2001 From: Victor Seva Date: Tue, 16 Jul 2013 12:06:35 +0200 Subject: [PATCH] bin/ulog_parser.pl: do not mix msg_out. --- bin/ulog_parser.pl | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/bin/ulog_parser.pl b/bin/ulog_parser.pl index 3441afa7..c92ae558 100755 --- a/bin/ulog_parser.pl +++ b/bin/ulog_parser.pl @@ -93,11 +93,25 @@ while($line = <$log>) { do { - $msg =~ s/#015#012/\n/g; - push($data->{'sip_out'}, $msg); + if(($callid) = ($msg =~ m/.+Call-ID: ([^#]+)#015#012.+$/si)) + { + if($data->{'callid'} eq $callid) + { + $msg =~ s/#015#012/\n/g; + push($data->{'sip_out'}, $msg); + } + else + { + print "Not this Call-ID:$msg\n" + } + } + else + { + print "No Call-ID\n"; + } $line = <$log>; #print substr($line, 34, 25)."\n"; - if(!$line) { $line = '' } + if(!$line) { $line = ''; } }while(($msg) = ($line =~ m/.+msg out:{(.+)}$/)); #print "msg_out\n"; }