[reSIProcate] IntergerCategory

Byron Campen bcampen at estacado.net
Thu Jul 5 08:59:07 CDT 2007


	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.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20070705/2511fd5a/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2423 bytes
Desc: not available
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20070705/2511fd5a/attachment.bin>


More information about the resiprocate-devel mailing list