<!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> </DIV>
<DIV><FONT size=2 face=Arial>It is my first post in this list.
</FONT><FONT size=2 face=Arial>If this is not the best place to ask please
point me to the proper one.</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>I am using Asterisk with uClinux running on
Blackfin </FONT><FONT size=2 face=Arial>DSP. <BR>I have 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 </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 get Asterisk
crash on the first SIP call.</FONT></DIV>
<DIV><FONT size=2 face=Arial> </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? </FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT><FONT size=2 face=Arial></FONT> </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> static void
build_callid_registry(struct sip_registry *reg, struct in_addr ourip, const char
*fromdomain);<BR> static void make_our_tag(char *tagbuf, size_t
len);<BR> 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> static int add_content(struct sip_request *req, const
char *line);<BR> static int finalize_content(struct sip_request
*req);<BR> static int add_text(struct sip_request *req, const char
*text);<BR>@@ -6229,6 +6230,15 @@<BR> }</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial> /*! \brief Add 'Content-Length' header to SIP
message */<BR>+static int add_header_contentLength(struct sip_request *req, int
len)<BR>+{<BR>+ char
clen[10];<BR>+<BR>+ snprintf(clen,
sizeof(clen), "%d", len);<BR>+ return
add_header(req, "Content-Length", clen);<BR>+}<BR>+<BR>+/*! \brief Add
'Content-Length' header to SIP message */<BR> static int
finalize_content(struct sip_request
*req)<BR> {<BR> char
clen[10];<BR>@@ -6840,6 +6850,7 @@<BR>
struct sip_request resp;<BR>
respprep(&resp, p, msg, req);<BR>
add_header(&resp, "Accept",
"application/sdp");<BR>+
add_header_contentLength(&resp, 0); //Penev: Zero the Content-Length
!<BR> return send_response(p,
&resp, reliable, 0);<BR> }</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>Thank you.</FONT></DIV>
<DIV><FONT size=2 face=Arial>Dimitar Penev</FONT></DIV></BODY></HTML>