> If you want to iterate through each header field in the message, you > should start from msg_chain_head(msg) and then proceed in order, e.g., > > for (next = msg_chain_head(msg); *next; next = &(*next)->sh_next) { > sip_header_t *sh = (*next); > msg_hclass_t const *hc = sh->sh_class; > if (sip_is_via(sh) { > sip_via_t const*via = (sip_via_t *)sh; > .... > } > ... > } > > The list of all the message components ("chain") also includes some > non-header elements, like request-line, status-line and message body. > There is also some complications with so called "list" headers like > Require, their values are combined with their first occurrence, so > headers like > > Require: 100rel > Supported: timer > Require: xyzzy > > will have one sip_require_t structure with tokens "100rel" and > "xyzzy", one sip_supported_t structure with "timer" and a dummy > sip_require_t structure in the chain. >
Hi, I'm reopening this old thread to ask you a related question. I am using nua interface and I would like to extract headers inside my nua_callback_f function. Problem is that there is only sip_t as a parameter and not msg_t. Is there any way to get it using nua interface? Thanks Martin ------------------------------------------------------------------------------ Join us December 9, 2009 for the Red Hat Virtual Experience, a free event focused on virtualization and cloud computing. Attend in-depth sessions from your desk. Your couch. Anywhere. http://p.sf.net/sfu/redhat-sfdev2dev _______________________________________________ Sofia-sip-devel mailing list Sofia-sip-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel