[reSIProcate] IntergerCategory

Tuan Viet Nguyen ntvietv at yahoo.com
Thu Jul 5 10:59:01 CDT 2007


Thanks Byron & Ryan, it works.

Regards,
Viet

----- Original Message ----
From: Byron Campen <bcampen at estacado.net>
To: Tuan Viet Nguyen <ntvietv at yahoo.com>
Cc: resiprocate-devel at list.resiprocate.org
Sent: Thursday, July 5, 2007 9:59:07 AM
Subject: Re: [reSIProcate]  IntergerCategory

	The Content-Length header is a special case: it is calculated on-the-fly as the SipMessage is encoded. You can't override it. If you have no contents attached to the SipMessage, the Content-Length will be encoded as 0.


Best regards,
Byron Campen


Thanks for your answer Byron. I did as you said

SipMessage *msg;
msg->header(h_ContentLength).value() = 100;

I verified the value of mValue in the Content-Length field, it was 100. But when I convert this SipMessage to char* using the following method and print the result, I have always "Content-Length: 0" in the SIP header

Data data = Data::from(*msg);
const char* result = data.c_str();

Do you have any ideas?

Thanks,
Viet

----- Original Message ----
From: Byron Campen <bcampen at estacado.net>
To: Tuan Viet Nguyen <ntvietv at yahoo.com>
Cc: resiprocate-devel at list.resiprocate.org
Sent: Wednesday, July 4, 2007 10:32:37 AM
Subject: Re: [reSIProcate] IntergerCategory

	To set IntegerCategory::mValue (or the more recent UInt32Category::mValue), you do the following:


IntegerCategory i;
i.value()=100;


A specific example of this is setting a Max-Forwards header:


SipMessage msg;
msg.header(h_MaxForwards).value()=20;


Best regards,
Byron Campen




Hello,

I tried to set the value of the mValue attribut of an IntergerCategory object using param,
but I did not find the name of the parameter in ParserCategory.
Is it possible to do it like that?

IntegerCategory i;
i.param(<"I dont know">) = 100 ;

Thanks
Viet


It's here! Your new message!
Get new email alerts with the free Yahoo! Toolbar._______________________________________________
resiprocate-devel mailing list
resiprocate-devel at list.resiprocate.org
https://list.resiprocate.org/mailman/listinfo/resiprocate-devel







Looking for a deal? Find great prices on flights and hotels with Yahoo! FareChase.







       
____________________________________________________________________________________
Got a little couch potato? 
Check out fun summer activities for kids.
http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities+for+kids&cs=bz 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20070705/a39b32fd/attachment.htm>


More information about the resiprocate-devel mailing list