[asterisk-dev] chan_sip.c - get_header() segmentation fault

Thomas Hecker thomas.hecker at gmail.com
Thu Mar 15 08:19:46 MST 2007


Hi,

at the end of chan_sip.c's initreqprep() function all the headers are added
to the sip message:

    add_header(req, "To", to);
    ast_string_field_set(p, exten, l);
    build_contact(p);
    add_header(req, "Contact", p->our_contact);
    add_header(req, "Call-ID", p->callid);
    add_header(req, "CSeq", tmp);
    add_header(req, "User-Agent", global_useragent);
    add_header(req, "Max-Forwards", DEFAULT_MAX_FORWARDS);

But when I try to get one of these values with a call to
    get_header(req, "Contact") subsequent to the add_headers I get a
segmentation fault.

Anybody has an Idea why?

Thank you very much!
Thomas Hecker
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-dev/attachments/20070315/230a8923/attachment-0001.htm


More information about the asterisk-dev mailing list