<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18928">
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2 face=Arial>Hi Guys,</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT size=2 face=Arial>It is my first post in this list.&nbsp; 
</FONT><FONT size=2 face=Arial>If&nbsp;this is not the best place to ask please 
point me to the proper one.</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT size=2 face=Arial>I am using Asterisk&nbsp;with uClinux running on 
Blackfin </FONT><FONT size=2 face=Arial>DSP. <BR>I&nbsp;have&nbsp;&nbsp;Asterisk 
1.4.32 working stable on my platform.</FONT></DIV>
<DIV><FONT size=2 face=Arial>Recently I've decided to upgrade </FONT><FONT 
size=2 face=Arial>to the latest Asterisk 1.4.39.2 and&nbsp;</FONT><FONT size=2 
face=Arial>find out that Asterisk 1.4.39.2 is not stable.</FONT></DIV>
<DIV><FONT size=2 face=Arial>The SIP registration is OK but I&nbsp;get Asterisk 
crash on the first SIP call.</FONT></DIV>
<DIV><FONT size=2 face=Arial>&nbsp; </FONT></DIV>
<DIV><FONT size=2 face=Arial>After some experiments I came to the patch below. 
<BR>I am not into the SIP channel driver and SIP protocol so I am not sure if 
there is rational in this patch but it is fact </FONT></DIV>
<DIV><FONT size=2 face=Arial>that it makes latest Asterisk stable on my Blackfin 
target. </FONT></DIV>
<DIV><FONT size=2 face=Arial>Probably someone can clarify to 
me?&nbsp;</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT><FONT size=2 face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT size=2 face=Arial>--- channels/chan_sip.c 2010-12-10 
00:00:30.000000000 +0200<BR>+++ channels/chan_sip.c 2011-02-22 
19:46:52.000000000 +0200<BR>@@ -1604,6 +1604,7 @@<BR>&nbsp;static void 
build_callid_registry(struct sip_registry *reg, struct in_addr ourip, const char 
*fromdomain);<BR>&nbsp;static void make_our_tag(char *tagbuf, size_t 
len);<BR>&nbsp;static int add_header(struct sip_request *req, const char *var, 
const char *value);<BR>+static int add_header_contentLength(struct sip_request 
*req, int len);<BR>&nbsp;static int add_content(struct sip_request *req, const 
char *line);<BR>&nbsp;static int finalize_content(struct sip_request 
*req);<BR>&nbsp;static int add_text(struct sip_request *req, const char 
*text);<BR>@@ -6229,6 +6230,15 @@<BR>&nbsp;}</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT size=2 face=Arial>&nbsp;/*! \brief Add 'Content-Length' header to SIP 
message */<BR>+static int add_header_contentLength(struct sip_request *req, int 
len)<BR>+{<BR>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; char 
clen[10];<BR>+<BR>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; snprintf(clen, 
sizeof(clen), "%d", len);<BR>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return 
add_header(req, "Content-Length", clen);<BR>+}<BR>+<BR>+/*! \brief Add 
'Content-Length' header to SIP message */<BR>&nbsp;static int 
finalize_content(struct sip_request 
*req)<BR>&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; char 
clen[10];<BR>@@ -6840,6 +6850,7 @@<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
struct sip_request resp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
respprep(&amp;resp, p, msg, req);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
add_header(&amp;resp, "Accept", 
"application/sdp");<BR>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
add_header_contentLength(&amp;resp, 0);&nbsp; //Penev: Zero the Content-Length 
!<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return send_response(p, 
&amp;resp, reliable, 0);<BR>&nbsp;}</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2 face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT size=2 face=Arial>Thank you.</FONT></DIV>
<DIV><FONT size=2 face=Arial>Dimitar Penev</FONT></DIV></BODY></HTML>