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

Re: [reSIProcate] Response Codes


> How do I check to see if a SipMessage is a 200 or some other response
> code?

const SipMessage *msg;

if (msg->isResponse())
{
  if (msg->header(h_StatusLine).statusCode() == 200)
  {
     ...
  }
}

david

P.S. Not a good sign that wasn't 'intuitively obvious to the most casual of
observer' :-)

You can see this interface is SipMessage.hxx if you know what to look for;
The overloaded header method.

It is also evident in Headers.hxx, again, if you more or less know what to look 
for.

Once you figure out that the status line is represented as StatusLine, you are
home free.


Quoting Dan Weber <dan@xxxxxxxxxxxxxx>:

> How do I check to see if a SipMessage is a 200 or some other response
> code?
> 
> Dan
> _______________________________________________
> resiprocate-devel mailing list
> resiprocate-devel@xxxxxxxxxxxxxxxxxxx
> https://list.sipfoundry.org/mailman/listinfo/resiprocate-devel
>