From b6a85c1187de74b1552f808b8a7d4717b96be72e Mon Sep 17 00:00:00 2001 From: Thomas Berezansky Date: Fri, 20 May 2011 21:11:20 -0400 Subject: [PATCH] Item extra ILS-defined fields Signed-off-by: Thomas Berezansky --- Sip/MsgType.pm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Sip/MsgType.pm b/Sip/MsgType.pm index 7649731..d1e3c2a 100644 --- a/Sip/MsgType.pm +++ b/Sip/MsgType.pm @@ -1129,6 +1129,16 @@ sub handle_item_information { $resp .= maybe_add(FID_CALL_NUMBER, $item->call_number); # Extension for AMH sorting $resp .= maybe_add(FID_SCREEN_MSG, $item->screen_msg); $resp .= maybe_add(FID_PRINT_LINE, $item->print_line); + + # Custom ILS-defined protocol extensions + if ($item->can('extra_fields')) { + my $extra_fields = $item->extra_fields(); + foreach my $field (keys %$extra_fields) { + foreach my $value (@{$extra_fields->{ $field }}) { + $resp .= maybe_add($field, $value); + } + } + } } $self->write_msg($resp); -- 2.11.0