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

RE: [reSIProcate] Convert Parameter into a string


Try:

if (msg.header(h_To).exists(p_tag))
{
   Data tag = msg.header(h_To).param(p_tag);
   cout << tag;
}

Scott
> -----Original Message-----
> From: resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxx
[mailto:resiprocate-
> devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Lorenzo
> Sent: Thursday, March 30, 2006 10:26 AM
> To: resiprocate-devel@xxxxxxxxxxxxxxxxxxx
> Subject: [reSIProcate] Convert Parameter into a string
> 
> Hello,
> I've got headers object (like NameAddr, Via etc etc) and I view them
> with a ParseCategory pointer.
> I want to get getParameterByEnum and convert the resoult into a Data.
> 
> I wrote these lines but it gives me empty Data, do you know why?
> 
> --> There is a SipMessage called "msg" with a To header with a tag
> parameter...
> 
> NameAddr nad = msg.header(h_To);
> ParseCategory* pc = &nad;
> resip::Data nad =
> resip::Data::from(pc->getParameterByEnum(resip::ParameterTypes::tag));
> cout << std::string(nad.c_str()); // print "00000000"
> 
> Any help really appreciated!
> 
> Thank you,
> 
> LB
> 
> _______________________________________________
> resiprocate-devel mailing list
> resiprocate-devel@xxxxxxxxxxxxxxxxxxx
> https://list.sipfoundry.org/mailman/listinfo/resiprocate-devel