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

Re: [reSIProcate] How to extract parameters from Contact Header?


On 12/2/05, Jason Fischl <jason@xxxxxxxxxxxxxxx> wrote:
> > Contact: <sip:1000@xxxxxxxxxxx:5060>;video;audio
> >
> > I need to test whether the "video" and "audio" parameters are present.
> >
> > How do I do this with resiprocate API?
> >
> > The Resip Overview document describes how to get the individual contacts
> > via:
> >
> > for (NameAddrs::const_iterator i =
> > msg->header(h_Contacts).begin(); i !=
> > msg->header(h_Contacts.end(); ++i){
> >
> >     const NameAddr& na = *i;
> >
> >     ...;
> >
> > But, how do I get parameters from the Contact line?
> >
>
> NameAddr contact;
> ExtensionParameter p_video("video");
> assert (contact.exists(p_video));
>
>
It turns out that p_video is already defined (so the above won't
work). The behavior if you override a defined parameter is a bit hard
to debug.

Jason