I think you can use the 'ngrep' command to see the sip packets coming in using the sip listening port. I dont know the exact command though, you will have to lookit up urself. you will see the sip packets coming into ur system and in those packets you can see the response code.
<br><br><div><span class="gmail_quote">On 10/25/07, <b class="gmail_sendername">Douglas Garstang</b> &lt;<a href="mailto:dougmig33@yahoo.com">dougmig33@yahoo.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><div>I&#39;d like to grab the SIP response code that comes back from an INVITE. The HANGUPCAUSE gives the converted ISDN cause code. Anyone know of a way to get the SIP response code instead? 
<br><br>Doug.<br><span class="ad"><br></span></div></div><span class="ad"><br>__________________________________________________<br>Do You Yahoo!?<br>Tired of spam?  Yahoo! Mail has the best spam protection around <br><a href="http://mail.yahoo.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://mail.yahoo.com</a> </span></div><br>_______________________________________________<br>--Bandwidth and Colocation Provided by <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.api-digital.com--" target="_blank">
http://www.api-digital.com--</a><br><br>asterisk-users mailing list<br>To UNSUBSCRIBE or update options visit:<br> &nbsp; <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">
http://lists.digium.com/mailman/listinfo/asterisk-users</a><br></blockquote></div><br><br clear="all"><br>-- <br>Best Regards<br>Rizwan Hisham<br>Software Engineer<br>Axvoice Inc.<br><a href="http://www.axvoice.com">www.axvoice.com
</a>