[reSIProcate] How to extract parameters from Contact Header?
Jason Fischl
jason at counterpath.com
Fri Dec 2 13:46:10 CST 2005
On 12/2/05, Jason Fischl <jason at counterpath.com> wrote:
> > Contact: <sip:1000 at 10.10.10.10: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
More information about the resiprocate-devel
mailing list