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

Re: [reSIProcate-users] Accessing Contact header info


You can do the following:

if (msg->header(h_Contact).param(p_transport) ==  Symbols::TCP) ...

Converting to strings is a fairly inefficient and unnecessary approach
with resip. If you use Data class to do your comparisons you'll save a
lot of memory copies.

Jason




On Sun, Jan 4, 2009 at 10:39 AM,  <james@xxxxxxxxxx> wrote:
> How do you access the contact header of a 180 response, and in particular, 
> check if the phone is using tcp or udp.
>
> I was thinking
>
> resip::NameAddr contact = msg->header(resip::h_Contact);
> std::string trans(contact.uri().param(resip::p_transport).c_str());
>
> Am I nearly right, apart from the first line?
>
> Thanks
>
> _______________________________________________
> resiprocate-users mailing list
> resiprocate-users@xxxxxxxxxxxxxxx
> List Archive: http://list.resiprocate.org/archive/resiprocate-users/
>