Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/transaction/endpoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ impl EndpointInner {

match event {
TransportEvent::Incoming(msg, connection, from) => {
match self.on_received_message(msg, connection).await {
match self.on_received_message(msg, connection, &from).await {
Ok(()) => {}
Err(e) => {
warn!(addr=%from,"on_received_message error: {}", e);
Expand Down Expand Up @@ -331,6 +331,7 @@ impl EndpointInner {
self: &Arc<Self>,
msg: SipMessage,
connection: SipConnection,
from: &SipAddr,
) -> Result<()> {
let mut key = match &msg {
SipMessage::Request(req) => {
Expand Down Expand Up @@ -394,6 +395,11 @@ impl EndpointInner {
return Ok(());
}
}
rsip::StatusCodeKind::RequestFailure => {
// for ACK to 487, send it where it came from
connection.send(last_message, Some(from)).await?;
return Ok(());
}
_ => {}
}
if let Ok(Some(tag)) = resp.to_header()?.tag() {
Expand Down