< Previous by Date Date Index Next by Date >
  Thread Index  

[reSIProcate] Another minor issue: wrong reason text sent by rejectNIT


If I call InviteSession::rejectNIT after (for example) receiving an INFO message, it sends a response beginning:
   SIP/2.0 488 OK
rather than the expected
   SIP/2.0 488 Not Acceptable Here

The reason is that the response message is pre-built (with 200 OK) when the INFO is received, and rejectNIT changes the status code but doesn't change the reason text.

It might be useful to factor out the code that computes the text from the status code from Helper::makeResponse into a separate helper function, so rejectNIT can make use of it.

I suspect the same problem affects acceptNIT, if anyone were ever to pass a status code other than the default 200 to it.

- Alan