tags:

views:

28

answers:

2

Hi all,

does any one has experience in using pjsip ? I'm trying to parse SIP message without success. Even the simplest program does not work. Here is the code http://pastebin.com/gVTC3zRw it gives my "Segmentation fault". Please help. I'm trying to make it work for 2 day now...

A: 

Ok, I now know what is wrong. Before calling pjsip_parse_msg the endpoint must be initialized :)

pejotr
A: 

This isn't answer but a second question. How did you initialize the endpoint? What code did you use? I am running into the exact same problem as you yet when I add pjsip_endpt_create I still get Seg Faults from the pjsip_parse_msg function. Please advise.

tjthomas
Hi, here is the code I used for testing. Hope that will help you: http://pastebin.com/hZMj8GjU Note that header extracted from SIP message (from hdr in aboce example) is not NULL terminated.
pejotr