[pjsip] Header initialization/validation in pjlib

Alexander Agranovsky alex at voxeo.com
Tue Nov 13 11:03:16 EST 2007


Never mind, figured this part out. pjsip_parse_hdr with typecasting  
works much better for this kind of task ;-)


On Nov 13, 2007, at 9:48 AM, Alexander Agranovsky wrote:

> Does core/dialog/invite layers contain methods for initializing and
> validating a common header (To:/From:/Contact:) from a string?
>
> E.g. if I just do (pseudocode):
>
> 	                pHeader = (pjsip_hdr*)pjsip_generic_string_hdr_create
> (pTxData->pool,
> 							            "Contact",
> 							            "notvalid");
>   	                pjsip_msg_add_hdr(pTxData->msg, pHeader);
>
> The message goes out with:
>
> Contact: notvalid
>
> What's the best way, given a string, to assign it to a header, but
> make sure is valid at the same time?
>
> Thanks,
> Alex
>
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> pjsip at lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org





More information about the pjsip mailing list