-
-
Notifications
You must be signed in to change notification settings - Fork 149
Open
Description
For SIP INVITEs, sipgo's server transaction automatically generates and sends a 100 Trying provisional response after the transaction's timer_1xx expires:
sipgo/sip/transaction_server_tx.go
Lines 55 to 66 in 3329965
| tx.timer_1xx = time.AfterFunc(Timer_1xx, func() { | |
| trying := NewResponseFromRequest( | |
| tx.Origin(), | |
| 100, | |
| "Trying", | |
| nil, | |
| ) | |
| // tx.Log().Trace("timer_1xx fired") | |
| if err := tx.Respond(trying); err != nil { | |
| tx.log.Error("send '100 Trying' response failed", "error", err, "tx", tx.Key()) | |
| } | |
| }) |
However, this happens (in NewResponseFromRequest) solely based on the request's source address and does not take its Via header into account:
Line 252 in 3329965
| res.SetDestination(req.Source()) |
Thus, the request's sender may not receive the 100 Trying at all if they are not reachable or ready to receive responses at the request's source address. Correct me if I'm wrong, but as far as I understand, all responses (including provisional ones) should use the Via header for this.
Metadata
Metadata
Assignees
Labels
No labels