title: How can I log Sofia SIP requests/responses
body: <p>I'm working on a telephony application and use Sofia SIP as signalling stack. I'm trying to find a way to log SIP requests/responses to be able to troubleshoot signalling issues. The problem is that I can't seem to find a way to retrieve a 'serialized' form of the SIP header from Sofia's data structures.</p>
  
  <p>I have tried:</p>
  
  <ul>
  <li>Checking existing Sofia logging facilities to see if they log something similar but after enabling all facilities (i.e. nua, nta, nea, etc), I see no such info.</li>
  <li>Retrieving the data from the sip_t structure nua is passing my application but haven't found a way to serialize that data (I did find a sip_e routine which is supposed to encode a sip_t data structure, but it seems that only a declaration is included in the Sofia sources -no implementation)</li>
  </ul>
  
  <p>I know that I can probably find a way to hack Sofia code to do that but I'd rather not</p>
  
  <p>Any ideas are welcome</p>
  
  <p>Thanks a lot,
  Antonis</p>