MESSAGE\r\nDate:Sat, 13 Nov 2010 23:29:00 \
GMT\r\nError-Info:<sip:not-in-service-recording@atlanta.\
com>\r\nExpires:30\r\nFrom:sip:+12125551212@server.phone2net.com;\
- tag=887s\r\nVia: localhost\r\n\r\n")
+ tag=887s\r\nIn-Reply-To:70710@saturn.bell-tel.com,17320@saturn.\
+ bell-tel.com\r\nVia: localhost\r\n\r\n")
});
let finished = request.and_then(|(socket, _request)| {
tag!(b"Authorization:"),
credentials));
+named!(call_id<CallId>, tuple!(
+ word,
+ opt!(preceded!(
+ tag!(b"@"),
+ word))));
+
named!(call_id_header<CallId>, preceded!(
alt!(tag!(b"Call-ID:") | tag!(b"i")),
- tuple!(
- word,
- opt!(preceded!(
- tag!(b"@"),
- word)))));
+ call_id));
named!(purpose<Purpose>, alt!(
tag!(b"icon") => { |_| Purpose::Icon } |
tag!(b";"),
from_param)))));
+named!(in_reply_to_header<Vec<CallId>>, preceded!(
+ tag!(b"In-Reply-To:"),
+ separated_nonempty_list!(
+ tag!(","),
+ call_id)));
+
named!(pub header<Header>, alt!(
// RFC 3261 Headers
accept_header => { |a| Header::Accept(a) } |
date_header => { |d| Header::Date(d) } |
error_info_header => { |e| Header::ErrorInfo(e) } |
expires_header => { |e| Header::Expires(e) } |
- from_header => { |f| Header::From(f) }
+ from_header => { |f| Header::From(f) } |
+ in_reply_to_header => { |i| Header::InReplyTo(i) }
));
ErrorInfo(Vec<ErrorUri>),
Expires(u32),
From(From),
+ InReplyTo(Vec<CallId>),
To(Uri),
Extension { name: String, value: String },
}