<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-GB link=blue vlink=purple><div class=WordSection1><p class=MsoNormal>Hi Mailing list,<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>I am having an issue with curl where the app execution doesn&#8217;t return where there is an issue resolving domain, even if the caller has hungup. The billable duration in the CDRS along with the end time stamp both reflect the script end time rather than call end time.<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>Here is an example to force the issue.<o:p></o:p></p><p class=MsoNormal>Edit /etc/resolve and set a name server to 9.9.9.9<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>Create a simple lua script<o:p></o:p></p><p class=MsoNormal>session:answer()<o:p></o:p></p><p class=MsoNormal>session:execute(&#8220;curl&#8221;,&#8221;<a href="http://www.google.com">http://www.google.com</a>&#8221;)<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>When calling this script via softphone and hanging up during the CURL, I see <o:p></o:p></p><p class=MsoNormal>2012-01-12 17:29:23.070105 [DEBUG] switch_core_session.c:875 Send signal sofia/internal/testing@myip [BREAK]<o:p></o:p></p><p class=MsoNormal>2012-01-12 17:29:23.070105 [DEBUG] switch_core_session.c:875 Send signal sofia/internal/testing@myip [BREAK]<o:p></o:p></p><p class=MsoNormal>2012-01-12 17:29:23.070105 [DEBUG] switch_core_session.c:875 Send signal sofia/internal/testing@myip [BREAK]<o:p></o:p></p><p class=MsoNormal>2012-01-12 17:29:23.070105 [DEBUG] switch_core_session.c:875 Send signal sofia/internal/testing@myip [BREAK]<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>And then nothing, until I assume the CURL call ends (including the Callstate Change ACTIVE -&gt; HANGUP)<o:p></o:p></p><p class=MsoNormal>If I then look at the cdrs, they also show billable duration inclusive of the curl timeout even though the call ended some seconds before.<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>I tried setting a hangup hook in the lua but this too doesn&#8217;t get called when the call terminated.<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>It seems like the state machine for the call gets stuck until curl completes.<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>I&#8217;ve just downloaded the git head and the issue is present there too.<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>Obvious question, shouldn&#8217;t billable duration and end stamp reflect the actual call? Or is there something I need to do that I&#8217;ve currently missed.<o:p></o:p></p><p class=MsoNormal>Is this issue specific to curl, or could it happen in other modules?<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>Any pointers?<o:p></o:p></p><p class=MsoNormal>Many Thanks<o:p></o:p></p><p class=MsoNormal>Oz.<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p></div></body></html>