[reSIProcate] accessing headers parameters

Jason Fischl jason at purplecomm.com
Tue Nov 23 11:06:36 CST 2004


Gianluca Martiniello wrote:
> Hi,
> 
> I am trying to use resiprocate to implement a registrar server. I need 
> to access various headers parameters (e.g. "expires" parameter in 
> contact header) and I wonder if there is some way to get a parameter 
> value from an header.
> 
> For instance, when I need to get the header contact from a sip message 
> what I do is:
> 
> NameAddrs contacts = sipmessage->header(h_Contacts);
> 
> Is there a similar method to get the parameters associated to this 
> header? Something like:
> 
> IntegerParameter expires = contacts.parameter(p_expires);
> 

Yes
// access the value:
int expires = contacts.param(p_expires);

// set the vlaue
contacts.param(p_expires) = 50;

Some more documentation on using the parser.
http://www.sipfoundry.org/reSIProcate/using.txt

> 
> Thanks in advance,
> 
> Gianluca
> _______________________________________________
> resiprocate-devel mailing list
> resiprocate-devel at list.sipfoundry.org
> https://list.sipfoundry.org/mailman/listinfo/resiprocate-devel




More information about the resiprocate-devel mailing list