- Again '*' Contact header in unREGISTER

- new: tools/extract_sip.pl
This commit is contained in:
Thomas Ries
2004-03-30 19:45:01 +00:00
parent 2fba2bcb3b
commit e3ed50d8db
4 changed files with 53 additions and 17 deletions

26
tools/extract_sip.pl Executable file
View File

@@ -0,0 +1,26 @@
#!/usr/bin/perl
#
#
# extract a buffer dump from siproxd's debug log and
# write the plain content into a file. This file then
# may be used to feed netcat for a replay.#
#
# $ netcat -u siphost 5060 < buffer.sip
#
# usage:
# reads from STDIN and writes to STDOUT
#
# $ cat bufferdump.log | extract_sip.pl > buffer.sip
while (<>) {
# strip off CR/LF
chomp;
# cut out the hex digits and store them into an array
my @hex=split(/ /, substr($_, 2, 47));
for (my $i=0; $i<16; $i++) {
# write HEX byte as character
print chr(hex($hex[$i]));
}
}